mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
support very recent glibc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29738 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
462d45a66e
commit
2cc3cb187c
5 changed files with 135 additions and 17 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-02-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac:
|
||||
* configure:
|
||||
* Headers/Additions/GNUstepBase/config.h.in:
|
||||
* Source/NSString.m:
|
||||
Update printf handling for very latest glibc
|
||||
|
||||
2010-02-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac: Add test for socklen_t type
|
||||
|
|
|
@ -262,6 +262,9 @@
|
|||
/* Define if you have the register_printf_function function */
|
||||
#undef HAVE_REGISTER_PRINTF_FUNCTION
|
||||
|
||||
/* Define to 1 if you have the `register_printf_specifier' function. */
|
||||
#undef HAVE_REGISTER_PRINTF_SPECIFIER
|
||||
|
||||
/* Define to 1 if you have the `rint' function. */
|
||||
#undef HAVE_RINT
|
||||
|
||||
|
@ -492,31 +495,31 @@
|
|||
/* Define to 1 if the `setpgrp' function takes no argument. */
|
||||
#undef SETPGRP_VOID
|
||||
|
||||
/* The size of a `double', as computed by sizeof. */
|
||||
/* The size of `double', as computed by sizeof. */
|
||||
#undef SIZEOF_DOUBLE
|
||||
|
||||
/* The size of a `float', as computed by sizeof. */
|
||||
/* The size of `float', as computed by sizeof. */
|
||||
#undef SIZEOF_FLOAT
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of a `long long', as computed by sizeof. */
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The size of a `pthread_cond_t', as computed by sizeof. */
|
||||
/* The size of `pthread_cond_t', as computed by sizeof. */
|
||||
#undef SIZEOF_PTHREAD_COND_T
|
||||
|
||||
/* The size of a `pthread_mutex_t', as computed by sizeof. */
|
||||
/* The size of `pthread_mutex_t', as computed by sizeof. */
|
||||
#undef SIZEOF_PTHREAD_MUTEX_T
|
||||
|
||||
/* The size of a `short', as computed by sizeof. */
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The size of a `void*', as computed by sizeof. */
|
||||
/* The size of `void*', as computed by sizeof. */
|
||||
#undef SIZEOF_VOIDP
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
|
@ -544,5 +547,5 @@
|
|||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
|
|
@ -478,7 +478,11 @@ static const unichar byteOrderMarkSwapped = 0xFFFE;
|
|||
|
||||
#if ! PRINTF_ATSIGN_VA_LIST
|
||||
static int
|
||||
arginfo_func (const struct printf_info *info, size_t n, int *argtypes)
|
||||
arginfo_func (const struct printf_info *info, size_t n, int *argtypes
|
||||
#if defined(HAVE_REGISTER_PRINTF_SPECIFIER)
|
||||
, int *size
|
||||
#endif
|
||||
)
|
||||
{
|
||||
*argtypes = PA_POINTER;
|
||||
return 1;
|
||||
|
@ -584,9 +588,8 @@ handle_printf_atsign (FILE *stream,
|
|||
NSNonRetainedObjectMapValueCallBacks, 0);
|
||||
placeholderLock = [NSLock new];
|
||||
|
||||
#ifdef HAVE_REGISTER_PRINTF_FUNCTION
|
||||
if (register_printf_function ('@',
|
||||
handle_printf_atsign,
|
||||
#if defined(HAVE_REGISTER_PRINTF_SPECIFIER)
|
||||
if (register_printf_specifier ('@', handle_printf_atsign,
|
||||
#if PRINTF_ATSIGN_VA_LIST
|
||||
0))
|
||||
#else
|
||||
|
@ -594,7 +597,16 @@ handle_printf_atsign (FILE *stream,
|
|||
#endif
|
||||
[NSException raise: NSGenericException
|
||||
format: @"register printf handling of %%@ failed"];
|
||||
#endif /* HAVE_REGISTER_PRINTF_FUNCTION */
|
||||
#elif defined(HAVE_REGISTER_PRINTF_FUNCTION)
|
||||
if (register_printf_function ('@', handle_printf_atsign,
|
||||
#if PRINTF_ATSIGN_VA_LIST
|
||||
0))
|
||||
#else
|
||||
arginfo_func))
|
||||
#endif
|
||||
[NSException raise: NSGenericException
|
||||
format: @"register printf handling of %%@ failed"];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
96
configure
vendored
96
configure
vendored
|
@ -16756,8 +16756,102 @@ echo "${ECHO_T}no" >&6; }
|
|||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# This function needed by NSString for handling of %@ printf directive.
|
||||
# This needed by NSString for handling of %@ printf directive.
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
for ac_func in register_printf_specifier
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
|
||||
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
|
||||
For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
#define $ac_func innocuous_$ac_func
|
||||
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func (); below.
|
||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
<limits.h> exists even on freestanding compilers. */
|
||||
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#undef $ac_func
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char $ac_func ();
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined __stub_$ac_func || defined __stub___$ac_func
|
||||
choke me
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return $ac_func ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 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); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
eval "$as_ac_var=yes"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
eval "$as_ac_var=no"
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
ac_res=`eval echo '${'$as_ac_var'}'`
|
||||
{ echo "$as_me:$LINENO: result: $ac_res" >&5
|
||||
echo "${ECHO_T}$ac_res" >&6; }
|
||||
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for register_printf_function" >&5
|
||||
echo $ECHO_N "checking for register_printf_function... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_func_register_printf_function+set}" = set; then
|
||||
|
|
|
@ -1098,8 +1098,9 @@ else
|
|||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# This function needed by NSString for handling of %@ printf directive.
|
||||
# This needed by NSString for handling of %@ printf directive.
|
||||
#--------------------------------------------------------------------
|
||||
AC_CHECK_FUNCS(register_printf_specifier)
|
||||
AC_CHECK_FUNC(register_printf_function, register_printf=1,
|
||||
register_printf=0)
|
||||
if test $register_printf = 1; then
|
||||
|
|
Loading…
Reference in a new issue