# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Thu Jul 10 17:14:53 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=''
# a version-specific architecture-dependent library, the version
# number isn't really that important, except for making cc/ld happy.
#
- # A name such as libperl.so.3.1
+ # A name such as libperl.so.10.1
majmin="libperl.$so.$patchlevel.$subversion"
- # A name such as libperl.so.301
+ # A name such as libperl.so.100
majonly=`echo $patchlevel $subversion |
$awk '{printf "%d%02d", $1, $2}'`
majonly=libperl.$so.$majonly
linux*|gnu*) # ld won't link with a bare -lperl otherwise.
dflt=libperl.$so
;;
- cygwin*) # ld links against an importlib
- dflt=libperl$lib_ext
+ cygwin*) # ld links now against the dll directly
+ majmin="cygperl5_${patchlevel}_${subversion}.${so}"
+ majonly=`echo $patchlevel $subversion |
+ $awk '{printf "%03d%03d", $1, $2}'`
+ majonly=cygperl5.$majonly.$so
+ dflt=$majmin
;;
*) # Try to guess based on whether libc has major.minor.
case "$libc" in
# hpux doesn't like the default, either.
tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
;;
+ cygwin)
+ # cygwin needs only ldlibpth
+ ;;
*)
tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
;;
echo "(Attempting domain name extraction from $tans)"
dflt=.`$sed -n -e 's/ / /g' \
-e 's/^search *\([^ ]*\).*/\1/p' $tans \
- | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
+ -e 1q 2>/dev/null`
case "$dflt" in
.) dflt=.`$sed -n -e 's/ / /g' \
-e 's/^domain *\([^ ]*\).*/\1/p' $tans \
- | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
+ -e 1q 2>/dev/null`
;;
esac
fi
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'