Add check for vasprintf

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6364 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-03-23 18:49:34 +00:00
parent 25a6ea9e11
commit 0fedfd92c4
6 changed files with 112 additions and 59 deletions

View file

@ -1,3 +1,8 @@
2000-03-23 Adam Fedor <fedor@gnu.org>
* configure.in: Check for vasprintf function
* config/config.vasprintf.c: New file.
2000-03-19 Richard Frith-Macdonald <rfm@gnu.org>
NSNumber optimisation ...

View file

@ -22,6 +22,7 @@
#undef NeXT_runtime
#undef VSPRINTF_RETURNS_LENGTH
#undef VASPRINTF_RETURNS_LENGTH
/* Define if you have the register_printf_function function. */
#undef HAVE_REGISTER_PRINTF_FUNCTION
@ -104,6 +105,9 @@
/* Define if you have the valloc function. */
#undef HAVE_VALLOC
/* Define if you have the vasprintf function. */
#undef HAVE_VASPRINTF
/* Define if you have the vsprintf function. */
#undef HAVE_VSPRINTF

View file

@ -7,6 +7,7 @@
#undef NeXT_runtime
#undef VSPRINTF_RETURNS_LENGTH
#undef VASPRINTF_RETURNS_LENGTH
/* The number of bytes in a int. */
#undef SIZEOF_INT

10
config/config.vasprintf.c Normal file
View file

@ -0,0 +1,10 @@
/* Exit with status 0 if vasprintf returns the length of the string printed.
Some systems return a pointer to the string instead. */
int main ()
{
char *buf;
if (vasprintf (&buf, "1234") == 4)
exit (0);
exit (-1);
}

142
configure vendored
View file

@ -3026,7 +3026,7 @@ done
#--------------------------------------------------------------------
# This function needed by StdioStream.m
#--------------------------------------------------------------------
for ac_func in vsprintf
for ac_func in vsprintf vasprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3033: checking for $ac_func" >&5
@ -3106,6 +3106,32 @@ fi
#define VSPRINTF_RETURNS_LENGTH $VSPRINTF_RETURNS_LENGTH
EOF
fi
if test $ac_cv_func_vasprintf = yes ; then
if test "$cross_compiling" = yes; then
VASPRINTF_RETURNS_LENGTH=1
else
cat > conftest.$ac_ext <<EOF
#line 3116 "configure"
#include "confdefs.h"
#include "$srcdir/config/config.vasprintf.c"
EOF
if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
VASPRINTF_RETURNS_LENGTH=1
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
VASPRINTF_RETURNS_LENGTH=0
fi
rm -fr conftest*
fi
cat >> confdefs.h <<EOF
#define VASPRINTF_RETURNS_LENGTH $VASPRINTF_RETURNS_LENGTH
EOF
fi
#--------------------------------------------------------------------
@ -3114,12 +3140,12 @@ fi
for ac_func in getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3118: checking for $ac_func" >&5
echo "configure:3144: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3123 "configure"
#line 3149 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3142,7 +3168,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3175,12 +3201,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:3179: checking for $ac_hdr that defines DIR" >&5
echo "configure:3205: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3184 "configure"
#line 3210 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@ -3188,7 +3214,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:3192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@ -3213,7 +3239,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:3217: checking for opendir in -ldir" >&5
echo "configure:3243: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3221,7 +3247,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3225 "configure"
#line 3251 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -3232,7 +3258,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3254,7 +3280,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:3258: checking for opendir in -lx" >&5
echo "configure:3284: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3262,7 +3288,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3266 "configure"
#line 3292 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -3273,7 +3299,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3302,12 +3328,12 @@ fi
for ac_func in valloc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3306: checking for $ac_func" >&5
echo "configure:3332: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3311 "configure"
#line 3337 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3330,7 +3356,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3361,12 +3387,12 @@ done
for ac_func in times
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3365: checking for $ac_func" >&5
echo "configure:3391: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3370 "configure"
#line 3396 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3389,7 +3415,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3420,12 +3446,12 @@ done
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3424: checking for $ac_func" >&5
echo "configure:3450: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3429 "configure"
#line 3455 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3448,7 +3474,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3475,12 +3501,12 @@ done
for ac_func in shmctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3479: checking for $ac_func" >&5
echo "configure:3505: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3484 "configure"
#line 3510 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3503,7 +3529,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3530,12 +3556,12 @@ done
for ac_func in mmap
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3534: checking for $ac_func" >&5
echo "configure:3560: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3539 "configure"
#line 3565 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3558,7 +3584,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3585,12 +3611,12 @@ done
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3589: checking for $ac_func" >&5
echo "configure:3615: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3594 "configure"
#line 3620 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3613,7 +3639,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3644,12 +3670,12 @@ done
for ac_func in inet_aton
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3648: checking for $ac_func" >&5
echo "configure:3674: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3653 "configure"
#line 3679 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3672,7 +3698,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3703,12 +3729,12 @@ done
for ac_func in killpg setpgrp setpgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3707: checking for $ac_func" >&5
echo "configure:3733: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3712 "configure"
#line 3738 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3731,7 +3757,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3756,7 +3782,7 @@ fi
done
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
echo "configure:3760: checking whether setpgrp takes no argument" >&5
echo "configure:3786: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3764,7 +3790,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 3768 "configure"
#line 3794 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@ -3784,7 +3810,7 @@ main()
}
EOF
if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@ -3814,12 +3840,12 @@ fi
for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3818: checking for $ac_func" >&5
echo "configure:3844: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3823 "configure"
#line 3849 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3842,7 +3868,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3873,12 +3899,12 @@ done
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3877: checking for $ac_func" >&5
echo "configure:3903: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3882 "configure"
#line 3908 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3901,7 +3927,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3930,12 +3956,12 @@ done
# This function needed by NSString for handling of %@ printf directive.
#--------------------------------------------------------------------
echo $ac_n "checking for register_printf_function""... $ac_c" 1>&6
echo "configure:3934: checking for register_printf_function" >&5
echo "configure:3960: checking for register_printf_function" >&5
if eval "test \"`echo '$''{'ac_cv_func_register_printf_function'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3939 "configure"
#line 3965 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char register_printf_function(); below. */
@ -3958,7 +3984,7 @@ register_printf_function();
; return 0; }
EOF
if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_register_printf_function=yes"
else
@ -3983,11 +4009,11 @@ if test $register_printf = 1; then
working_register_printf=1
else
cat > conftest.$ac_ext <<EOF
#line 3987 "configure"
#line 4013 "configure"
#include "confdefs.h"
#include "$srcdir/config/config.printf.c"
EOF
if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
working_register_printf=1
else
@ -4013,12 +4039,12 @@ fi
for ac_func in realpath
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4017: checking for $ac_func" >&5
echo "configure:4043: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4022 "configure"
#line 4048 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4041,7 +4067,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -4071,7 +4097,7 @@ done
# Used in critical cases by NSProcessInfo.m
#--------------------------------------------------------------------
echo $ac_n "checking program_invocation_name in C Library""... $ac_c" 1>&6
echo "configure:4075: checking program_invocation_name in C Library" >&5
echo "configure:4101: checking program_invocation_name in C Library" >&5
if eval "test \"`echo '$''{'program_invocation_name_worked'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4079,7 +4105,7 @@ else
program_invocation_name_worked=no
else
cat > conftest.$ac_ext <<EOF
#line 4083 "configure"
#line 4109 "configure"
#include "confdefs.h"
#include <string.h>
@ -4091,7 +4117,7 @@ main (int argc, char *argv[])
}
EOF
if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
program_invocation_name_worked=yes
else
@ -4120,7 +4146,7 @@ fi
# Needed by NSProcessInfo.m
#--------------------------------------------------------------------
echo $ac_n "checking kernel support for /proc filesystem""... $ac_c" 1>&6
echo "configure:4124: checking kernel support for /proc filesystem" >&5
echo "configure:4150: checking kernel support for /proc filesystem" >&5
if (grep proc /etc/fstab >/dev/null 2>/dev/null); then
sys_proc_fs=yes;
cat >> confdefs.h <<\EOF

View file

@ -528,7 +528,7 @@ AC_CHECK_FUNCS(syslog)
#--------------------------------------------------------------------
# This function needed by StdioStream.m
#--------------------------------------------------------------------
AC_CHECK_FUNCS(vsprintf)
AC_CHECK_FUNCS(vsprintf vasprintf)
if test $ac_cv_func_vsprintf = yes ; then
AC_TRY_RUN([#include "$srcdir/config/config.vsprintf.c"],
VSPRINTF_RETURNS_LENGTH=1,
@ -536,6 +536,13 @@ if test $ac_cv_func_vsprintf = yes ; then
VSPRINTF_RETURNS_LENGTH=1)
AC_DEFINE_UNQUOTED(VSPRINTF_RETURNS_LENGTH, $VSPRINTF_RETURNS_LENGTH)
fi
if test $ac_cv_func_vasprintf = yes ; then
AC_TRY_RUN([#include "$srcdir/config/config.vasprintf.c"],
VASPRINTF_RETURNS_LENGTH=1,
VASPRINTF_RETURNS_LENGTH=0,
VASPRINTF_RETURNS_LENGTH=1)
AC_DEFINE_UNQUOTED(VASPRINTF_RETURNS_LENGTH, $VASPRINTF_RETURNS_LENGTH)
fi
#--------------------------------------------------------------------
# This function needed by NSFileManager.m and find_exec.c