From 2ef53570a0a9292278fc7d34d7d21270dd5ac7f0 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 4 Jun 2001 16:48:33 +0000 Subject: [PATCH] Configure tweaks; add prototype probes, make the cpp symbols probe to cast, not whine; test for %Ld and %Lf before %lld and %llf because the L is the ANSI way. p4raw-id: //depot/perl@10434 --- Configure | 237 ++++++++++++++++++++++++++------------------- config_h.SH | 41 ++++++++ configure.com | 17 ++-- epoc/config.sh | 23 +++-- ext/ODBM_File/ODBM_File.xs | 10 ++ perl.h | 18 ++++ pod/perltoc.pod | 104 ++++++++++---------- uconfig.h | 41 ++++++++ uconfig.sh | 5 + vos/config.alpha.def | 25 +++-- vos/config.ga.def | 21 ++-- win32/config.bc | 15 ++- win32/config.gc | 15 ++- win32/config.vc | 15 ++- x2p/str.c | 12 +-- 15 files changed, 395 insertions(+), 204 deletions(-) diff --git a/Configure b/Configure index 0c3bcd5..f00762f 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Mon Jun 4 06:11:38 EET DST 2001 [metaconfig 3.0 PL70] +# Generated on Mon Jun 4 18:28:57 EET DST 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ < int main() { long double d = 123.456; - printf("%.3llf\n", d); + printf("%.3Lf\n", d); } EOCP set try @@ -8048,9 +8053,9 @@ EOCP yyy=`./try$exe_ext` case "$yyy" in 123.456) - sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; - sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"'; - echo "We will use %llf." + sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; + sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"'; + echo "We will use %Lf." ;; esac fi @@ -8062,7 +8067,7 @@ if $test X"$sPRIfldbl" = X; then #include int main() { long double d = 123.456; - printf("%.3Lf\n", d); + printf("%.3llf\n", d); } EOCP set try @@ -8070,9 +8075,9 @@ EOCP yyy=`./try$exe_ext` case "$yyy" in 123.456) - sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; - sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"'; - echo "We will use %Lf." + sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; + sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"'; + echo "We will use %llf." ;; esac fi @@ -9005,6 +9010,60 @@ $rm -f dbl_dig.? set d_dbl_dig eval $setvar +hasproto='varname=$1; func=$2; shift; shift; +while $test $# -ge 2; do + case "$1" in + $define) echo "#include <$2>";; + esac ; + shift 2; +done > try.c; +$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null; +if $contains "$func.*(" tryout.c >/dev/null 2>&1; then + echo "$func() prototype found."; + val="$define"; +else + echo "$func() prototype NOT found."; + val="$undef"; +fi; +set $varname; +eval $setvar; +$rm -f try.c tryout.c' + +: see if dbm.h is available +: see if dbmclose exists +set dbmclose d_dbmclose +eval $inlibc + +case "$d_dbmclose" in +$define) + set dbm.h i_dbm + eval $inhdr + case "$i_dbm" in + $define) + val="$undef" + set i_rpcsvcdbm + eval $setvar + ;; + *) set rpcsvc/dbm.h i_rpcsvcdbm + eval $inhdr + ;; + esac + ;; +*) echo "We won't be including " + val="$undef" + set i_dbm + eval $setvar + val="$undef" + set i_rpcsvcdbm + eval $setvar + ;; +esac + +: see if prototype for dbminit is available +echo " " +set d_dbminitproto dbminit $i_dbm dbm.h +eval $hasproto + : see if difftime exists set difftime d_difftime eval $inlibc @@ -9194,25 +9253,6 @@ $rm -f fred fred.? dyna.$dlext dyna.? tmp-dyna.? set d_dlsymun eval $setvar -hasproto='varname=$1; func=$2; shift; shift; -while $test $# -ge 2; do - case "$1" in - $define) echo "#include <$2>";; - esac ; - shift 2; -done > try.c; -$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null; -if $contains "$func.*(" tryout.c >/dev/null 2>&1; then - echo "$func() prototype found."; - val="$define"; -else - echo "$func() prototype NOT found."; - val="$undef"; -fi; -set $varname; -eval $setvar; -$rm -f try.c tryout.c' - : see if prototype for drand48 is available echo " " set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h @@ -9746,6 +9786,35 @@ eval $inlibc set flock d_flock eval $inlibc +: see if this is a sys/file.h system +val='' +set sys/file.h val +eval $inhdr + +: do we need to include sys/file.h ? +case "$val" in +"$define") + echo " " + if $h_sysfile; then + val="$define" + echo "We'll be including ." >&4 + else + val="$undef" + echo "We won't be including ." >&4 + fi + ;; +*) + h_sysfile=false + ;; +esac +set i_sysfile +eval $setvar + +: see if prototype for flock is available +echo " " +set d_flockproto flock $i_sysfile sys/file.h +eval $hasproto + : see if fork exists set fork d_fork eval $inlibc @@ -11879,6 +11948,11 @@ $rm -f try.c try set sockatmark d_sockatmark eval $inlibc +: see if prototype for sockatmark is available +echo " " +set d_sockatmarkproto sockatmark $d_socket sys/socket.h +eval $hasproto + : see if socks5_init exists set socks5_init d_socks5_init eval $inlibc @@ -12556,6 +12630,11 @@ eval $inlibc set syscall d_syscall eval $inlibc +: see if prototype for syscall is available +echo " " +set d_syscallproto syscall $i_unistd unistd.h +eval $hasproto + : see if sysconf exists set sysconf d_sysconf eval $inlibc @@ -12794,6 +12873,11 @@ eval $inlibc set usleep d_usleep eval $inlibc +: see if prototype for usleep is available +echo " " +set d_usleepproto usleep $i_unistd unistd.h +eval $hasproto + : see if ustat exists set ustat d_ustat eval $inlibc @@ -13821,13 +13905,13 @@ EOCP fi fi -if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then - $cat >try.c <<'EOCP' +if $test X"$sPRId64" = X -a X"$quadtype" != X; then + $cat >try.c < #include int main() { - long long q = 12345678901LL; /* AIX cc requires the LL suffix. */ - printf("%lld\n", q); + $quadtype q = 12345678901; + printf("%Ld\n", q); } EOCP set try @@ -13835,21 +13919,21 @@ EOCP yyy=`./try$exe_ext` case "$yyy" in 12345678901) - sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"'; - sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"'; - echo "We will use the %lld style." + sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"'; + sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"'; + echo "We will use %Ld." ;; esac fi fi -if $test X"$sPRId64" = X -a X"$quadtype" != X; then - $cat >try.c <try.c <<'EOCP' #include #include int main() { - $quadtype q = 12345678901; - printf("%Ld\n", q); + long long q = 12345678901LL; /* AIX cc requires the LL suffix. */ + printf("%lld\n", q); } EOCP set try @@ -13857,9 +13941,9 @@ EOCP yyy=`./try$exe_ext` case "$yyy" in 12345678901) - sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"'; - sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"'; - echo "We will use %Ld." + sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"'; + sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"'; + echo "We will use the %lld style." ;; esac fi @@ -15226,60 +15310,6 @@ case "$yacc" in ;; esac -: see if dbm.h is available -: see if dbmclose exists -set dbmclose d_dbmclose -eval $inlibc - -case "$d_dbmclose" in -$define) - set dbm.h i_dbm - eval $inhdr - case "$i_dbm" in - $define) - val="$undef" - set i_rpcsvcdbm - eval $setvar - ;; - *) set rpcsvc/dbm.h i_rpcsvcdbm - eval $inhdr - ;; - esac - ;; -*) echo "We won't be including " - val="$undef" - set i_dbm - eval $setvar - val="$undef" - set i_rpcsvcdbm - eval $setvar - ;; -esac - -: see if this is a sys/file.h system -val='' -set sys/file.h val -eval $inhdr - -: do we need to include sys/file.h ? -case "$val" in -"$define") - echo " " - if $h_sysfile; then - val="$define" - echo "We'll be including ." >&4 - else - val="$undef" - echo "We won't be including ." >&4 - fi - ;; -*) - h_sysfile=false - ;; -esac -set i_sysfile -eval $setvar - : see if fcntl.h is there val='' set fcntl.h val @@ -15503,12 +15533,12 @@ $awk \\ EOSH cat <<'EOSH' >> Cppsym.try 'length($1) > 0 { - printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 - printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 - printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 - printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", (long)%s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", (long)_%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", (long)__%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", (long)__%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 }' >> try.c -echo '}' >> try.c +echo 'return 0;}' >> try.c EOSH cat <> Cppsym.try ccflags="$ccflags" @@ -16246,6 +16276,7 @@ d_crypt='$d_crypt' d_csh='$d_csh' d_cuserid='$d_cuserid' d_dbl_dig='$d_dbl_dig' +d_dbminitproto='$d_dbminitproto' d_difftime='$d_difftime' d_dirnamlen='$d_dirnamlen' d_dlerror='$d_dlerror' @@ -16273,6 +16304,7 @@ d_fds_bits='$d_fds_bits' d_fgetpos='$d_fgetpos' d_flexfnam='$d_flexfnam' d_flock='$d_flock' +d_flockproto='$d_flockproto' d_fork='$d_fork' d_fpathconf='$d_fpathconf' d_fpos64_t='$d_fpos64_t' @@ -16459,6 +16491,7 @@ d_sigaction='$d_sigaction' d_sigprocmask='$d_sigprocmask' d_sigsetjmp='$d_sigsetjmp' d_sockatmark='$d_sockatmark' +d_sockatmarkproto='$d_sockatmarkproto' d_socket='$d_socket' d_socklen_t='$d_socklen_t' d_sockpair='$d_sockpair' @@ -16495,6 +16528,7 @@ d_strxfrm='$d_strxfrm' d_suidsafe='$d_suidsafe' d_symlink='$d_symlink' d_syscall='$d_syscall' +d_syscallproto='$d_syscallproto' d_sysconf='$d_sysconf' d_sysernlst='$d_sysernlst' d_syserrlst='$d_syserrlst' @@ -16513,6 +16547,7 @@ d_umask='$d_umask' d_uname='$d_uname' d_union_semun='$d_union_semun' d_usleep='$d_usleep' +d_usleepproto='$d_usleepproto' d_ustat='$d_ustat' d_vendorarch='$d_vendorarch' d_vendorbin='$d_vendorbin' diff --git a/config_h.SH b/config_h.SH index 3f1009c..b8a2481 100644 --- a/config_h.SH +++ b/config_h.SH @@ -3356,6 +3356,22 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define PERL_XS_APIVERSION "$xs_apiversion" #define PERL_PM_APIVERSION "$pm_apiversion" +/* HAS_DBMINIT_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the dbminit() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int dbminit(char *); + */ +#$d_dbminitproto HAS_DBMINIT_PROTO /**/ + +/* HAS_FLOCK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the flock() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int flock(int, int); + */ +#$d_flockproto HAS_FLOCK_PROTO /**/ + /* HAS_REALPATH: * This symbol, if defined, indicates that the realpath routine is * available to do resolve paths. @@ -3375,6 +3391,14 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_sockatmark HAS_SOCKATMARK /**/ +/* HAS_SOCKATMARK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the sockatmark() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int sockatmark _((int)); + */ +#$d_sockatmarkproto HAS_SOCKATMARK_PROTO /**/ + /* HAS_SETRESGID_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the setresgid() function. Otherwise, it is up @@ -3397,11 +3421,28 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_strftime HAS_STRFTIME /**/ +/* HAS_SYSCALL_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the syscall() function. Otherwise, it is up + * to the program to supply one. Good guesses are + * extern int syscall(int, ...); + * extern int syscall(long, ...); + */ +#$d_syscallproto HAS_SYSCALL_PROTO /**/ + /* U32_ALIGNMENT_REQUIRED: * This symbol, if defined, indicates that you must access * character data through U32-aligned pointers. */ #$d_u32align U32_ALIGNMENT_REQUIRED /**/ +/* HAS_USLEEP_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the usleep() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int usleep(useconds_t); + */ +#$d_usleepproto HAS_USLEEP_PROTO /**/ + #endif !GROK!THIS! diff --git a/configure.com b/configure.com index 56c2000..aae059e 100644 --- a/configure.com +++ b/configure.com @@ -4970,13 +4970,12 @@ $ WC "cppminus='" + cppminus + "'" $ WC "cpprun='" + cpprun + "'" $ WC "cppstdin='" + cppstdin + "'" $ WC "crosscompile='undef'" -$ WC "d__fwalk='undef'" $ WC "d_Gconvert='my_gconvert(x,n,t,b)'" -$ WC "d_PRId64='" + d_PRId64 + "'" $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'" $ WC "d_PRIFldbl='" + d_PRIFUldbl + "'" $ WC "d_PRIGldbl='" + d_PRIGUldbl + "'" $ WC "d_PRIX64='" + d_PRIXU64 + "'" +$ WC "d_PRId64='" + d_PRId64 + "'" $ WC "d_PRIeldbl='" + d_PRIeldbl + "'" $ WC "d_PRIfldbl='" + d_PRIfldbl + "'" $ WC "d_PRIgldbl='" + d_PRIgldbl + "'" @@ -4984,6 +4983,7 @@ $ WC "d_PRIo64='" + d_PRIo64 + "'" $ WC "d_PRIu64='" + d_PRIu64 + "'" $ WC "d_PRIx64='" + d_PRIx64 + "'" $ WC "d_SCNfldbl='" + d_SCNfldbl + "'" +$ WC "d__fwalk='undef'" $ WC "d_access='" + d_access + "'" $ WC "d_accessx='undef'" $ WC "d_alarm='define'" @@ -4995,8 +4995,8 @@ $ WC "d_bcmp='" + d_bcmp + "'" $ WC "d_bcopy='" + d_bcopy + "'" $ WC "d_bincompat3='undef'" $ WC "d_bincompat5005='undef'" -$ WC "d_bsdgetpgrp='undef'" $! WC "d_bsdpgrp='undef'" +$ WC "d_bsdgetpgrp='undef'" $ WC "d_bsdsetpgrp='undef'" $ WC "d_bzero='" + d_bzero + "'" $ WC "d_casti32='define'" @@ -5011,6 +5011,7 @@ $ WC "d_crypt='define'" $ WC "d_csh='undef'" $ WC "d_cuserid='define'" $ WC "d_dbl_dig='define'" +$ WC "d_dbminitproto='undef'" $ WC "d_difftime='define'" $ WC "d_dirnamlen='define'" $ WC "d_dlerror='undef'" @@ -5035,6 +5036,7 @@ $ WC "d_fd_set='" + d_fd_set + "'" $ WC "d_fgetpos='define'" $ WC "d_flexfnam='define'" $ WC "d_flock='undef'" +$ WC "d_flockproto='undef'" $ WC "d_fork='undef'" $ WC "d_fpathconf='" + d_fpathconf + "'" $ WC "d_fpos64_t='" + d_fpos64_t + "'" @@ -5198,8 +5200,6 @@ $ WC "d_setproctitle='" + d_setproctitle + "'" $ WC "d_setpwent='define'" $ WC "d_setregid='undef'" $ WC "d_setresgid='undef'" -$ WC "d_sresproto='undef'" -$ WC "d_sresgproto='undef'" $ WC "d_setresuid='undef'" $ WC "d_setreuid='undef'" $ WC "d_setrgid='undef'" @@ -5214,12 +5214,15 @@ $ WC "d_sigaction='" + d_sigaction + "'" $ WC "d_sigprocmask='" + d_sigprocmask + "'" $ WC "d_sigsetjmp='" + d_sigsetjmp + "'" $ WC "d_sockatmark='undef'" +$ WC "d_sockatmarkproto='undef'" $ WC "d_socket='" + d_socket + "'" $ WC "d_socklen_t='" + d_socklen_t + "'" $ WC "d_sockpair='undef'" $ WC "d_socks5_init='undef'" $ WC "d_sqrtl='define'" $ WC "d_sresgproto='undef'" +$ WC "d_sresgproto='undef'" +$ WC "d_sresproto='undef'" $ WC "d_sresuproto='undef'" $ WC "d_statblks='undef'" $ WC "d_statfs_f_flags='undef'" @@ -5227,8 +5230,8 @@ $ WC "d_statfs_s='undef'" $ WC "d_statfsflags='undef'" $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'" $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'" -$ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'" $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'" +$ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'" $ WC "d_stdio_stream_array='undef'" $ WC "d_stdiobase='" + d_stdiobase + "'" $ WC "d_stdstdio='" + d_stdstdio + "'" @@ -5250,6 +5253,7 @@ $ WC "d_strxfrm='" + d_strxfrm + "'" $ WC "d_suidsafe='undef'" $ WC "d_symlink='undef'" $ WC "d_syscall='undef'" +$ WC "d_syscallproto='undef'" $ WC "d_sysconf='" + d_sysconf + "'" $ WC "d_syserrlst='undef'" $ WC "d_system='define'" @@ -5267,6 +5271,7 @@ $ WC "d_uname='" + d_uname + "'" $ WC "d_union_semun='undef'" $ WC "d_unlink_all_versions='undef'" $ WC "d_usleep='undef'" +$ WC "d_usleepproto='undef'" $ WC "d_ustat='undef'" $ WC "d_vendorarch='undef'" $ WC "d_vendorlib='undef'" diff --git a/epoc/config.sh b/epoc/config.sh index 9330d2b..b2e3fe6 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -79,7 +79,6 @@ cppsymbols='' crosscompile='define' cryptlib='' csh='csh' -d__fwalk='undef' d_Gconvert='epoc_gcvt((x),(n),(b))' d_PRIEUldbl='undef' d_PRIFUldbl='undef' @@ -93,6 +92,7 @@ d_PRIi64='undef' d_PRIo64='undef' d_PRIu64='undef' d_PRIx64='undef' +d__fwalk='undef' d_access='undef' d_accessx='undef' d_alarm='undef' @@ -115,12 +115,13 @@ d_chroot='undef' d_chsize='undef' d_closedir='undef' d_cmsghdr_s='undef' -d_const='define' d_cmsghdr_s='undef' +d_const='define' d_crypt='undef' d_csh='undef' d_cuserid='undef' d_dbl_dig='undef' +d_dbminitproto='undef' d_difftime='define' d_dirnamlen='undef' d_dlerror='undef' @@ -148,6 +149,7 @@ d_fds_bits='undef' d_fgetpos='define' d_flexfnam='define' d_flock='undef' +d_flockproto='undef' d_fork='undef' d_fpathconf='undef' d_fpos64_t='undef' @@ -238,9 +240,9 @@ d_msg_oob='undef' d_msg_peek='undef' d_msg_proxy='undef' d_msgctl='undef' -d_msghdr_s='undef' d_msgget='undef' d_msghdr_s='undef' +d_msghdr_s='undef' d_msgrcv='undef' d_msgsnd='undef' d_msync='undef' @@ -272,9 +274,9 @@ d_qgcvt='undef' d_readdir='define' d_readlink='undef' d_readv='undef' -d_recvmsg='undef' d_readv='undef' d_recvmsg='undef' +d_recvmsg='undef' d_rename='define' d_rewinddir='define' d_rmdir='define' @@ -306,14 +308,12 @@ d_setpent='undef' d_setpgid='undef' d_setpgrp2='undef' d_setpgrp='undef' -d_setproctitle='undef' d_setprior='undef' +d_setproctitle='undef' d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' -d_sresgproto='undef' -d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' @@ -331,17 +331,20 @@ d_sigaction='undef' d_sigprocmask='undef' d_sigsetjmp='undef' d_sockatmark='undef' +d_sockatmarkproto='undef' d_socket='define' d_sockpair='undef' d_socks5_init='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_statblks='define' d_statfs='undef' d_statfsflags='define' d_statvfs='undef' d_stdio_cnt_lval='define' d_stdio_ptr_lval='define' -d_stdio_ptr_lval_sets_cnt='undef' d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' d_stdio_stream_array='undef' d_stdiobase='undef' d_stdstdio='undef' @@ -355,12 +358,13 @@ d_strtod='define' d_strtol='define' d_strtoq='undef' d_strtoul='define' -d_strtouq='undef' d_strtoull='undef' +d_strtouq='undef' d_strxfrm='define' d_suidsafe='undef' d_symlink='undef' d_syscall='undef' +d_syscallproto='undef' d_sysconf='define' d_sysernlst='undef' d_syserrlst='undef' @@ -378,6 +382,7 @@ d_ualarm='undef' d_umask='undef' d_uname='undef' d_union_semun='undef' +d_usleepproto='undef' d_vendorlib='undef' d_vfork='undef' d_void_closedir='undef' diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs index 27174ef..3724dae 100644 --- a/ext/ODBM_File/ODBM_File.xs +++ b/ext/ODBM_File/ODBM_File.xs @@ -15,6 +15,16 @@ # endif #endif +#ifndef HAS_DBMINIT_PROTO +int dbminit(char* filename); +int dbmclose(void); +datum fetch(datum key); +int store(datum key, datum dat); +int delete(datum key); +datum firstkey(void); +datum nextkey(datum key); +#endif + #ifdef DBM_BUG_DUPLICATE_FREE /* * DBM on at least Ultrix and HPUX call dbmclose() from dbminit(), diff --git a/perl.h b/perl.h index 69579d8..b0524fb 100644 --- a/perl.h +++ b/perl.h @@ -506,6 +506,14 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # include #endif +#ifndef HAS_SYSCALL_PROTO +int syscall(int, ...); +#endif + +#ifndef HAS_USLEEP_PROTO +int usleep(useconds_t); +#endif + #ifdef PERL_MICRO /* Last chance to export Perl_my_swap */ # define MYSWAP #endif @@ -757,6 +765,12 @@ typedef struct perl_mstats perl_mstats_t; # endif #endif +/* sockatmark() is so new that many places might have it hidden + * behind some -D_BLAH_BLAH_SOURCE guard. */ +#ifndef HAS_SOCKATMARK_PROTO +int sockatmark(int); +#endif + #ifdef SETERRNO # undef SETERRNO /* SOCKS might have defined this */ #endif @@ -3643,6 +3657,10 @@ typedef struct am_table_short AMTS; # include #endif +#ifndef HAS_FLOCK_PROTO +int flock(int fd, int op); +#endif + #ifndef O_RDONLY /* Assume UNIX defaults */ # define O_RDONLY 0000 diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 8138823..5244b17 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -8474,35 +8474,35 @@ C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, @@ -8523,25 +8523,27 @@ C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, -C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C +C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, +C, C, C, C, C, +C, C =item e @@ -9402,16 +9404,20 @@ constant_types memEQ_clause NAME, CHECKED_AT, INDENT -return_clause VALUE, TYPE, INDENT, MACRO +assign INDENT, TYPE, VALUE.. + +return_clause VALUE, TYPE, INDENT, MACRO, DEFAULT params WHAT -C_constant SUBNAME, DEFAULT_TYPE, TYPES, INDENT, NAMELEN, ITEM.., name, -type, value, macro +dump_names PACKAGE, SUBNAME, DEFAULT_TYPE, TYPES, INDENT, ITEM.. + +C_constant PACKAGE, SUBNAME, DEFAULT_TYPE, TYPES, INDENT, NAMELEN, ITEM.., +name, type, value, macro, default XS_constant PACKAGE, TYPES, SUBNAME, C_SUBNAME -autoload PACKAGE, VERSION +autoload PACKAGE, VERSION, AUTOLOADER =over 4 diff --git a/uconfig.h b/uconfig.h index 9eff617..0c788f1 100644 --- a/uconfig.h +++ b/uconfig.h @@ -3332,6 +3332,22 @@ #define PERL_XS_APIVERSION "5.005" #define PERL_PM_APIVERSION "5.005" +/* HAS_DBMINIT_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the dbminit() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int dbminit(char *); + */ +/*#define HAS_DBMINIT_PROTO / **/ + +/* HAS_FLOCK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the flock() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int flock(int, int); + */ +/*#define HAS_FLOCK_PROTO / **/ + /* HAS_REALPATH: * This symbol, if defined, indicates that the realpath routine is * available to do resolve paths. @@ -3351,6 +3367,14 @@ */ /*#define HAS_SOCKATMARK / **/ +/* HAS_SOCKATMARK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the sockatmark() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int sockatmark _((int)); + */ +/*#define HAS_SOCKATMARK_PROTO / **/ + /* HAS_SETRESGID_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the setresgid() function. Otherwise, it is up @@ -3373,10 +3397,27 @@ */ /*#define HAS_STRFTIME / **/ +/* HAS_SYSCALL_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the syscall() function. Otherwise, it is up + * to the program to supply one. Good guesses are + * extern int syscall(int, ...); + * extern int syscall(long, ...); + */ +/*#define HAS_SYSCALL_PROTO / **/ + /* U32_ALIGNMENT_REQUIRED: * This symbol, if defined, indicates that you must access * character data through U32-aligned pointers. */ #define U32_ALIGNMENT_REQUIRED /**/ +/* HAS_USLEEP_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the usleep() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern int usleep(useconds_t); + */ +/*#define HAS_USLEEP_PROTO / **/ + #endif diff --git a/uconfig.sh b/uconfig.sh index 4b6e2a6..a6765d4 100755 --- a/uconfig.sh +++ b/uconfig.sh @@ -58,6 +58,7 @@ d_crypt='undef' d_csh='undef' d_cuserid='undef' d_dbl_dig='undef' +d_dbminitproto='undef' d_difftime='undef' d_dirnamlen='undef' d_dlerror='undef' @@ -85,6 +86,7 @@ d_fds_bits='undef' d_fgetpos='undef' d_flexfnam='undef' d_flock='undef' +d_flockproto='undef' d_fork='define' d_fpathconf='undef' d_fpos64_t='undef' @@ -272,6 +274,7 @@ d_sigaction='undef' d_sigprocmask='undef' d_sigsetjmp='undef' d_sockatmark='undef' +d_sockatmarkproto='undef' d_socket='undef' d_socklen_t='undef' d_sockpair='undef' @@ -308,6 +311,7 @@ d_strxfrm='undef' d_suidsafe='undef' d_symlink='undef' d_syscall='undef' +d_syscallproto='undef' d_sysconf='undef' d_sysernlst='' d_syserrlst='undef' @@ -326,6 +330,7 @@ d_umask='undef' d_uname='undef' d_union_semun='undef' d_usleep='undef' +d_usleepproto='undef' d_ustat='undef' d_vendorarch='undef' d_vendorbin='undef' diff --git a/vos/config.alpha.def b/vos/config.alpha.def index 9c5554b..e532eac 100644 --- a/vos/config.alpha.def +++ b/vos/config.alpha.def @@ -16,6 +16,11 @@ $cppminus='-' $cpprun='cc -E -' $cppstdin='cc -E' $crosscompile='undef' +$d_Gconvert='sprintf((b),"%.*g",(n),(x))' +$d_PRIeldbl='define' +$d_PRIfldbl='define' +$d_PRIgldbl='define' +$d_SCNfldbl='define' $d__fwalk='undef' $d_access='undef' $d_accessx='undef' @@ -42,6 +47,7 @@ $d_crypt='undef' $d_csh='undef' $d_cuserid='undef' $d_dbl_dig='define' +$d_dbminitproto='undef' $d_difftime='define' $d_dirnamlen='undef' $d_dlerror='undef' @@ -65,6 +71,7 @@ $d_fd_set='undef' $d_fgetpos='define' $d_flexfnam='define' $d_flock='undef' +$d_flockproto='undef' $d_fork='undef' $d_fpathconf='define' $d_fpos64_t='undef' @@ -76,7 +83,6 @@ $d_fstatfs='undef' $d_fstatvfs='undef' $d_fsync='undef' $d_ftello='undef' -$d_Gconvert='sprintf((b),"%.*g",(n),(x))' $d_getcwd='define' $d_getespwnam='undef' $d_getfsstat='undef' @@ -145,9 +151,9 @@ $d_memmove='define' $d_memset='define' $d_mkdir='define' $d_mkdtemp='undef' +$d_mkfifo='define' $d_mkstemp='undef' $d_mkstemps='undef' -$d_mkfifo='define' $d_mktime='define' $d_mmap='undef' $d_modfl='undef' @@ -170,14 +176,11 @@ $d_old_pthread_create_joinable='undef' $d_oldpthreads='undef' $d_open3='define' $d_pathconf='define' -$d_perl_otherlibdirs='undef' $d_pause='define' +$d_perl_otherlibdirs='undef' $d_phostname='undef' $d_pipe='define' $d_poll='define' -$d_PRIeldbl='define' -$d_PRIfldbl='define' -$d_PRIgldbl='define' $d_pthread_yield='undef' $d_pwage='undef' $d_pwchange='undef' @@ -201,7 +204,6 @@ $d_sanemcmp='define' $d_sbrkproto='undef' $d_sched_yield='undef' $d_scm_rights='undef' -$d_SCNfldbl='define' $d_seekdir='undef' $d_select='define' $d_sem='undef' @@ -226,8 +228,6 @@ $d_setpwent='undef' $d_setregid='undef' $d_setresgid='undef' $d_setresuid='undef' -$d_sresgproto='undef' -$d_sresuproto='undef' $d_setreuid='undef' $d_setrgid='undef' $d_setruid='undef' @@ -241,17 +241,20 @@ $d_sigaction='undef' $d_sigprocmask='undef' $d_sigsetjmp='undef' $d_sockatmark='undef' +$d_sockatmarkproto='undef' $d_socket='define' $d_sockpair='undef' $d_socks5_init='undef' $d_sqrtl='undef' +$d_sresgproto='undef' +$d_sresuproto='undef' $d_statblks='undef' $d_statfs_f_flags='undef' $d_statfs_s='undef' $d_stdio_cnt_lval='define' $d_stdio_ptr_lval='define' -$d_stdio_ptr_lval_sets_cnt='undef' $d_stdio_ptr_lval_nochange_cnt='undef' +$d_stdio_ptr_lval_sets_cnt='undef' $d_stdio_stream_array='define' $d_stdiobase='define' $d_stdstdio='define' @@ -273,6 +276,7 @@ $d_strxfrm='define' $d_suidsafe='define' $d_symlink='define' $d_syscall='undef' +$d_syscallproto='undef' $d_sysconf='define' $d_syserrlst='define' $d_system='define' @@ -289,6 +293,7 @@ $d_umask='define' $d_uname='define' $d_union_semun='undef' $d_usleep='undef' +$d_usleepproto='undef' $d_ustat='undef' $d_vendorarch='define' $d_vendorlib='define' diff --git a/vos/config.ga.def b/vos/config.ga.def index 402428d..56410e2 100644 --- a/vos/config.ga.def +++ b/vos/config.ga.def @@ -16,6 +16,11 @@ $cppminus='-' $cpprun='cc -E -' $cppstdin='cc -E' $crosscompile='undef' +$d_Gconvert='sprintf((b),"%.*g",(n),(x))' +$d_PRIeldbl='define' +$d_PRIfldbl='define' +$d_PRIgldbl='define' +$d_SCNfldbl='define' $d__fwalk='undef' $d_access='define' $d_accessx='undef' @@ -42,6 +47,7 @@ $d_crypt='undef' $d_csh='define' $d_cuserid='undef' $d_dbl_dig='define' +$d_dbminitproto='undef' $d_difftime='define' $d_dirnamlen='undef' $d_dlerror='undef' @@ -65,6 +71,7 @@ $d_fd_set='undef' $d_fgetpos='define' $d_flexfnam='define' $d_flock='undef' +$d_flockproto='undef' $d_fork='define' $d_fpathconf='define' $d_fpos64_t='undef' @@ -76,7 +83,6 @@ $d_fstatfs='undef' $d_fstatvfs='undef' $d_fsync='undef' $d_ftello='undef' -$d_Gconvert='sprintf((b),"%.*g",(n),(x))' $d_getcwd='define' $d_getespwnam='undef' $d_getfsstat='undef' @@ -145,9 +151,9 @@ $d_memmove='define' $d_memset='define' $d_mkdir='define' $d_mkdtemp='undef' +$d_mkfifo='define' $d_mkstemp='undef' $d_mkstemps='undef' -$d_mkfifo='define' $d_mktime='define' $d_mmap='define' $d_modfl='undef' @@ -170,14 +176,11 @@ $d_old_pthread_create_joinable='undef' $d_oldpthreads='undef' $d_open3='define' $d_pathconf='define' -$d_perl_otherlibdirs='undef' $d_pause='define' +$d_perl_otherlibdirs='undef' $d_phostname='undef' $d_pipe='define' $d_poll='define' -$d_PRIeldbl='define' -$d_PRIfldbl='define' -$d_PRIgldbl='define' $d_pthread_yield='undef' $d_pwage='undef' $d_pwchange='undef' @@ -201,7 +204,6 @@ $d_sanemcmp='define' $d_sbrkproto='undef' $d_sched_yield='undef' $d_scm_rights='undef' -$d_SCNfldbl='define' $d_seekdir='undef' $d_select='define' $d_sem='undef' @@ -239,6 +241,7 @@ $d_sigaction='define' $d_sigprocmask='define' $d_sigsetjmp='define' $d_sockatmark='undef' +$d_sockatmarkproto='undef' $d_socket='define' $d_sockpair='undef' $d_socks5_init='undef' @@ -248,8 +251,8 @@ $d_statfs_f_flags='undef' $d_statfs_s='undef' $d_stdio_cnt_lval='define' $d_stdio_ptr_lval='define' -$d_stdio_ptr_lval_sets_cnt='undef' $d_stdio_ptr_lval_nochange_cnt='undef' +$d_stdio_ptr_lval_sets_cnt='undef' $d_stdio_stream_array='define' $d_stdiobase='define' $d_stdstdio='define' @@ -271,6 +274,7 @@ $d_strxfrm='define' $d_suidsafe='define' $d_symlink='define' $d_syscall='undef' +$d_syscallproto='undef' $d_sysconf='define' $d_syserrlst='define' $d_system='define' @@ -287,6 +291,7 @@ $d_umask='define' $d_uname='define' $d_union_semun='undef' $d_usleep='undef' +$d_usleepproto='undef' $d_ustat='undef' $d_vendorarch='define' $d_vendorlib='define' diff --git a/win32/config.bc b/win32/config.bc index 9511d19..b8ee924 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -71,7 +71,6 @@ cppsymbols='' crosscompile='undef' cryptlib='' csh='undef' -d__fwalk='undef' d_Gconvert='gcvt((x),(n),(b))' d_PRIEUldbl='undef' d_PRIFUldbl='undef' @@ -85,6 +84,7 @@ d_PRIi64='undef' d_PRIo64='undef' d_PRIu64='undef' d_PRIx64='undef' +d__fwalk='undef' d_access='define' d_accessx='undef' d_alarm='undef' @@ -106,12 +106,13 @@ d_chown='undef' d_chroot='undef' d_chsize='define' d_closedir='define' -d_const='define' d_cmsghdr_s='undef' +d_const='define' d_crypt='undef' d_csh='undef' d_cuserid='undef' d_dbl_dig='define' +d_dbminitproto='undef' d_difftime='define' d_dirnamlen='define' d_dlerror='define' @@ -139,6 +140,7 @@ d_fds_bits='define' d_fgetpos='define' d_flexfnam='define' d_flock='define' +d_flockproto='undef' d_fork='undef' d_fpathconf='undef' d_fpos64_t='undef' @@ -306,8 +308,6 @@ d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' -d_sresgproto='undef' -d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' @@ -325,19 +325,22 @@ d_sigaction='undef' d_sigprocmask='undef' d_sigsetjmp='undef' d_sockatmark='undef' +d_sockatmarkproto='undef' d_socket='define' d_socklen_t='undef' d_sockpair='undef' d_socks5_init='undef' d_sqrtl='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_statblks='undef' d_statfs_f_flags='undef' d_statfs_s='undef' d_statvfs='undef' d_stdio_cnt_lval='define' d_stdio_ptr_lval='define' -d_stdio_ptr_lval_sets_cnt='undef' d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' d_stdio_stream_array='undef' d_stdiobase='define' d_stdstdio='define' @@ -359,6 +362,7 @@ d_strxfrm='define' d_suidsafe='undef' d_symlink='undef' d_syscall='undef' +d_syscallproto='undef' d_sysconf='undef' d_sysernlst='' d_syserrlst='define' @@ -377,6 +381,7 @@ d_umask='define' d_uname='define' d_union_semun='define' d_usleep='undef' +d_usleepproto='undef' d_ustat='undef' d_vendorarch='undef' d_vendorbin='undef' diff --git a/win32/config.gc b/win32/config.gc index b0dd780..61438a0 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -71,7 +71,6 @@ cppsymbols='' crosscompile='undef' cryptlib='' csh='undef' -d__fwalk='undef' d_Gconvert='sprintf((b),"%.*g",(n),(x))' d_PRIEUldbl='undef' d_PRIFUldbl='undef' @@ -85,6 +84,7 @@ d_PRIi64='undef' d_PRIo64='undef' d_PRIu64='undef' d_PRIx64='undef' +d__fwalk='undef' d_access='define' d_accessx='undef' d_alarm='undef' @@ -106,12 +106,13 @@ d_chown='undef' d_chroot='undef' d_chsize='define' d_closedir='define' -d_const='define' d_cmsghdr_s='undef' +d_const='define' d_crypt='undef' d_csh='undef' d_cuserid='undef' d_dbl_dig='define' +d_dbminitproto='undef' d_difftime='define' d_dirnamlen='define' d_dlerror='define' @@ -139,6 +140,7 @@ d_fds_bits='define' d_fgetpos='define' d_flexfnam='define' d_flock='define' +d_flockproto='undef' d_fork='undef' d_fpathconf='undef' d_fpos64_t='undef' @@ -306,8 +308,6 @@ d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' -d_sresgproto='undef' -d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' @@ -325,19 +325,22 @@ d_sigaction='undef' d_sigprocmask='undef' d_sigsetjmp='undef' d_sockatmark='undef' +d_sockatmarkproto='undef' d_socket='define' d_socklen_t='undef' d_sockpair='undef' d_socks5_init='undef' d_sqrtl='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_statblks='undef' d_statfs_f_flags='undef' d_statfs_s='undef' d_statvfs='undef' d_stdio_cnt_lval='define' d_stdio_ptr_lval='define' -d_stdio_ptr_lval_sets_cnt='undef' d_stdio_ptr_lval_nochange_cnt='define' +d_stdio_ptr_lval_sets_cnt='undef' d_stdio_stream_array='undef' d_stdiobase='define' d_stdstdio='define' @@ -359,6 +362,7 @@ d_strxfrm='define' d_suidsafe='undef' d_symlink='undef' d_syscall='undef' +d_syscallproto='undef' d_sysconf='undef' d_sysernlst='' d_syserrlst='define' @@ -377,6 +381,7 @@ d_umask='define' d_uname='define' d_union_semun='define' d_usleep='undef' +d_usleepproto='undef' d_ustat='undef' d_vendorarch='undef' d_vendorbin='undef' diff --git a/win32/config.vc b/win32/config.vc index eab4380..a7e5a1c 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -71,7 +71,6 @@ cppsymbols='' crosscompile='undef' cryptlib='' csh='undef' -d__fwalk='undef' d_Gconvert='sprintf((b),"%.*g",(n),(x))' d_PRIEUldbl='undef' d_PRIFUldbl='undef' @@ -85,6 +84,7 @@ d_PRIi64='undef' d_PRIo64='undef' d_PRIu64='undef' d_PRIx64='undef' +d__fwalk='undef' d_access='define' d_accessx='undef' d_alarm='undef' @@ -106,12 +106,13 @@ d_chown='undef' d_chroot='undef' d_chsize='define' d_closedir='define' -d_const='define' d_cmsghdr_s='undef' +d_const='define' d_crypt='undef' d_csh='undef' d_cuserid='undef' d_dbl_dig='define' +d_dbminitproto='undef' d_difftime='define' d_dirnamlen='define' d_dlerror='define' @@ -139,6 +140,7 @@ d_fds_bits='define' d_fgetpos='define' d_flexfnam='define' d_flock='define' +d_flockproto='undef' d_fork='undef' d_fpathconf='undef' d_fpos64_t='undef' @@ -306,8 +308,6 @@ d_setpwent='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' -d_sresgproto='undef' -d_sresuproto='undef' d_setreuid='undef' d_setrgid='undef' d_setruid='undef' @@ -325,19 +325,22 @@ d_sigaction='undef' d_sigprocmask='undef' d_sigsetjmp='undef' d_sockatmark='undef' +d_sockatmarkproto='undef' d_socket='define' d_socklen_t='undef' d_sockpair='undef' d_socks5_init='undef' d_sqrtl='undef' +d_sresgproto='undef' +d_sresuproto='undef' d_statblks='undef' d_statfs_f_flags='undef' d_statfs_s='undef' d_statvfs='undef' d_stdio_cnt_lval='define' d_stdio_ptr_lval='define' -d_stdio_ptr_lval_sets_cnt='undef' d_stdio_ptr_lval_nochange_cnt='define' +d_stdio_ptr_lval_sets_cnt='undef' d_stdio_stream_array='undef' d_stdiobase='define' d_stdstdio='define' @@ -359,6 +362,7 @@ d_strxfrm='define' d_suidsafe='undef' d_symlink='undef' d_syscall='undef' +d_syscallproto='undef' d_sysconf='undef' d_sysernlst='' d_syserrlst='define' @@ -377,6 +381,7 @@ d_umask='define' d_uname='define' d_union_semun='define' d_usleep='undef' +d_usleepproto='undef' d_ustat='undef' d_vendorarch='undef' d_vendorbin='undef' diff --git a/x2p/str.c b/x2p/str.c index 15f341f..47dc9ec 100644 --- a/x2p/str.c +++ b/x2p/str.c @@ -77,7 +77,7 @@ void str_nset(register STR *str, register char *ptr, register int len) { GROWSTR(&(str->str_ptr), &(str->str_len), len + 1); - bcopy(ptr,str->str_ptr,len); + memcpy(str->str_ptr,ptr,len); str->str_cur = len; *(str->str_ptr+str->str_cur) = '\0'; str->str_nok = 0; /* invalidate number */ @@ -93,7 +93,7 @@ str_set(register STR *str, register char *ptr) ptr = ""; len = strlen(ptr); GROWSTR(&(str->str_ptr), &(str->str_len), len + 1); - bcopy(ptr,str->str_ptr,len+1); + memcpy(str->str_ptr,ptr,len+1); str->str_cur = len; str->str_nok = 0; /* invalidate number */ str->str_pok = 1; /* validate pointer */ @@ -107,7 +107,7 @@ str_chop(register STR *str, register char *ptr) /* like set but assuming ptr is if (!(str->str_pok)) str_2ptr(str); str->str_cur -= (ptr - str->str_ptr); - bcopy(ptr,str->str_ptr, str->str_cur + 1); + memcpy(str->str_ptr, ptr, str->str_cur + 1); str->str_nok = 0; /* invalidate number */ str->str_pok = 1; /* validate pointer */ } @@ -118,7 +118,7 @@ str_ncat(register STR *str, register char *ptr, register int len) if (!(str->str_pok)) str_2ptr(str); GROWSTR(&(str->str_ptr), &(str->str_len), str->str_cur + len + 1); - bcopy(ptr,str->str_ptr+str->str_cur,len); + memcpy(str->str_ptr+str->str_cur, ptr, len); str->str_cur += len; *(str->str_ptr+str->str_cur) = '\0'; str->str_nok = 0; /* invalidate number */ @@ -145,7 +145,7 @@ str_cat(register STR *str, register char *ptr) str_2ptr(str); len = strlen(ptr); GROWSTR(&(str->str_ptr), &(str->str_len), str->str_cur + len + 1); - bcopy(ptr,str->str_ptr+str->str_cur,len+1); + memcpy(str->str_ptr+str->str_cur, ptr, len+1); str->str_cur += len; str->str_nok = 0; /* invalidate number */ str->str_pok = 1; /* validate pointer */ @@ -197,7 +197,7 @@ str_new(int len) } else { str = (STR *) safemalloc(sizeof(STR)); - bzero((char*)str,sizeof(STR)); + memset((char*)str,0,sizeof(STR)); } if (len) GROWSTR(&(str->str_ptr), &(str->str_len), len + 1); -- 1.8.3.1