This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Be sure to use the correct type, so bits do not get wrapped
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Tue, 8 Jul 2008 12:02:48 +0000 (12:02 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Tue, 8 Jul 2008 12:02:48 +0000 (12:02 +0000)
p4raw-id: //depot/perl@34112

Configure
Porting/Glossary
Porting/config.sh
Porting/config_H

index 1a9b290..939bcfc 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -25,7 +25,7 @@
 
 # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
 #
-# Generated on Mon Jul  7 22:34:20 CEST 2008 [metaconfig 3.5 PL0]
+# Generated on Tue Jul  8 13:24:59 CEST 2008 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -20021,18 +20021,18 @@ int main () {
   time_t pt = 0;
 
   for (i = 0; i < 78; i++) {
-    time_t t = (1 << i) - 1;
+    time_t t = ((time_t)1 << i) - 1;
     tmp = gmtime (&t);
     if (tmp == NULL || tmp->tm_year < y) {
       i--;
-      printf ("%d\n", pt);
+      printf ("%ld\n", pt);
       return (i);
       }
 
     y = tmp->tm_year;
     pt = t;
     }
-  printf ("%d\n", pt);
+  printf ("%ld\n", pt);
   return (0);
   }
 EOCP
@@ -20056,18 +20056,18 @@ int main () {
   time_t pt = 0;
 
   for (i = 0; i < 78; i++) {
-    time_t t = - (1 << i);
+    time_t t = - ((time_t)1 << i);
     tmp = gmtime (&t);
     if (tmp == NULL || tmp->tm_year > y) {
       i--;
-      printf ("%d\n", pt);
+      printf ("%ld\n", pt);
       return (i);
       }
 
     y = tmp->tm_year;
     pt = t;
     }
-  printf ("%d\n", pt);
+  printf ("%ld\n", pt);
   return (0);
   }
 EOCP
index 64d1e5e..337e27e 100644 (file)
@@ -3655,7 +3655,7 @@ make_set_make (make.U):
 
        make_set_make="MAKE=$make"      # if it doesn't.
 
-       This uses a comment character to distinguish a
+       This uses a comment character so that we can distinguish a
        'set' value (from a previous config.sh or Configure '-D' option)
        from an uncomputed value.
 
index 8556888..e9cef88 100644 (file)
@@ -496,6 +496,7 @@ d_tcsetpgrp='define'
 d_telldir='define'
 d_telldirproto='define'
 d_time='define'
+d_timegm='define'
 d_times='define'
 d_tm_tm_gmtoff='define'
 d_tm_tm_zone='define'
@@ -883,6 +884,8 @@ rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'
 rmail=''
 run=''
 runnm='false'
+sGMTIME_max='2147483647'
+sGMTIME_min='-2147483648'
 sPRIEUldbl='"LE"'
 sPRIFUldbl='"LF"'
 sPRIGUldbl='"LG"'
index f74dc67..5caaaa2 100644 (file)
@@ -17,9 +17,9 @@
 /*
  * Package name      : perl5
  * Source directory  : .
- * Configuration time: Wed Jan 23 09:43:56 CET 2008
+ * Configuration time: Tue Jul  8 13:49:11 CEST 2008
  * Configured by     : merijn
- * Target system     : linux nb09 2.6.22.13-0.3-default #1 smp 20071119 15:02:58 utc i686 i686 i386 gnulinux 
+ * Target system     : linux nb09 2.6.22.18-0.2-default #1 smp 2008-06-09 13:53:20 +0200 i686 i686 i386 gnulinux 
  */
 
 #ifndef _config_h_
  */
 /*#define      HAS_CHSIZE              / **/
 
+/* HAS_CRYPT:
+ *     This symbol, if defined, indicates that the crypt routine is available
+ *     to encrypt passwords and the like.
+ */
+#define HAS_CRYPT              /**/
+
 /* HAS_CTERMID:
  *     This symbol, if defined, indicates that the ctermid routine is
  *     available to generate filename for terminal.
  */
 #define HAS_DLERROR    /**/
 
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ *     This symbol, if defined, indicates that the bug that prevents
+ *     setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ *     This symbol, if defined, indicates that the C program should
+ *     check the script that it is executing for setuid/setgid bits, and
+ *     attempt to emulate setuid/setgid on systems that have disabled
+ *     setuid #! scripts because the kernel can't do it securely.
+ *     It is up to the package designer to make sure that this emulation
+ *     is done securely.  Among other things, it should do an fstat on
+ *     the script it just opened to make sure it really is a setuid/setgid
+ *     script, it should make sure the arguments passed correspond exactly
+ *     to the argument on the #! line, and it should not trust any
+ *     subprocesses to which it must pass the filename rather than the
+ *     file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW        / **/
+/*#define DOSUID               / **/
+
 /* HAS_DUP2:
  *     This symbol, if defined, indicates that the dup2 routine is
  *     available to duplicate file descriptors.
  */
 #define HAS_PIPE               /**/
 
+/* HAS_POLL:
+ *     This symbol, if defined, indicates that the poll routine is
+ *     available to poll active file descriptors.  Please check I_POLL and
+ *     I_SYS_POLL to know which header should be included as well.
+ */
+#define HAS_POLL               /**/
+
 /* HAS_READDIR:
  *     This symbol, if defined, indicates that the readdir routine is
  *     available to read directory entries. You may have to include
  */
 #define HAS_SETEUID            /**/
 
+/* HAS_SETGROUPS:
+ *     This symbol, if defined, indicates that the setgroups() routine is
+ *     available to set the list of process groups.  If unavailable, multiple
+ *     groups are probably not supported.
+ */
+#define HAS_SETGROUPS          /**/
+
 /* HAS_SETLINEBUF:
  *     This symbol, if defined, indicates that the setlinebuf routine is
  *     available to change stderr or stdout from block-buffered or unbuffered
  */
 #define HAS_WCTOMB             /**/
 
+/* Groups_t:
+ *     This symbol holds the type used for the second argument to
+ *     getgroups() and setgroups().  Usually, this is the same as
+ *     gidtype (gid_t) , but sometimes it isn't.
+ *     It can be int, ushort, gid_t, etc... 
+ *     It may be necessary to include <sys/types.h> to get any 
+ *     typedef'ed information.  This is only required if you have
+ *     getgroups() or setgroups()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
 /* I_ARPA_INET:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <arpa/inet.h> to get inet_addr and friends declarations.
  *     This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
  *     should be included.
  */
-/*#define I_DBM        / **/
+#define I_DBM  /**/
 /*#define I_RPCSVC_DBM / **/
 
 /* I_DLFCN:
  */
 #define I_SYS_PARAM            /**/
 
+/* I_SYS_POLL:
+ *     This symbol, if defined, indicates that the program may include
+ *     <sys/poll.h>.  When I_POLL is also defined, it's probably safest
+ *     to only include <poll.h>.
+ */
+#define I_SYS_POLL     /**/
+
 /* I_SYS_RESOURCE:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <sys/resource.h>.
  *     feature tests from Configure are generally more reliable.
  */
 #define OSNAME "linux"         /**/
-#define OSVERS "2.6.22.13-0.3-default"         /**/
+#define OSVERS "2.6.22.18-0.2-default"         /**/
 
 /* ARCHLIB:
  *     This variable, if defined, holds the name of the directory in
  *     This symbol contains the ~name expanded version of ARCHLIB, to be used
  *     in programs that are not prepared to deal with ~ expansion at run-time.
  */
-#define ARCHLIB "/opt/perl/lib/5.11.0/i686-linux-64int"                /**/
-#define ARCHLIB_EXP "/opt/perl/lib/5.11.0/i686-linux-64int"            /**/
+#define ARCHLIB "/pro/lib/perl5/5.11.0/i686-linux-64int"               /**/
+#define ARCHLIB_EXP "/pro/lib/perl5/5.11.0/i686-linux-64int"           /**/
 
 /* ARCHNAME:
  *     This symbol holds a string representing the architecture name.
  *     This symbol, if defined, indicates that we'd like to relocate entries
  *     in @INC at run time based on the location of the perl binary.
  */
-#define BIN "/opt/perl/bin"    /**/
-#define BIN_EXP "/opt/perl/bin"        /**/
+#define BIN "/pro/bin" /**/
+#define BIN_EXP "/pro/bin"     /**/
 #define PERL_RELOCATABLE_INC "undef"           /**/
 
 /* CAT2:
 #if 42 == 1
 #define CAT2(a,b)      a/**/b
 #define STRINGIFY(a)   "a"
-               /* If you can get stringification with catify, tell me how! */
 #endif
 #if 42 == 42
 #define PeRl_CaTiFy(a, b)      a ## b
 #define PeRl_StGiFy(a) #a
-/* the additional level of indirection enables these macros to be
- * used as arguments to other macros.  See K&R 2nd ed., page 231. */
 #define CAT2(a,b)      PeRl_CaTiFy(a,b)
 #define StGiFy(a)      PeRl_StGiFy(a)
 #define STRINGIFY(a)   PeRl_StGiFy(a)
 #endif
 #if 42 != 1 && 42 != 42
-#   include "Bletch: How does this C preprocessor concatenate tokens?"
+#include "Bletch: How does this C preprocessor concatenate tokens?"
 #endif
 
 /* CPPSTDIN:
 #define const
 #endif
 
-/* HAS_CRYPT:
- *     This symbol, if defined, indicates that the crypt routine is available
- *     to encrypt passwords and the like.
- */
-#define HAS_CRYPT              /**/
-
 /* HAS_CRYPT_R:
  *     This symbol, if defined, indicates that the crypt_r routine
  *     is available to crypt re-entrantly.
  */
 #define HAS_CSH                /**/
 #ifdef HAS_CSH
-#define CSH "/usr/bin/csh"     /**/
+#define CSH "/usr/bin/tcsh"    /**/
 #endif
 
 /* HAS_CTERMID_R:
 /*#define HAS_CTIME_R     / **/
 #define CTIME_R_PROTO 0           /**/
 
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- *     This symbol, if defined, indicates that the bug that prevents
- *     setuid scripts from being secure is not present in this kernel.
- */
-/* DOSUID:
- *     This symbol, if defined, indicates that the C program should
- *     check the script that it is executing for setuid/setgid bits, and
- *     attempt to emulate setuid/setgid on systems that have disabled
- *     setuid #! scripts because the kernel can't do it securely.
- *     It is up to the package designer to make sure that this emulation
- *     is done securely.  Among other things, it should do an fstat on
- *     the script it just opened to make sure it really is a setuid/setgid
- *     script, it should make sure the arguments passed correspond exactly
- *     to the argument on the #! line, and it should not trust any
- *     subprocesses to which it must pass the filename rather than the
- *     file descriptor of the script to be executed.
- */
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW        / **/
-/*#define DOSUID               / **/
-
 /* HAS_DRAND48_R:
  *     This symbol, if defined, indicates that the drand48_r routine
  *     is available to drand48 re-entrantly.
 #define HAS_UNAME              /**/
 /*#define HAS_PHOSTNAME        / **/
 #ifdef HAS_PHOSTNAME
-#define PHOSTNAME ""   /* How to get the host name */
+#define PHOSTNAME "/bin/hostname"      /* How to get the host name */
 #endif
 
 /* HAS_GETHOSTBYADDR_R:
  */
 #define HAS_MSG                /**/
 
-/* HAS_POLL:
- *     This symbol, if defined, indicates that the poll routine is
- *     available to poll active file descriptors.  Please check I_POLL and
- *     I_SYS_POLL to know which header should be included as well.
- */
-#define HAS_POLL               /**/
-
 /* OLD_PTHREAD_CREATE_JOINABLE:
  *     This symbol, if defined, indicates how to create pthread
  *     in joinable (aka undetached) state.  NOTE: not defined
  *     This symbol, if defined, indicates that the pthread_atfork routine
  *     is available to setup fork handlers.
  */
-#define HAS_PTHREAD_ATFORK             /**/
+/*#define HAS_PTHREAD_ATFORK           / **/
 
 /* HAS_PTHREAD_YIELD:
  *     This symbol, if defined, indicates that the pthread_yield
 /*#define HAS_SETGRENT_R          / **/
 #define SETGRENT_R_PROTO 0        /**/
 
-/* HAS_SETGROUPS:
- *     This symbol, if defined, indicates that the setgroups() routine is
- *     available to set the list of process groups.  If unavailable, multiple
- *     groups are probably not supported.
- */
-#define HAS_SETGROUPS          /**/
-
 /* HAS_SETHOSTENT:
  *     This symbol, if defined, indicates that the sethostent() routine is
  *     available.
  */
 #define Gid_t gid_t            /* Type for getgid(), etc... */
 
-/* Groups_t:
- *     This symbol holds the type used for the second argument to
- *     getgroups() and setgroups().  Usually, this is the same as
- *     gidtype (gid_t) , but sometimes it isn't.
- *     It can be int, ushort, gid_t, etc...
- *     It may be necessary to include <sys/types.h> to get any
- *     typedef'ed information.  This is only required if you have
- *     getgroups() or setgroups()..
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
-#endif
-
 /* I_DIRENT:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <dirent.h>. Using this symbol also triggers the definition
  *     This symbol, if defined, indicates that <ndbm.h> exists and should
  *     be included.
  */
-/*#define I_NDBM       / **/
+/* I_GDBMNDBM:
+ *     This symbol, if defined, indicates that <gdbm/ndbm.h> exists and should
+ *     be included.  This was the location of the ndbm.h compatibility file
+ *     in RedHat 7.1.
+ */
+/* I_GDBM_NDBM:
+ *     This symbol, if defined, indicates that <gdbm-ndbm.h> exists and should
+ *     be included.  This is the location of the ndbm.h compatibility file
+ *     in Debian 4.0.
+ */
+#define I_NDBM /**/
+/*#define I_GDBMNDBM   / **/
+/*#define I_GDBM_NDBM  / **/
 
 /* I_NETDB:
  *     This symbol, if defined, indicates that <netdb.h> exists and
  *     This symbol contains the ~name expanded version of PRIVLIB, to be used
  *     in programs that are not prepared to deal with ~ expansion at run-time.
  */
-#define PRIVLIB "/opt/perl/lib/5.11.0"         /**/
-#define PRIVLIB_EXP "/opt/perl/lib/5.11.0"             /**/
+#define PRIVLIB "/pro/lib/perl5/5.11.0"                /**/
+#define PRIVLIB_EXP "/pro/lib/perl5/5.11.0"            /**/
 
 /* CAN_PROTOTYPE:
  *     If defined, this macro indicates that the C compiler can handle
  *     This symbol contains the ~name expanded version of SITEARCH, to be used
  *     in programs that are not prepared to deal with ~ expansion at run-time.
  */
-#define SITEARCH "/opt/perl/lib/site_perl/5.11.0/i686-linux-64int"             /**/
-#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.11.0/i686-linux-64int"         /**/
+#define SITEARCH "/pro/lib/perl5/site_perl/5.11.0/i686-linux-64int"            /**/
+#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.11.0/i686-linux-64int"                /**/
 
 /* SITELIB:
  *     This symbol contains the name of the private library for this package.
  *     removed.  The elements in inc_version_list (inc_version_list.U) can
  *     be tacked onto this variable to generate a list of directories to search.
  */
-#define SITELIB "/opt/perl/lib/site_perl/5.11.0"               /**/
-#define SITELIB_EXP "/opt/perl/lib/site_perl/5.11.0"           /**/
-#define SITELIB_STEM "/opt/perl/lib/site_perl"         /**/
+#define SITELIB "/pro/lib/perl5/site_perl/5.11.0"              /**/
+#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.11.0"          /**/
+#define SITELIB_STEM "/pro/lib/perl5/site_perl"                /**/
 
 /* Size_t_size:
  *     This symbol holds the size of a Size_t in bytes.
  */
 #define Sock_size_t            socklen_t /**/
 
-/* STDCHAR:
- *     This symbol is defined to be the type of char used in stdio.h.
- *     It has the values "unsigned char" or "char".
- */
-#define STDCHAR char   /**/
-
 /* Uid_t_f:
  *     This symbol defines the format string used for printing a Uid_t.
  */
  */
 /*#define      EBCDIC          / **/
 
+/* STDCHAR:
+ *     This symbol is defined to be the type of char used in stdio.h.
+ *     It has the values "unsigned char" or "char".
+ */
+#define STDCHAR char   /**/
+
 /* HAS_ATOLF:
  *     This symbol, if defined, indicates that the atolf routine is
  *     available to convert strings into long doubles.
  *     Can we handle GCC builtin for telling that certain values are more
  *     likely
  */
-/*#define HAS_BUILTIN_EXPECT   / **/
+#define HAS_BUILTIN_EXPECT     /**/
 #define HAS_BUILTIN_CHOOSE_EXPR        /**/
 
 /* HAS_C99_VARIADIC_MACROS:
  *     to the program to supply one.  A good guess is
  *             extern int dbminit(char *);
  */
-/*#define      HAS_DBMINIT_PROTO       / **/
+#define        HAS_DBMINIT_PROTO       /**/
 
 /* HAS_DIR_DD_FD:
  *     This symbol, if defined, indicates that the the DIR* dirstream
  */
 #define        HAS_TELLDIR_PROTO       /**/
 
+/* HAS_TIMEGM:
+ *     This symbol, if defined, indicates that the timegm routine is
+ *     available to do the opposite of gmtime ()
+ */
+#define HAS_TIMEGM             /**/
+
 /* U32_ALIGNMENT_REQUIRED:
  *     This symbol, if defined, indicates that you must access
  *     character data through U32-aligned pointers.
  */
 /*#define      I_LIBUTIL               / **/
 
+/* I_MALLOCMALLOC:
+ *     This symbol, if defined, indicates to the C program that it should
+ *     include <malloc/malloc.h>.
+ */
+/*#define I_MALLOCMALLOC               / **/
+
 /* I_MNTENT:
  *     This symbol, if defined, indicates that <mntent.h> exists and
  *     should be included.
  *     This symbol contains the number of bits a variable of type NVTYPE
  *     can preserve of a variable of type UVTYPE.
  */
-/* NV_OVERFLOWS_INTEGERS_AT
+/* NV_OVERFLOWS_INTEGERS_AT:
  *     This symbol gives the largest integer value that NVs can hold. This
  *     value + 1.0 cannot be stored accurately. It is expressed as constant
  *     floating point expression to reduce the chance of decimale/binary
  *     script to make sure (one hopes) that it runs with perl and not
  *     some shell.
  */
-#define STARTPERL "#!/opt/perl/bin/perl5.11.0"         /**/
+#define STARTPERL "#!/pro/bin/perl5.11.0"              /**/
 
 /* HAS_STDIO_STREAM_ARRAY:
  *     This symbol, if defined, tells that there is an array
  *     Usual values include _iob, __iob, and __sF.
  */
 /*#define      HAS_STDIO_STREAM_ARRAY  / **/
+#ifdef HAS_STDIO_STREAM_ARRAY
 #define STDIO_STREAM_ARRAY     
+#endif
+
+/* GMTIME_MAX:
+ *     This symbol contains the maximum value for the time_t offset that
+ *     the system function gmtime () accepts, and defaults to 0
+ */
+/* GMTIME_MIN:
+ *     This symbol contains the minimum value for the time_t offset that
+ *     the system function gmtime () accepts, and defaults to 0
+ */
+#define GMTIME_MAX     2147483647      /**/
+#define GMTIME_MIN     -2147483648     /**/
 
 /* USE_64_BIT_INT:
  *     This symbol, if defined, indicates that 64-bit integers should