Probe for timegm
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 7 Jul 2008 20:39:20 +0000 (20:39 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 7 Jul 2008 20:39:20 +0000 (20:39 +0000)
p4raw-id: //depot/perl@34107

Configure
Porting/Glossary
config_h.SH
handy.h

index bce1daa..1a9b290 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 21:59:59 CEST 2008 [metaconfig 3.5 PL0]
+# Generated on Mon Jul  7 22:34:20 CEST 2008 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -777,6 +777,7 @@ d_tcsetpgrp=''
 d_telldirproto=''
 d_time=''
 timetype=''
+d_timegm=''
 clocktype=''
 d_times=''
 d_tmpnam_r=''
@@ -18105,6 +18106,10 @@ if test "X$d_time" = X -o X"$timetype" = X; then
     eval $setvar
 fi
 
+: see if timegm exists
+set timegm d_timegm
+eval $inlibc
+
 : see if this is a sys/times.h system
 set sys/times.h i_systimes
 eval $inhdr
@@ -22306,6 +22311,7 @@ d_tcsetpgrp='$d_tcsetpgrp'
 d_telldir='$d_telldir'
 d_telldirproto='$d_telldirproto'
 d_time='$d_time'
+d_timegm='$d_timegm'
 d_times='$d_times'
 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
 d_tm_tm_zone='$d_tm_tm_zone'
index 2773c94..64d1e5e 100644 (file)
@@ -2213,6 +2213,10 @@ d_time (d_time.U):
        that the time() routine exists.  The time() routine is normaly
        provided on UNIX systems.
 
+d_timegm (d_timegm.U):
+       This variable conditionally defines the HAS_TIMEGM symbol, which
+       indicates to the C program that the timegm () routine is available.
+
 d_times (d_times.U):
        This variable conditionally defines the HAS_TIMES symbol, which indicates
        that the times() routine exists.  The times() routine is normaly
index 07f7daa..7ee3c4f 100644 (file)
@@ -3970,6 +3970,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
  */
 #$d_telldirproto       HAS_TELLDIR_PROTO       /**/
 
+/* HAS_TIMEGM:
+ *     This symbol, if defined, indicates that the timegm routine is
+ *     available to do the opposite of gmtime ()
+ */
+#$d_timegm HAS_TIMEGM          /**/
+
 /* U32_ALIGNMENT_REQUIRED:
  *     This symbol, if defined, indicates that you must access
  *     character data through U32-aligned pointers.
diff --git a/handy.h b/handy.h
index 8392efc..1c8f8f4 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -177,7 +177,7 @@ typedef U64TYPE U64;
 #endif
 
 /* HMB H.Merijn Brand - a placeholder for preparing Configure patches */
-#if defined(LOCALTIME_R_NEEDS_TZSET) && defined(HAS_PSEUDOFORK) && defined(USE_DTRACE) && defined(GMTIME_MAX) && defined(GMTIME_MIN)
+#if defined(LOCALTIME_R_NEEDS_TZSET) && defined(HAS_PSEUDOFORK) && defined(USE_DTRACE) && defined(GMTIME_MAX) && defined(GMTIME_MIN) && defined(HAS_TIMEGM)
 /* Not (yet) used at top level, but mention them for metaconfig */
 #endif