From: Jarkko Hietaniemi Date: Tue, 22 Feb 2000 22:03:26 +0000 (+0000) Subject: Add socklen_t probe; Configure maintenance. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13b3f78704810709000ac835e0f07862c2b103e2;p=p5sagit%2Fp5-mst-13.2.git Add socklen_t probe; Configure maintenance. p4raw-id: //depot/cfgperl@5213 --- diff --git a/Configure b/Configure index 6548e9b..9152997 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 Tue Feb 22 16:38:07 EET 2000 [metaconfig 3.0 PL70] +# Generated on Tue Feb 22 23:55:00 EET 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ </dev/null|tail -1` @@ -9310,7 +9316,7 @@ else echo " No, it doesn't." >&4 fi $rm -f try try.* -set d_int64t +set d_int64_t eval $setvar : Look for isascii @@ -9648,7 +9654,7 @@ case "$intsize" in eval $setvar quadkind=3 ;; - *) case "$d_int64t" in + *) case "$d_int64_t" in define) val=int64_t set quadtype @@ -10937,6 +10943,29 @@ set d_sigsetjmp eval $setvar $rm -f try.c try +: check for socklen_t +echo " " +$echo $n "Checking to see if your system supports socklen_t...$c" >&4 +$cat >try.c < +#$d_socket HAS_SOCKET +#ifdef HAS_SOCKET +#include +#endif +int main() { socklen_t x = 16; } +EOCP +set try +if eval $compile; then + val="$define" + echo " Yes, it does." >&4 +else + val="$undef" + echo " No, it doesn't." >&4 +fi +$rm -f try try.* +set d_socklen_t +eval $setvar + : see if sys/stat.h is available set sys/stat.h i_sysstat eval $inhdr @@ -14696,7 +14725,7 @@ d_htonl='$d_htonl' d_iconv='$d_iconv' d_index='$d_index' d_inetaton='$d_inetaton' -d_int64t='$d_int64t' +d_int64_t='$d_int64_t' d_isascii='$d_isascii' d_killpg='$d_killpg' d_lchown='$d_lchown' @@ -14811,6 +14840,7 @@ d_shmget='$d_shmget' d_sigaction='$d_sigaction' d_sigsetjmp='$d_sigsetjmp' d_socket='$d_socket' +d_socklen_t='$d_socklen_t' d_sockpair='$d_sockpair' d_sqrtl='$d_sqrtl' d_statblks='$d_statblks' @@ -15035,6 +15065,7 @@ libs='$libs' libsdirs='$libsdirs' libsfiles='$libsfiles' libsfound='$libsfound' +libspath='$libspath' libswanted='$libswanted' line='$line' lint='$lint' diff --git a/Porting/Glossary b/Porting/Glossary index 4a1e9cc..89f6943 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -796,7 +796,7 @@ d_inetaton (d_inetaton.U): indicates to the C program that the inet_aton() function is available to parse IP address "dotted-quad" strings. -d_int64t (d_int64t.U): +d_int64_t (d_int64_t.U): This symbol will be defined if the C compiler supports int64_t. d_isascii (d_isascii.U): @@ -1359,6 +1359,9 @@ d_socket (d_socket.U): This variable conditionally defines HAS_SOCKET, which indicates that the BSD socket interface is supported. +d_socklen_t (d_socklen_t.U): + This symbol will be defined if the C compiler supports socklen_t. + d_sockpair (d_socket.U): This variable conditionally defines the HAS_SOCKETPAIR symbol, which indicates that the BSD socketpair() is supported. @@ -2384,6 +2387,9 @@ libsfound (libs.U): This variable holds the full pathnames of the libraries we found and accepted. +libspath (libs.U): + This variable holds the directory names probed for libraries. + libswanted (Myinit.U): This variable holds a list of all the libraries we want to search. The order is chosen to pick up the c library diff --git a/Porting/config.sh b/Porting/config.sh index b9be075..073beac 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Tue Feb 22 07:10:02 EET 2000 +# Configuration time: Tue Feb 22 23:57:36 EET 2000 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -59,7 +59,7 @@ ccflags='-pthread -std -DLANGUAGE_C' ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_BSD=1 SYSTYPE_BSD=1 unix=1' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Tue Feb 22 07:10:02 EET 2000' +cf_time='Tue Feb 22 23:57:36 EET 2000' charsize='1' chgrp='' chmod='' @@ -197,7 +197,7 @@ d_htonl='define' d_iconv='undef' d_index='undef' d_inetaton='define' -d_int64t='undef' +d_int64_t='undef' d_isascii='define' d_killpg='define' d_lchown='define' @@ -312,6 +312,7 @@ d_shmget='define' d_sigaction='define' d_sigsetjmp='define' d_socket='define' +d_socklen_t='undef' d_sockpair='define' d_sqrtl='define' d_statblks='define' @@ -524,7 +525,7 @@ known_extensions='B ByteLoader DB_File Data/Dumper Devel/DProf Devel/Peek Fcntl ksh='' large='' ld='ld' -lddlflags='-shared -expect_unresolved "*" -msym -s' +lddlflags='-shared -expect_unresolved "*" -msym -std -s' ldflags='' ldlibpthname='LD_LIBRARY_PATH' less='less' @@ -536,6 +537,7 @@ libs='-lgdbm -ldbm -ldb -lm -lpthread -lexc' libsdirs=' /usr/shlib /usr/ccs/lib' libsfiles=' libgdbm.so libdbm.a libdb.so libm.so libpthread.so libexc.so' libsfound=' /usr/shlib/libgdbm.so /usr/ccs/lib/libdbm.a /usr/shlib/libdb.so /usr/shlib/libm.so /usr/shlib/libpthread.so /usr/shlib/libexc.so' +libspath=' /usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib' libswanted='sfio socket inet nsl nm gdbm dbm db malloc dld ld sun m cposix posix ndir dir crypt sec ucb BSD x pthread exc' line='' lint='' diff --git a/Porting/config_H b/Porting/config_H index cc65dcc..16fb48f 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Tue Feb 22 07:10:02 EET 2000 + * Configuration time: Tue Feb 22 23:57:36 EET 2000 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -1922,6 +1922,12 @@ /*#define HAS_MSG_PROXY / **/ #define HAS_SCM_RIGHTS /**/ +/* HAS_SOCKLEN_T: + * This symbol will defined if the C compiler supports socklen_t. + * Usually the needs to be included. + */ +/*#define HAS_SOCKLEN_T / **/ + /* HAS_SQRTL: * This symbol, if defined, indicates that the sqrtl routine is * available to do long double square roots. @@ -2345,6 +2351,12 @@ */ #define I_SYSLOG /**/ +/* I_SYSMODE: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#define I_SYSMODE /**/ + /* I_SYS_MOUNT: * This symbol, if defined, indicates that exists and * should be included. @@ -2368,6 +2380,12 @@ */ #define I_SYSUIO /**/ +/* I_SYSUTSNAME: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#define I_SYSUTSNAME /**/ + /* I_SYS_VFS: * This symbol, if defined, indicates that exists and * should be included. @@ -2966,16 +2984,4 @@ #define PERL_XS_APIVERSION "5.5.660" #define PERL_PM_APIVERSION "5.005" -/* I_SYSMODE: - * This symbol, if defined, indicates that exists and - * should be included. - */ -#define I_SYSMODE /**/ - -/* I_SYS_UTSNAME: - * This symbol, if defined, indicates that exists and - * should be included. - */ -#define I_SYS_UTSNAME /**/ - #endif diff --git a/config_h.SH b/config_h.SH index e440274..4d679f2 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1620,7 +1620,7 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * Usually the needs to be included, but sometimes * is enough. */ -#$d_int64t HAS_INT64_T /**/ +#$d_int64_t HAS_INT64_T /**/ /* HAS_ISASCII: * This manifest constant lets the C program know that isascii @@ -1936,6 +1936,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$d_msg_proxy HAS_MSG_PROXY /**/ #$d_scm_rights HAS_SCM_RIGHTS /**/ +/* HAS_SOCKLEN_T: + * This symbol will defined if the C compiler supports socklen_t. + * Usually the needs to be included. + */ +#$d_socklen_t HAS_SOCKLEN_T /**/ + /* HAS_SQRTL: * This symbol, if defined, indicates that the sqrtl routine is * available to do long double square roots. @@ -2359,6 +2365,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$i_syslog I_SYSLOG /**/ +/* I_SYSMODE: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_sysmode I_SYSMODE /**/ + /* I_SYS_MOUNT: * This symbol, if defined, indicates that exists and * should be included. @@ -2382,6 +2394,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$i_sysuio I_SYSUIO /**/ +/* I_SYSUTSNAME: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_sysutsname I_SYSUTSNAME /**/ + /* I_SYS_VFS: * This symbol, if defined, indicates that exists and * should be included. @@ -2980,17 +2998,5 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #define PERL_XS_APIVERSION "$xs_apiversion" #define PERL_PM_APIVERSION "$pm_apiversion" -/* I_SYSMODE: - * This symbol, if defined, indicates that exists and - * should be included. - */ -#$i_sysmode I_SYSMODE /**/ - -/* I_SYS_UTSNAME: - * This symbol, if defined, indicates that exists and - * should be included. - */ -#$i_sysutsname I_SYS_UTSNAME /**/ - #endif !GROK!THIS! diff --git a/doio.c b/doio.c index a7b6a90..5f284db 100644 --- a/doio.c +++ b/doio.c @@ -71,12 +71,17 @@ # endif #endif -/* Put this after #includes because defines _XOPEN_*. */ +/* Put this after #includes because defines _XOPEN_*. + * Sock_size_t is defined identically in pp_sys.c. */ #ifndef Sock_size_t -# if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) || defined(__GLIBC__) -# define Sock_size_t Size_t +# ifdef HAS_SOCKLEN_T +# define Sock_size_t socklen_t # else -# define Sock_size_t int +# if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) || defined(__GLIBC__) +# define Sock_size_t Size_t +# else +# define Sock_size_t int +# endif # endif #endif diff --git a/ext/Sys/Hostname/Hostname.xs b/ext/Sys/Hostname/Hostname.xs index c2ab9bd..f104383 100644 --- a/ext/Sys/Hostname/Hostname.xs +++ b/ext/Sys/Hostname/Hostname.xs @@ -18,7 +18,7 @@ # endif #endif -#ifdef I_SYS_UTSNAME +#ifdef I_SYSUTSNAME # include #endif diff --git a/pp_sys.c b/pp_sys.c index f9db38e..d5c5426 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -118,12 +118,17 @@ extern int h_errno; # define vfork fork #endif -/* Put this after #includes because defines _XOPEN_*. */ +/* Put this after #includes because defines _XOPEN_*. + * Sock_size_t is defined identically in doio.c. */ #ifndef Sock_size_t -# if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) || defined(__GLIBC__) -# define Sock_size_t Size_t +# ifdef HAS_SOCKLEN_T +# define Sock_size_t socklen_t # else -# define Sock_size_t int +# if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) || defined(__GLIBC__) +# define Sock_size_t Size_t +# else +# define Sock_size_t int +# endif # endif #endif