known_extensions=''
nonxs_ext=''
static_ext=''
+uselanginfo=''
useopcode=''
useposix=''
extras=''
cpprun=''
cppstdin=''
d__fwalk=''
+d_accept4=''
d_access=''
d_accessx=''
d_acosh=''
drand48_r_proto=''
d_drand48proto=''
d_dup2=''
+d_dup3=''
d_eaccess=''
d_endgrent=''
d_endgrent_r=''
d_mkdir=''
d_mkdtemp=''
d_mkfifo=''
+d_mkostemp=''
d_mkstemp=''
d_mkstemps=''
d_mktime=''
d_fpathconf=''
d_pathconf=''
d_pause=''
+d_pipe2=''
d_pipe=''
d_poll=''
d_portable=''
d_sigprocmask=''
d_sigsetjmp=''
usesitecustomize=''
+d_snprintf=''
+d_vsnprintf=''
d_sockatmark=''
d_sockatmarkproto=''
d_ip_mreq=''
d_strlcpy=''
d_strnlen=''
d_strtod=''
+d_strtod_l=''
d_strtol=''
d_strtold=''
d_strtold_l=''
useposix=true
: set useopcode=false in your hint file to disable the Opcode extension.
useopcode=true
+: set uselanginfo=false in your hint file to disable the I18N::Langinfo extension.
+uselanginfo=true
archname64=''
ccflags_uselargefiles=''
ldflags_uselargefiles=''
;;
nonstop-ux) osname=nonstopux ;;
openbsd) osname=openbsd
- osvers="$3"
- ;;
+ osvers="$3"
+ ;;
os2) osname=os2
osvers="$4"
;;
rp='Try to use long doubles if available?'
. ./myread
case "$ans" in
-y|Y) val="$define" ;;
+y|Y) val="$define" ;;
*) val="$undef" ;;
esac
set uselongdouble
;;
esac
-
: determine whether to use malloc wrapping
echo " "
case "$usemallocwrap" in
echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
val="$undef"
else
- echo 'You can have filenames longer than 14 characters.'>&4
- val="$define"
+ echo 'You can have filenames longer than 14 characters.'>&4
+ val="$define"
fi
else
$cat <<'EOM'
$test -s hosts
} || {
test "X$hostcat" != "X" &&
- $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
+ $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
/[ ]$myhostname[ . ]/p" > hosts
}
tmp_re="[ . ]"
.) dflt=.`$sed -n -e 's/ / /g' \
-e 's/^domain *\([^ ]*\).*/\1/p' $tans \
-e 1q 2>/dev/null`
- ;;
+ ;;
esac
fi
;;
set usefaststdio
eval $setvar
-
: define an is-a-typedef? function
typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
case "$inclist" in
rp='Try to understand large files, if available?'
. ./myread
case "$ans" in
- y|Y) val="$define" ;;
- *) val="$undef" ;;
+ y|Y) val="$define" ;;
+ *) val="$undef" ;;
esac
;;
esac
set fwalk d__fwalk
eval $inlibc
+: see if accept4 exists
+set accept4 d_accept4
+eval $inlibc
+
: Initialize h_fcntl
h_fcntl=false
esac
case "$asctime_r_proto" in
''|0) d_asctime_r=undef
- asctime_r_proto=0
+ asctime_r_proto=0
echo "Disabling asctime_r, cannot determine prototype." >&4 ;;
* ) case "$asctime_r_proto" in
REENTRANT_PROTO*) ;;
#ifdef I_STDLIB
#include <stdlib.h>
#endif
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+#ifndef INTPTR_MAX
+#define intptr_t int
+#endif
int null_printf (char* pat,...) __attribute__((__format__(__printf__,1,2)));
-int null_printf (char* pat,...) { return (int)pat; }
+int null_printf (char* pat,...) { return (int)(intptr_t)pat; }
int main () { exit(null_printf(NULL)); }
EOCP
if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then
*) echo "No, it doesn't." ;;
esac
-
: check for const keyword
echo " "
echo 'Checking to see if your C compiler knows about "const"...' >&4
esac
case "$crypt_r_proto" in
''|0) d_crypt_r=undef
- crypt_r_proto=0
+ crypt_r_proto=0
echo "Disabling crypt_r, cannot determine prototype." >&4 ;;
* ) case "$crypt_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$ctermid_r_proto" in
''|0) d_ctermid_r=undef
- ctermid_r_proto=0
+ ctermid_r_proto=0
echo "Disabling ctermid_r, cannot determine prototype." >&4 ;;
* ) case "$ctermid_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$ctime_r_proto" in
''|0) d_ctime_r=undef
- ctime_r_proto=0
+ ctime_r_proto=0
echo "Disabling ctime_r, cannot determine prototype." >&4 ;;
* ) case "$ctime_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$drand48_r_proto" in
''|0) d_drand48_r=undef
- drand48_r_proto=0
+ drand48_r_proto=0
echo "Disabling drand48_r, cannot determine prototype." >&4 ;;
* ) case "$drand48_r_proto" in
REENTRANT_PROTO*) ;;
set dup2 d_dup2
eval $inlibc
+: see if dup3 exists
+set dup3 d_dup3
+eval $inlibc
+
+: see if this is an xlocale.h system
+set xlocale.h i_xlocale
+eval $inhdr
+
+: see if newlocale exists
+set newlocale d_newlocale
+eval $inlibc
+
+: see if freelocale exists
+set freelocale d_freelocale
+eval $inlibc
+
+: see if uselocale exists
+set uselocale d_uselocale
+eval $inlibc
+
+: see if duplocale exists
+set duplocale d_duplocale
+eval $inlibc
+
+: see if querylocale exists
+set querylocale d_querylocale
+eval $inlibc
+
: see if eaccess exists
set eaccess d_eaccess
eval $inlibc
esac
case "$endgrent_r_proto" in
''|0) d_endgrent_r=undef
- endgrent_r_proto=0
+ endgrent_r_proto=0
echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
* ) case "$endgrent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$endhostent_r_proto" in
''|0) d_endhostent_r=undef
- endhostent_r_proto=0
+ endhostent_r_proto=0
echo "Disabling endhostent_r, cannot determine prototype." >&4 ;;
* ) case "$endhostent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$endnetent_r_proto" in
''|0) d_endnetent_r=undef
- endnetent_r_proto=0
+ endnetent_r_proto=0
echo "Disabling endnetent_r, cannot determine prototype." >&4 ;;
* ) case "$endnetent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$endprotoent_r_proto" in
''|0) d_endprotoent_r=undef
- endprotoent_r_proto=0
+ endprotoent_r_proto=0
echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;;
* ) case "$endprotoent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$endpwent_r_proto" in
''|0) d_endpwent_r=undef
- endpwent_r_proto=0
+ endpwent_r_proto=0
echo "Disabling endpwent_r, cannot determine prototype." >&4 ;;
* ) case "$endpwent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$endservent_r_proto" in
''|0) d_endservent_r=undef
- endservent_r_proto=0
+ endservent_r_proto=0
echo "Disabling endservent_r, cannot determine prototype." >&4 ;;
* ) case "$endservent_r_proto" in
REENTRANT_PROTO*) ;;
EOP
set try
if eval $compile && $to try.c; then
- case `$run ./try` in
+ case `$run ./try` in
Pass_changed)
echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
d_stdio_ptr_lval_sets_cnt="$define" ;;
set d_faststdio
eval $setvar
-
-
: see if fchdir exists
set fchdir d_fchdir
eval $inlibc
set d_fpos64_t
eval $setvar
-: see if this is an xlocale.h system
-set xlocale.h i_xlocale
-eval $inhdr
-
-: see if newlocale exists
-set newlocale d_newlocale
-eval $inlibc
-
-: see if freelocale exists
-set freelocale d_freelocale
-eval $inlibc
-
-: see if uselocale exists
-set uselocale d_uselocale
-eval $inlibc
-
-: see if duplocale exists
-set duplocale d_duplocale
-eval $inlibc
-
-: see if querylocale exists
-set querylocale d_querylocale
-eval $inlibc
-
: see if frexpl exists
set frexpl d_frexpl
eval $inlibc
set fstatvfs d_fstatvfs
eval $inlibc
-
: see if fsync exists
set fsync d_fsync
eval $inlibc
esac
case "$getgrent_r_proto" in
''|0) d_getgrent_r=undef
- getgrent_r_proto=0
+ getgrent_r_proto=0
echo "Disabling getgrent_r, cannot determine prototype." >&4 ;;
* ) case "$getgrent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getgrgid_r_proto" in
''|0) d_getgrgid_r=undef
- getgrgid_r_proto=0
+ getgrgid_r_proto=0
echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;;
* ) case "$getgrgid_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getgrnam_r_proto" in
''|0) d_getgrnam_r=undef
- getgrnam_r_proto=0
+ getgrnam_r_proto=0
echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;;
* ) case "$getgrnam_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$gethostbyaddr_r_proto" in
''|0) d_gethostbyaddr_r=undef
- gethostbyaddr_r_proto=0
+ gethostbyaddr_r_proto=0
echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
* ) case "$gethostbyaddr_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$gethostbyname_r_proto" in
''|0) d_gethostbyname_r=undef
- gethostbyname_r_proto=0
+ gethostbyname_r_proto=0
echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;;
* ) case "$gethostbyname_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$gethostent_r_proto" in
''|0) d_gethostent_r=undef
- gethostent_r_proto=0
+ gethostent_r_proto=0
echo "Disabling gethostent_r, cannot determine prototype." >&4 ;;
* ) case "$gethostent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getlogin_r_proto" in
''|0) d_getlogin_r=undef
- getlogin_r_proto=0
+ getlogin_r_proto=0
echo "Disabling getlogin_r, cannot determine prototype." >&4 ;;
* ) case "$getlogin_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getnetbyaddr_r_proto" in
''|0) d_getnetbyaddr_r=undef
- getnetbyaddr_r_proto=0
+ getnetbyaddr_r_proto=0
echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;;
* ) case "$getnetbyaddr_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getnetbyname_r_proto" in
''|0) d_getnetbyname_r=undef
- getnetbyname_r_proto=0
+ getnetbyname_r_proto=0
echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;;
* ) case "$getnetbyname_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getnetent_r_proto" in
''|0) d_getnetent_r=undef
- getnetent_r_proto=0
+ getnetent_r_proto=0
echo "Disabling getnetent_r, cannot determine prototype." >&4 ;;
* ) case "$getnetent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getprotobyname_r_proto" in
''|0) d_getprotobyname_r=undef
- getprotobyname_r_proto=0
+ getprotobyname_r_proto=0
echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;;
* ) case "$getprotobyname_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getprotobynumber_r_proto" in
''|0) d_getprotobynumber_r=undef
- getprotobynumber_r_proto=0
+ getprotobynumber_r_proto=0
echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;;
* ) case "$getprotobynumber_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getprotoent_r_proto" in
''|0) d_getprotoent_r=undef
- getprotoent_r_proto=0
+ getprotoent_r_proto=0
echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;;
* ) case "$getprotoent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getpwent_r_proto" in
''|0) d_getpwent_r=undef
- getpwent_r_proto=0
+ getpwent_r_proto=0
echo "Disabling getpwent_r, cannot determine prototype." >&4 ;;
* ) case "$getpwent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getpwnam_r_proto" in
''|0) d_getpwnam_r=undef
- getpwnam_r_proto=0
+ getpwnam_r_proto=0
echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;;
* ) case "$getpwnam_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getpwuid_r_proto" in
''|0) d_getpwuid_r=undef
- getpwuid_r_proto=0
+ getpwuid_r_proto=0
echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
* ) case "$getpwuid_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getservbyname_r_proto" in
''|0) d_getservbyname_r=undef
- getservbyname_r_proto=0
+ getservbyname_r_proto=0
echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;;
* ) case "$getservbyname_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getservbyport_r_proto" in
''|0) d_getservbyport_r=undef
- getservbyport_r_proto=0
+ getservbyport_r_proto=0
echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;;
* ) case "$getservbyport_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getservent_r_proto" in
''|0) d_getservent_r=undef
- getservent_r_proto=0
+ getservent_r_proto=0
echo "Disabling getservent_r, cannot determine prototype." >&4 ;;
* ) case "$getservent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$getspnam_r_proto" in
''|0) d_getspnam_r=undef
- getspnam_r_proto=0
+ getspnam_r_proto=0
echo "Disabling getspnam_r, cannot determine prototype." >&4 ;;
* ) case "$getspnam_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$gmtime_r_proto" in
''|0) d_gmtime_r=undef
- gmtime_r_proto=0
+ gmtime_r_proto=0
echo "Disabling gmtime_r, cannot determine prototype." >&4 ;;
* ) case "$gmtime_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$localtime_r_proto" in
''|0) d_localtime_r=undef
- localtime_r_proto=0
+ localtime_r_proto=0
echo "Disabling localtime_r, cannot determine prototype." >&4 ;;
* ) case "$localtime_r_proto" in
REENTRANT_PROTO*) ;;
set mkfifo d_mkfifo
eval $inlibc
+: see if mkostemp exists
+set mkostemp d_mkostemp
+eval $inlibc
+
: see if mkstemp exists
set mkstemp d_mkstemp
eval $inlibc
set mktime d_mktime
eval $inlibc
-: see if this is a sys/mman.h system
+: see if sys/mman.h has to be included
set sys/mman.h i_sysmman
eval $inhdr
;;
esac
-
-
: see if sqrtl exists
set sqrtl d_sqrtl
eval $inlibc
*) echo "No, it doesn't." ;;
esac
-
: see if msync exists
set msync d_msync
eval $inlibc
set pause d_pause
eval $inlibc
+: see if pipe2 exists
+set pipe2 d_pipe2
+eval $inlibc
+
: see if poll exists
set poll d_poll
eval $inlibc
esac
case "$random_r_proto" in
''|0) d_random_r=undef
- random_r_proto=0
+ random_r_proto=0
echo "Disabling random_r, cannot determine prototype." >&4 ;;
* ) case "$random_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$readdir64_r_proto" in
''|0) d_readdir64_r=undef
- readdir64_r_proto=0
+ readdir64_r_proto=0
echo "Disabling readdir64_r, cannot determine prototype." >&4 ;;
* ) case "$readdir64_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$readdir_r_proto" in
''|0) d_readdir_r=undef
- readdir_r_proto=0
+ readdir_r_proto=0
echo "Disabling readdir_r, cannot determine prototype." >&4 ;;
* ) case "$readdir_r_proto" in
REENTRANT_PROTO*) ;;
extern int errno;
#endif
int main() {
- struct semid_ds arg;
+ union semun
+#ifndef HAS_UNION_SEMUN
+ {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ }
+#endif
+ arg;
+ struct semid_ds argbuf;
int sem, st;
#if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
if (sem > -1) {
+ arg.buf = &argbuf;
# ifdef IPC_STAT
- st = semctl(sem, 0, IPC_STAT, &arg);
+ st = semctl(sem, 0, IPC_STAT, arg);
if (st == 0)
printf("semid_ds\n");
else
# endif /* IPC_STAT */
printf("semctl IPC_STAT failed: errno = %d\n", errno);
# ifdef IPC_RMID
- if (semctl(sem, 0, IPC_RMID, &arg) != 0)
+ if (semctl(sem, 0, IPC_RMID, arg) != 0)
# endif /* IPC_RMID */
printf("semctl IPC_RMID failed: errno = %d\n", errno);
} else
esac
case "$setgrent_r_proto" in
''|0) d_setgrent_r=undef
- setgrent_r_proto=0
+ setgrent_r_proto=0
echo "Disabling setgrent_r, cannot determine prototype." >&4 ;;
* ) case "$setgrent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$sethostent_r_proto" in
''|0) d_sethostent_r=undef
- sethostent_r_proto=0
+ sethostent_r_proto=0
echo "Disabling sethostent_r, cannot determine prototype." >&4 ;;
* ) case "$sethostent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$setlocale_r_proto" in
''|0) d_setlocale_r=undef
- setlocale_r_proto=0
+ setlocale_r_proto=0
echo "Disabling setlocale_r, cannot determine prototype." >&4 ;;
* ) case "$setlocale_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$setnetent_r_proto" in
''|0) d_setnetent_r=undef
- setnetent_r_proto=0
+ setnetent_r_proto=0
echo "Disabling setnetent_r, cannot determine prototype." >&4 ;;
* ) case "$setnetent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$setprotoent_r_proto" in
''|0) d_setprotoent_r=undef
- setprotoent_r_proto=0
+ setprotoent_r_proto=0
echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;;
* ) case "$setprotoent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$setpwent_r_proto" in
''|0) d_setpwent_r=undef
- setpwent_r_proto=0
+ setpwent_r_proto=0
echo "Disabling setpwent_r, cannot determine prototype." >&4 ;;
* ) case "$setpwent_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$setservent_r_proto" in
''|0) d_setservent_r=undef
- setservent_r_proto=0
+ setservent_r_proto=0
echo "Disabling setservent_r, cannot determine prototype." >&4 ;;
* ) case "$setservent_r_proto" in
REENTRANT_PROTO*) ;;
eval $setvar
$rm_try
+: see if snprintf exists
+set snprintf d_snprintf
+eval $inlibc
+
+: see if vsnprintf exists
+set vsnprintf d_vsnprintf
+eval $inlibc
+
+case "$d_snprintf-$d_vsnprintf" in
+"$define-$define")
+ $cat <<EOM
+Checking whether your snprintf() and vsnprintf() work okay...
+EOM
+ $cat >try.c <<'EOCP'
+/* v?snprintf testing logic courtesy of Russ Allbery.
+ * According to C99:
+ * - if the buffer is too short it still must be \0-terminated
+ * - if the buffer is too short the potentially required length
+ * must be returned and not -1
+ * - if the buffer is NULL the potentially required length
+ * must be returned and not -1 or core dump
+ */
+#include <stdio.h>
+#include <stdarg.h>
+
+char buf[2];
+
+int test (char *format, ...)
+{
+ va_list args;
+ int count;
+
+ va_start (args, format);
+ count = vsnprintf (buf, sizeof buf, format, args);
+ va_end (args);
+ return count;
+}
+
+int main ()
+{
+ return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
+ && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
+}
+EOCP
+ set try
+ if eval $compile; then
+ `$run ./try`
+ case "$?" in
+ 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;;
+ *) cat <<EOM >&4
+Your snprintf() and snprintf() don't seem to be working okay.
+EOM
+ d_snprintf="$undef"
+ d_vsnprintf="$undef"
+ ;;
+ esac
+ else
+ echo "(I can't seem to compile the test program--assuming they don't)"
+ d_snprintf="$undef"
+ d_vsnprintf="$undef"
+ fi
+ $rm_try
+ ;;
+esac
+
: see if sockatmark exists
set sockatmark d_sockatmark
eval $inlibc
esac
case "$srand48_r_proto" in
''|0) d_srand48_r=undef
- srand48_r_proto=0
+ srand48_r_proto=0
echo "Disabling srand48_r, cannot determine prototype." >&4 ;;
* ) case "$srand48_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$srandom_r_proto" in
''|0) d_srandom_r=undef
- srandom_r_proto=0
+ srandom_r_proto=0
echo "Disabling srandom_r, cannot determine prototype." >&4 ;;
* ) case "$srandom_r_proto" in
REENTRANT_PROTO*) ;;
*) echo "No, it doesn't." ;;
esac
-
: see if struct statfs knows about f_flags
case "$d_statfs_s" in
define)
Checking how to access stdio streams by file descriptor number...
EOM
case "$stdio_stream_array" in
-'') $cat >try.c <<EOCP
+'') $cat >try.c <<EOCP
#include <stdio.h>
int main() {
if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
do
set try -DSTDIO_STREAM_ARRAY=$s
if eval $compile; then
- case "`$run ./try`" in
+ case "`$run ./try`" in
yes) stdio_stream_array=$s; break ;;
esac
fi
esac
case "$strerror_r_proto" in
''|0) d_strerror_r=undef
- strerror_r_proto=0
+ strerror_r_proto=0
echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
* ) case "$strerror_r_proto" in
REENTRANT_PROTO*) ;;
set strtod d_strtod
eval $inlibc
+: see if strtod_l exists
+set strtod_l d_strtod_l
+eval $inlibc
+
: see if strtol exists
set strtol d_strtol
eval $inlibc
check("-1", 18446744073709551615UL, 0);
check("-18446744073709551614", 2, 0);
check("-18446744073709551615", 1, 0);
- check("-18446744073709551616", 18446744073709551615UL, ERANGE);
+ check("-18446744073709551616", 18446744073709551615UL, ERANGE);
check("-18446744073709551617", 18446744073709551615UL, ERANGE);
#endif
EOCP
check("-1", 4294967295UL, 0);
check("-4294967294", 2, 0);
check("-4294967295", 1, 0);
- check("-4294967296", 4294967295UL, ERANGE);
+ check("-4294967296", 4294967295UL, ERANGE);
check("-4294967297", 4294967295UL, ERANGE);
#endif
EOCP
check("-1", 18446744073709551615ULL, 0);
check("-18446744073709551614", 2LL, 0);
check("-18446744073709551615", 1LL, 0);
- check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
+ check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
#endif
if (!bad)
check("-1", 18446744073709551615ULL, 0);
check("-18446744073709551614", 2LL, 0);
check("-18446744073709551615", 1LL, 0);
- check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
+ check("-18446744073709551616", 18446744073709551615ULL, ERANGE);
check("-18446744073709551617", 18446744073709551615ULL, ERANGE);
#endif
if (!bad)
}
int main() {
- char * main_buffer;
- char save_main_buffer[1000];
- pthread_t subthread;
- pthread_attr_t attr;
-
- main_buffer = nl_langinfo_l(CODESET, newlocale(LC_ALL_MASK, "C", 0));
-
- /* If too large for our generous allowance, just assume we don't have
- * it. */
- if (strlen(main_buffer) >= sizeof(save_main_buffer)) {
- exit(1);
- }
+ char * main_buffer;
+ char save_main_buffer[1000];
+ pthread_t subthread;
+ pthread_attr_t attr;
- strcpy(save_main_buffer, main_buffer);
+ main_buffer = nl_langinfo_l(CODESET, newlocale(LC_ALL_MASK, "C", 0));
- if (pthread_attr_init(&attr) != 0) {
- exit(1);
- }
+ /* If too large for our generous allowance, just assume we don't have
+ * it. */
+ if (strlen(main_buffer) >= sizeof(save_main_buffer)) {
+ exit(1);
+ }
- if (pthread_create(&subthread, &attr, thread_start, NULL) != 0) {
- exit(1);
- }
+ strcpy(save_main_buffer, main_buffer);
- if (pthread_join(subthread, NULL) != 0) {
- exit(1);
- }
+ if (pthread_attr_init(&attr) != 0) {
+ exit(1);
+ }
- exit(! (strcmp(main_buffer, save_main_buffer) == 0));
+ if (pthread_create(&subthread, &attr, thread_start, NULL) != 0) {
+ exit(1);
+ }
+
+ if (pthread_join(subthread, NULL) != 0) {
+ exit(1);
+ }
+
+ exit(! (strcmp(main_buffer, save_main_buffer) == 0));
}
EOCP
case "$usethreads" in
define)
- set try
- if eval $compile; then
- echo "Your system has nl_langinfo_l()..." >&4
- if $run ./try; then
- echo "and it is thread-safe (just as I'd hoped)." >&4
- d_thread_safe_nl_langinfo_l="$define"
- echo "$d_thread_safe_nl_langinfo_l" >&4
- else
- echo "but it isn't thread-safe, so we won't use it." >&4
- fi
- else
- echo "your system does not have nl_langinfo_l()" >&4
- fi
- ;;
+ set try
+ if eval $compile; then
+ echo "Your system has nl_langinfo_l()..." >&4
+ if $run ./try; then
+ echo "and it is thread-safe (just as I'd hoped)." >&4
+ d_thread_safe_nl_langinfo_l="$define"
+ echo "$d_thread_safe_nl_langinfo_l" >&4
+ else
+ echo "but it isn't thread-safe, so we won't use it." >&4
+ fi
+ else
+ echo "your system does not have nl_langinfo_l()" >&4
+ fi
+ ;;
*) echo "Since threads aren't selected, we won't bother looking for nl_langinfo_l()" >&4
esac
if test X"$d_thread_safe_nl_langinfo_l" = X; then
esac
case "$tmpnam_r_proto" in
''|0) d_tmpnam_r=undef
- tmpnam_r_proto=0
+ tmpnam_r_proto=0
echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;;
* ) case "$tmpnam_r_proto" in
REENTRANT_PROTO*) ;;
esac
case "$ttyname_r_proto" in
''|0) d_ttyname_r=undef
- ttyname_r_proto=0
+ ttyname_r_proto=0
echo "Disabling ttyname_r, cannot determine prototype." >&4 ;;
* ) case "$ttyname_r_proto" in
REENTRANT_PROTO*) ;;
#ifndef DB_VERSION_MAJOR
u_int32_t hash_cb (const void* ptr, size_t size)
{
+ return 0;
}
HASHINFO info;
int main()
#ifndef DB_VERSION_MAJOR
size_t prefix_cb (const DBT *key1, const DBT *key2)
{
+ return 0;
}
BTREEINFO info;
int main()
fi
: check for fflush NULL behavior
case "$fflushNULL" in
-'') set try -DTRY_FFLUSH_NULL $output
+'') set try -DTRY_FFLUSH_NULL $output
if eval $compile; then
$run ./try 2>/dev/null
code="$?"
EOM
: now check for fflushall behaviour
case "$fflushall" in
- '') set try -DTRY_FFLUSH_ALL $output
+ '') set try -DTRY_FFLUSH_ALL $output
if eval $compile; then
$cat >&4 <<EOM
(Now testing the other method--but note that this also may fail.)
echo "(I can't compile the test program--guessing $gidsize.)" >&4
fi
-
: Check if GID is signed
echo " "
case "$gidtype" in
echo "(I can't compile the test program--guessing unsigned.)" >&4
fi
-
: Check 64bit sizes
echo " "
case "$yyy" in
12345678901)
sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
- sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
+ sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
echo "We will use %d."
;;
esac
case "$yyy" in
12345678901)
sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
- sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
+ sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
echo "We will use %ld."
;;
esac
case "$yyy" in
12345678901)
sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
- sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
+ sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
echo "We will use the C9X style."
;;
esac
case "$yyy" in
12345678901)
sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
- sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
+ sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
echo "We will use %Ld."
;;
esac
case "$yyy" in
12345678901)
sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
- sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
+ sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
echo "We will use the %lld style."
;;
esac
case "$yyy" in
12345678901)
sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
- sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
+ sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
echo "We will use %qd."
;;
esac
yes)
echo "Generating a list of signal names and numbers..." >&4
. ./signal_cmd
- sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
- sig_name=`$awk 'BEGIN { printf "ZERO " }
- !/^NSIG/ { printf "%s ", $1 }' signal.lst`
- sig_num=`$awk 'BEGIN { printf "0 " }
- !/^NSIG/ { printf "%d ", $2 }' signal.lst`
- sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
- !/^NSIG/ { printf "\"%s\", ", $1 }
- END { printf "0\n" }' signal.lst`
- sig_num_init=`$awk 'BEGIN { printf "0, " }
- !/^NSIG/ { printf "%d, ", $2}
- END { printf "0\n"}' signal.lst`
+ sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
+ sig_name=`$awk 'BEGIN { printf "ZERO " }
+ !/^NSIG/ { printf "%s ", $1 }' signal.lst`
+ sig_num=`$awk 'BEGIN { printf "0 " }
+ !/^NSIG/ { printf "%d ", $2 }' signal.lst`
+ sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
+ !/^NSIG/ { printf "\"%s\", ", $1 }
+ END { printf "0\n" }' signal.lst`
+ sig_num_init=`$awk 'BEGIN { printf "0, " }
+ !/^NSIG/ { printf "%d, ", $2}
+ END { printf "0\n"}' signal.lst`
;;
esac
echo "The following $sig_count signals are available:"
echo "(I can't compile the test program--guessing $sizesize.)" >&4
fi
-
: check for socklen_t
echo " "
echo "Checking to see if you have socklen_t..." >&4
echo "(I can't compile the test program--guessing unsigned.)" >&4
fi
-
: Check format string for UID
echo " "
$echo "Checking the format string to be used for uids..." >&4
printf "#ifdef _%s\nprintf(\"_%s=%%s\\n\", STRINGIFY(_%s));\n#endif\n", $1, $1, $1
printf "#ifdef __%s\nprintf(\"__%s=%%s\\n\", STRINGIFY(__%s));\n#endif\n", $1, $1, $1
printf "#ifdef __%s__\nprintf(\"__%s__=%%s\\n\", STRINGIFY(__%s__));\n#endif\n", $1, $1, $1
-}' >> try.c
+}' >> try.c
echo 'return 0;}' >> try.c
EOSH
cat <<EOSH >> Cppsym.try
$define) avail_ext="$avail_ext $xxx" ;;
esac
;;
- I18N/Langinfo|i18n_lan)
- case "$i_langinfo$d_nl_langinfo" in
- $define$define) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
IPC/SysV|ipc/sysv)
: XXX Do we need a useipcsysv variable here
case "${d_msg}${d_sem}${d_shm}" in
true|$define|y) avail_ext="$avail_ext $xxx" ;;
esac
;;
+ I18N/Langinfo|langinfo)
+ case "$uselanginfo" in
+ true|define|y) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
Sys/Syslog|sys/syslog)
case $osname in
amigaos) ;; # not really very useful on AmigaOS
d_PRIx64='$d_PRIx64'
d_SCNfldbl='$d_SCNfldbl'
d__fwalk='$d__fwalk'
+d_accept4='$d_accept4'
d_access='$d_access'
d_accessx='$d_accessx'
d_acosh='$d_acosh'
d_drand48_r='$d_drand48_r'
d_drand48proto='$d_drand48proto'
d_dup2='$d_dup2'
+d_dup3='$d_dup3'
d_duplocale='$d_duplocale'
d_eaccess='$d_eaccess'
d_endgrent='$d_endgrent'
d_mkdir='$d_mkdir'
d_mkdtemp='$d_mkdtemp'
d_mkfifo='$d_mkfifo'
+d_mkostemp='$d_mkostemp'
d_mkstemp='$d_mkstemp'
d_mkstemps='$d_mkstemps'
d_mktime64='$d_mktime64'
d_pause='$d_pause'
d_perl_otherlibdirs='$d_perl_otherlibdirs'
d_phostname='$d_phostname'
+d_pipe2='$d_pipe2'
d_pipe='$d_pipe'
d_poll='$d_poll'
d_portable='$d_portable'
d_sigsetjmp='$d_sigsetjmp'
d_sin6_scope_id='$d_sin6_scope_id'
d_sitearch='$d_sitearch'
+d_snprintf='$d_snprintf'
d_sockaddr_in6='$d_sockaddr_in6'
d_sockaddr_sa_len='$d_sockaddr_sa_len'
d_sockatmark='$d_sockatmark'
d_strlcpy='$d_strlcpy'
d_strnlen='$d_strnlen'
d_strtod='$d_strtod'
+d_strtod_l='$d_strtod_l'
d_strtol='$d_strtol'
d_strtold='$d_strtold'
d_strtold_l='$d_strtold_l'
d_void_closedir='$d_void_closedir'
d_voidsig='$d_voidsig'
d_voidtty='$d_voidtty'
+d_vsnprintf='$d_vsnprintf'
d_wait4='$d_wait4'
d_waitpid='$d_waitpid'
d_wcscmp='$d_wcscmp'
usefaststdio='$usefaststdio'
useithreads='$useithreads'
usekernprocpathname='$usekernprocpathname'
+uselanginfo='$uselanginfo'
uselargefiles='$uselargefiles'
uselongdouble='$uselongdouble'
usemallocwrap='$usemallocwrap'