mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* configure.ac: Test for objc forwarding by compiling a program.
* config/config.forward.m: New file. (Fixes bug #11188). * Source/GSFormat.m (GSFormat): Assign wchar via var args from an int (Fixes bug #10950). * Testing/string.m: Tests for standardizing path. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20427 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
775cd4d09c
commit
5a08f449a7
6 changed files with 64 additions and 19 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-12-07 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.ac: Test for objc forwarding by compiling a program.
|
||||
* config/config.forward.m: New file.
|
||||
(Fixes bug #11188).
|
||||
|
||||
* Source/GSFormat.m (GSFormat): Assign wchar via var args from an
|
||||
int (Fixes bug #10950).
|
||||
|
||||
* Testing/string.m: Tests for standardizing path.
|
||||
|
||||
2004-12-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSCalendarDate.m: Fix off-by-one bug resulting in printout
|
||||
|
|
|
@ -993,7 +993,7 @@ NSDictionary *locale)
|
|||
break
|
||||
|
||||
T (PA_CHAR, pa_char, int); /* Promoted. */
|
||||
T (PA_WCHAR, pa_wchar, wint_t);
|
||||
T (PA_WCHAR, pa_wchar, int); /* Sometimes promoted. */
|
||||
T (PA_INT|PA_FLAG_SHORT, pa_short_int, int); /* Promoted. */
|
||||
T (PA_INT, pa_int, int);
|
||||
T (PA_INT|PA_FLAG_LONG, pa_long_int, long int);
|
||||
|
|
|
@ -22,7 +22,6 @@ int main()
|
|||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
id s = @"This is a test string";
|
||||
id s2, s3;
|
||||
int a;
|
||||
unichar u0[5] = { 0xFE66, 'a', 'b', 'c', 'd'};
|
||||
unichar u1[6] = { '1', '2', '.', '3', '4', 0xFE66};
|
||||
unichar u2[7] = { 'a', 'b', 0xFE66, 'a', 'b', 'c', 'd'};
|
||||
|
@ -128,6 +127,17 @@ int main()
|
|||
printf("Encoding %x\n", *encs++);
|
||||
}
|
||||
|
||||
GSPrintf(stdout, @"\nStandardize Paths\n");
|
||||
s2 = @"../";
|
||||
GSPrintf(stdout, @"%@ becomes %@\n",
|
||||
s2, [s2 stringByStandardizingPath]);
|
||||
s2 = @"/usr/bin/../lib";
|
||||
GSPrintf(stdout, @"%@ becomes %@\n",
|
||||
s2, [s2 stringByStandardizingPath]);
|
||||
s2 = @"~/Public/../GNUstep";
|
||||
GSPrintf(stdout, @"%@ becomes %@\n",
|
||||
s2, [s2 stringByStandardizingPath]);
|
||||
|
||||
[arp release];
|
||||
exit(0);
|
||||
}
|
||||
|
|
7
config/config.forward.m
Normal file
7
config/config.forward.m
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <objc/objc-api.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
IMP (*__objc_msg_forward1)(SEL) = __objc_msg_forward;
|
||||
return 0;
|
||||
}
|
46
configure
vendored
46
configure
vendored
|
@ -13844,24 +13844,40 @@ have_forward_hook=yes
|
|||
echo "$as_me:$LINENO: checking \"for forwarding callback in runtime\"" >&5
|
||||
echo $ECHO_N "checking \"for forwarding callback in runtime\"... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
#include "$srcdir/config/config.forward.m"
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <objc/objc-api.h>
|
||||
|
||||
_ACEOF
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "__objc_msg_forward" >/dev/null 2>&1; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
have_forward_hook=yes
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; have_forward_hook=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
have_forward_hook=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $have_forward_hook" >&5
|
||||
echo "${ECHO_T}$have_forward_hook" >&6
|
||||
if test $have_forward_hook = no; then
|
||||
enable_libffi=no
|
||||
enable_ffcall=no
|
||||
|
|
|
@ -983,8 +983,9 @@ fi
|
|||
|
||||
have_forward_hook=yes
|
||||
AC_MSG_CHECKING("for forwarding callback in runtime")
|
||||
AC_EGREP_HEADER(__objc_msg_forward, objc/objc-api.h, AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no); have_forward_hook=no)
|
||||
AC_COMPILE_IFELSE([#include "$srcdir/config/config.forward.m"],
|
||||
have_forward_hook=yes, have_forward_hook=no)
|
||||
AC_MSG_RESULT($have_forward_hook)
|
||||
if test $have_forward_hook = no; then
|
||||
enable_libffi=no
|
||||
enable_ffcall=no
|
||||
|
|
Loading…
Reference in a new issue