summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2008-07-07 20:39:20 +0000
committerH.Merijn Brand <h.m.brand@xs4all.nl>2008-07-07 20:39:20 +0000
commitcbb9e8a748b5e5e3976f6136bbf786e27be09152 (patch)
treeab6aa3a180100dbe3e96562a901e08c7b3424498
parent81c4fd9ed76693652365ade5cfe1811926de24d8 (diff)
downloadperl-cbb9e8a748b5e5e3976f6136bbf786e27be09152.tar.gz
Probe for timegm
p4raw-id: //depot/perl@34107
-rwxr-xr-xConfigure8
-rw-r--r--Porting/Glossary4
-rw-r--r--config_h.SH6
-rw-r--r--handy.h2
4 files changed, 18 insertions, 2 deletions
diff --git a/Configure b/Configure
index bce1daa74d..1a9b2909ba 100755
--- 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'
diff --git a/Porting/Glossary b/Porting/Glossary
index 2773c9490c..64d1e5e5d9 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -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
diff --git a/config_h.SH b/config_h.SH
index 07f7daac7e..7ee3c4f088 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -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 8392efc272..1c8f8f4b3b 100644
--- 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