# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Fri Aug 22 17:08:28 CEST 2008 [metaconfig 3.5 PL0]
+# Generated on Mon Sep 15 10:06:16 CEST 2008 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
sysman=''
sGMTIME_max=''
sGMTIME_min=''
+sLOCALTIME_max=''
+sLOCALTIME_min=''
trnl=''
uidformat=''
uidsign=''
set values.h i_values
eval $inhdr
-: Check the max offset that gmtime accepts
+: Check the max offset that gmtime and localtime accept
echo "Checking max offsets that gmtime () accepts"
case $i_values in
int check_max ()
{
- tmp = NULL;
- pt = 0;
+ tmp = NULL;
+ pt = 0;
#ifdef MAXLONG
- gm_check (MAXLONG);
+ gm_check (MAXLONG);
#endif
- if (tmp == NULL || tmp->tm_year < 0) {
- for (i = 63; i >= 0; i--) {
- time_t x = pt | ((time_t)1 << i);
- if (x < 0) continue;
- gm_check (x);
- }
- }
- printf ("sGMTIME_max=%ld\n", pt);
- return (0);
- }
+ if (tmp == NULL || tmp->tm_year < 0) {
+ for (i = 63; i >= 0; i--) {
+ time_t x = pt | ((time_t)1 << i);
+ if (x < 0) continue;
+ gm_check (x);
+ }
+ }
+ printf ("sGMTIME_max=%ld\n", pt);
+ return (0);
+ } /* check_max */
int check_min ()
{
- tmp = NULL;
- pt = 0;
+ tmp = NULL;
+ pt = 0;
#ifdef MINLONG
- gm_check (MINLONG);
+ gm_check (MINLONG);
#endif
- if (tmp == NULL) {
- for (i = 36; i >= 0; i--) {
- time_t x = pt - ((time_t)1 << i);
- if (x > 0) continue;
- gm_check (x);
- }
- }
- printf ("sGMTIME_min=%ld\n", pt);
- return (0);
- }
+ if (tmp == NULL) {
+ for (i = 36; i >= 0; i--) {
+ time_t x = pt - ((time_t)1 << i);
+ if (x > 0) continue;
+ gm_check (x);
+ }
+ }
+ printf ("sGMTIME_min=%ld\n", pt);
+ return (0);
+ } /* check_min */
int main (int argc, char *argv[])
{
- fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t));
- check_max ();
- check_min ();
- return (0);
- } /* main */
+ fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t));
+ check_max ();
+ check_min ();
+ return (0);
+ } /* main */
EOCP
set try
if eval $compile; then
- yyy=`$run ./try`
- eval $yyy
+ eval `$run ./try`
else
echo "Cannot determine sGMTIME_max and sGMTIME_min." >&4
fi
$rm_try
+echo "Checking max offsets that localtime () accepts"
+
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+#include <time.h>
+$yyy
+
+int i;
+struct tm *tmp;
+time_t pt;
+
+void local_check (time_t t)
+{
+ tmp = localtime (&t);
+ if (tmp == NULL || tmp->tm_year < -1900)
+ tmp = NULL;
+ else
+ pt = t;
+ } /* local_check */
+
+int check_max ()
+{
+ tmp = NULL;
+ pt = 0;
+#ifdef MAXLONG
+ local_check (MAXLONG);
+#endif
+ if (tmp == NULL || tmp->tm_year < 0) {
+ for (i = 63; i >= 0; i--) {
+ time_t x = pt | ((time_t)1 << i);
+ if (x < 0) continue;
+ local_check (x);
+ }
+ }
+ printf ("sLOCALTIME_max=%ld\n", pt);
+ return (0);
+ } /* check_max */
+
+int check_min ()
+{
+ tmp = NULL;
+ pt = 0;
+#ifdef MINLONG
+ local_check (MINLONG);
+#endif
+ if (tmp == NULL) {
+ for (i = 36; i >= 0; i--) {
+ time_t x = pt - ((time_t)1 << i);
+ if (x > 0) continue;
+ local_check (x);
+ }
+ }
+ printf ("sLOCALTIME_min=%ld\n", pt);
+ return (0);
+ } /* check_min */
+
+int main (int argc, char *argv[])
+{
+ check_max ();
+ check_min ();
+ return (0);
+ } /* main */
+EOCP
+set try
+if eval $compile; then
+ eval `$run ./try`
+else
+ echo "Cannot determine sLOCALTIME_max and sLOCALTIME_min." >&4
+ fi
+$rm_try
+
: check for type of arguments to select.
case "$selecttype" in
'') case "$d_select" in
runnm='$runnm'
sGMTIME_max='$sGMTIME_max'
sGMTIME_min='$sGMTIME_min'
+sLOCALTIME_max='$sLOCALTIME_max'
+sLOCALTIME_min='$sLOCALTIME_min'
sPRIEUldbl='$sPRIEUldbl'
sPRIFUldbl='$sPRIFUldbl'
sPRIGUldbl='$sPRIGUldbl'
This variable is defined but not used by Configure.
The value is a plain '' and is not useful.
+sLOCALTIME_max (time_size.U):
+ This variable defines the maximum value of the time_t offset that
+ the system function localtime () accepts
+
+sLOCALTIME_min (time_size.U):
+ This variable defines the minimum value of the time_t offset that
+ the system function localtime () accepts
+
smail (Loc.U):
This variable is defined but not used by Configure.
The value is a plain '' and is not useful.
*/
#define Sock_size_t $socksizetype /**/
+/* 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 $stdchar /**/
+
/* Uid_t_f:
* This symbol defines the format string used for printing a Uid_t.
*/
*/
#$ebcdic 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 $stdchar /**/
-
/* HAS_ATOLF:
* This symbol, if defined, indicates that the atolf routine is
* available to convert strings into long doubles.
* This symbol contains the minimum value for the time_t offset that
* the system function gmtime () accepts, and defaults to 0
*/
-#define GMTIME_MAX $sGMTIME_max /**/
-#define GMTIME_MIN $sGMTIME_min /**/
+/* LOCALTIME_MAX:
+ * This symbol contains the maximum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+/* LOCALTIME_MIN:
+ * This symbol contains the minimum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+#define GMTIME_MAX $sGMTIME_max /**/
+#define GMTIME_MIN $sGMTIME_min /**/
+#define LOCALTIME_MAX $sLOCALTIME_max /**/
+#define LOCALTIME_MIN $sLOCALTIME_min /**/
/* USE_64_BIT_INT:
* This symbol, if defined, indicates that 64-bit integers should
#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) && defined(HAS_TIMEGM)
+#if defined(LOCALTIME_R_NEEDS_TZSET) && defined(HAS_PSEUDOFORK) && defined(USE_DTRACE) && defined(GMTIME_MAX) && defined(GMTIME_MIN) && defined(LOCALTIME_MAX) && defined(LOCALTIME_MIN) && defined(HAS_TIMEGM)
/* Not (yet) used at top level, but mention them for metaconfig */
#endif
rd_nodata='-1'
readdir64_r_proto='0'
readdir_r_proto='0'
-sPRIEUldbl='"llE"'
-sPRIFUldbl='"llF"'
-sPRIGUldbl='"llG"'
-sPRIXU64='"LX"'
+sGMTIME_max='2147483647'
+sGMTIME_min='0'
+sLOCALTIME_max='2147483647'
+sLOCALTIME_min='0'
sPRId64='"Ld"'
sPRIeldbl='"lle"'
+sPRIEUldbl='"llE"'
sPRIfldbl='"llf"'
+sPRIFUldbl='"llF"'
sPRIgldbl='"llg"'
+sPRIGUldbl='"llG"'
sPRIi64='"Li"'
sPRIo64='"Lo"'
sPRIu64='"Lu"'
sPRIx64='"Lx"'
+sPRIXU64='"LX"'
sSCNfldbl='"llf"'
sched_yield='sched_yield()'
scriptdir='/usr/local/bin'
runnm='true'
sGMTIME_max="2147483647"
sGMTIME_min="-2147483648"
+sLOCALTIME_max="2147483647"
+sLOCALTIME_min="-2147483648"
sPRIEUldbl='"E"'
sPRIFUldbl='"F"'
sPRIGUldbl='"G"'
runnm='true'
sGMTIME_max="2147483647"
sGMTIME_min="0"
+sLOCALTIME_max="2147483647"
+sLOCALTIME_min="0"
sPRIEUldbl='"E"'
sPRIFUldbl='"F"'
sPRIGUldbl='"G"'
runnm='true'
sGMTIME_max="2147483647"
sGMTIME_min="0"
+sLOCALTIME_max="2147483647"
+sLOCALTIME_min="0"
sPRIEUldbl='"E"'
sPRIFUldbl='"F"'
sPRIGUldbl='"G"'
runnm='true'
sGMTIME_max="2147483647"
sGMTIME_min="0"
+sLOCALTIME_max="2147483647"
+sLOCALTIME_min="0"
sPRIEUldbl='"E"'
sPRIFUldbl='"F"'
sPRIGUldbl='"G"'
#define GMTIME_MAX 2147483647 /**/
#define GMTIME_MIN -2147483648 /**/
+/* LOCALTIME_MAX:
+ * This symbol contains the maximum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+/* LOCALTIME_MIN:
+ * This symbol contains the minimum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+#define LOCALTIME_MAX 2147483647 /**/
+#define LOCALTIME_MIN -2147483648 /**/
+
/* USE_64_BIT_INT:
* This symbol, if defined, indicates that 64-bit integers should
* be used when available. If not defined, the native integers
#define GMTIME_MAX 2147483647 /**/
#define GMTIME_MIN 0 /**/
+/* LOCALTIME_MAX:
+ * This symbol contains the maximum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+/* LOCALTIME_MIN:
+ * This symbol contains the minimum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+#define LOCALTIME_MAX 2147483647 /**/
+#define LOCALTIME_MIN 0 /**/
+
/* USE_64_BIT_INT:
* This symbol, if defined, indicates that 64-bit integers should
* be used when available. If not defined, the native integers
#define GMTIME_MAX 2147483647 /**/
#define GMTIME_MIN 0 /**/
+/* LOCALTIME_MAX:
+ * This symbol contains the maximum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+/* LOCALTIME_MIN:
+ * This symbol contains the minimum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+#define LOCALTIME_MAX 2147483647 /**/
+#define LOCALTIME_MIN 0 /**/
+
/* USE_64_BIT_INT:
* This symbol, if defined, indicates that 64-bit integers should
* be used when available. If not defined, the native integers
#define GMTIME_MAX 2147483647 /**/
#define GMTIME_MIN 0 /**/
+/* LOCALTIME_MAX:
+ * This symbol contains the maximum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+/* LOCALTIME_MIN:
+ * This symbol contains the minimum value for the time_t offset that
+ * the system function localtime () accepts, and defaults to 0
+ */
+#define LOCALTIME_MAX 2147483647 /**/
+#define LOCALTIME_MIN 0 /**/
+
/* USE_64_BIT_INT:
* This symbol, if defined, indicates that 64-bit integers should
* be used when available. If not defined, the native integers
my $ccversion = $1;
if ($ccversion == 14) {
$opt{sGMTIME_max} = 32535244799;
+ $opt{sLOCALTIME_max} = 32535244799;
}
elsif ($ccversion >= 15) {
$opt{sGMTIME_min} = -43200;
$opt{sGMTIME_max} = 32535291599;
+ $opt{sLOCALTIME_min} = -43200;
+ $opt{sLOCALTIME_max} = 32535291599;
}
}