|
|
@@ -624,7 +624,6 @@ ac_includes_default="\
|
|
|
#endif"
|
|
|
|
|
|
ac_header_list=
|
|
|
-ac_func_list=
|
|
|
ac_subst_vars='LTLIBOBJS
|
|
|
NUMVER
|
|
|
VERSION
|
|
|
@@ -2355,10 +2354,8 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
|
|
|
>$cache_file
|
|
|
fi
|
|
|
|
|
|
-as_fn_append ac_header_list " sys/time.h"
|
|
|
-as_fn_append ac_header_list " unistd.h"
|
|
|
-as_fn_append ac_func_list " alarm"
|
|
|
as_fn_append ac_header_list " stdlib.h"
|
|
|
+as_fn_append ac_header_list " unistd.h"
|
|
|
as_fn_append ac_header_list " sys/param.h"
|
|
|
# Check that the precious variables saved in the cache have kept the same
|
|
|
# value.
|
|
|
@@ -7764,219 +7761,6 @@ fi
|
|
|
|
|
|
|
|
|
# Checks for library functions
|
|
|
-for ac_header in vfork.h
|
|
|
-do :
|
|
|
- ac_fn_cxx_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
|
|
|
-if test "x$ac_cv_header_vfork_h" = xyes; then :
|
|
|
- cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define HAVE_VFORK_H 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-done
|
|
|
-
|
|
|
-for ac_func in fork vfork
|
|
|
-do :
|
|
|
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
|
|
-ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
|
|
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
|
|
|
- cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-fi
|
|
|
-done
|
|
|
-
|
|
|
-if test "x$ac_cv_func_fork" = xyes; then
|
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
|
|
|
-$as_echo_n "checking for working fork... " >&6; }
|
|
|
-if ${ac_cv_func_fork_works+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_fork_works=cross
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-$ac_includes_default
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
-
|
|
|
- /* By Ruediger Kuhlmann. */
|
|
|
- return fork () < 0;
|
|
|
-
|
|
|
- ;
|
|
|
- return 0;
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_fork_works=yes
|
|
|
-else
|
|
|
- ac_cv_func_fork_works=no
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
|
|
|
-$as_echo "$ac_cv_func_fork_works" >&6; }
|
|
|
-
|
|
|
-else
|
|
|
- ac_cv_func_fork_works=$ac_cv_func_fork
|
|
|
-fi
|
|
|
-if test "x$ac_cv_func_fork_works" = xcross; then
|
|
|
- case $host in
|
|
|
- *-*-amigaos* | *-*-msdosdjgpp*)
|
|
|
- # Override, as these systems have only a dummy fork() stub
|
|
|
- ac_cv_func_fork_works=no
|
|
|
- ;;
|
|
|
- *)
|
|
|
- ac_cv_func_fork_works=yes
|
|
|
- ;;
|
|
|
- esac
|
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
|
|
|
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
|
|
|
-fi
|
|
|
-ac_cv_func_vfork_works=$ac_cv_func_vfork
|
|
|
-if test "x$ac_cv_func_vfork" = xyes; then
|
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
|
|
|
-$as_echo_n "checking for working vfork... " >&6; }
|
|
|
-if ${ac_cv_func_vfork_works+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_vfork_works=cross
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-/* Thanks to Paul Eggert for this test. */
|
|
|
-$ac_includes_default
|
|
|
-#include <sys/wait.h>
|
|
|
-#ifdef HAVE_VFORK_H
|
|
|
-# include <vfork.h>
|
|
|
-#endif
|
|
|
-/* On some sparc systems, changes by the child to local and incoming
|
|
|
- argument registers are propagated back to the parent. The compiler
|
|
|
- is told about this with #include <vfork.h>, but some compilers
|
|
|
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
|
|
|
- static variable whose address is put into a register that is
|
|
|
- clobbered by the vfork. */
|
|
|
-static void
|
|
|
-#ifdef __cplusplus
|
|
|
-sparc_address_test (int arg)
|
|
|
-# else
|
|
|
-sparc_address_test (arg) int arg;
|
|
|
-#endif
|
|
|
-{
|
|
|
- static pid_t child;
|
|
|
- if (!child) {
|
|
|
- child = vfork ();
|
|
|
- if (child < 0) {
|
|
|
- perror ("vfork");
|
|
|
- _exit(2);
|
|
|
- }
|
|
|
- if (!child) {
|
|
|
- arg = getpid();
|
|
|
- write(-1, "", 0);
|
|
|
- _exit (arg);
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
- pid_t parent = getpid ();
|
|
|
- pid_t child;
|
|
|
-
|
|
|
- sparc_address_test (0);
|
|
|
-
|
|
|
- child = vfork ();
|
|
|
-
|
|
|
- if (child == 0) {
|
|
|
- /* Here is another test for sparc vfork register problems. This
|
|
|
- test uses lots of local variables, at least as many local
|
|
|
- variables as main has allocated so far including compiler
|
|
|
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
|
|
|
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
|
|
|
- reuse the register of parent for one of the local variables,
|
|
|
- since it will think that parent can't possibly be used any more
|
|
|
- in this routine. Assigning to the local variable will thus
|
|
|
- munge parent in the parent process. */
|
|
|
- pid_t
|
|
|
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
|
|
|
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
|
|
|
- /* Convince the compiler that p..p7 are live; otherwise, it might
|
|
|
- use the same hardware register for all 8 local variables. */
|
|
|
- if (p != p1 || p != p2 || p != p3 || p != p4
|
|
|
- || p != p5 || p != p6 || p != p7)
|
|
|
- _exit(1);
|
|
|
-
|
|
|
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
|
|
|
- from child file descriptors. If the child closes a descriptor
|
|
|
- before it execs or exits, this munges the parent's descriptor
|
|
|
- as well. Test for this by closing stdout in the child. */
|
|
|
- _exit(close(fileno(stdout)) != 0);
|
|
|
- } else {
|
|
|
- int status;
|
|
|
- struct stat st;
|
|
|
-
|
|
|
- while (wait(&status) != child)
|
|
|
- ;
|
|
|
- return (
|
|
|
- /* Was there some problem with vforking? */
|
|
|
- child < 0
|
|
|
-
|
|
|
- /* Did the child fail? (This shouldn't happen.) */
|
|
|
- || status
|
|
|
-
|
|
|
- /* Did the vfork/compiler bug occur? */
|
|
|
- || parent != getpid()
|
|
|
-
|
|
|
- /* Did the file descriptor bug occur? */
|
|
|
- || fstat(fileno(stdout), &st) != 0
|
|
|
- );
|
|
|
- }
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_vfork_works=yes
|
|
|
-else
|
|
|
- ac_cv_func_vfork_works=no
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
|
|
|
-$as_echo "$ac_cv_func_vfork_works" >&6; }
|
|
|
-
|
|
|
-fi;
|
|
|
-if test "x$ac_cv_func_fork_works" = xcross; then
|
|
|
- ac_cv_func_vfork_works=$ac_cv_func_vfork
|
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
|
|
|
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
|
|
|
-fi
|
|
|
-
|
|
|
-if test "x$ac_cv_func_vfork_works" = xyes; then
|
|
|
-
|
|
|
-$as_echo "#define HAVE_WORKING_VFORK 1" >>build/confdefs.h
|
|
|
-
|
|
|
-else
|
|
|
-
|
|
|
-$as_echo "#define vfork fork" >>build/confdefs.h
|
|
|
-
|
|
|
-fi
|
|
|
-if test "x$ac_cv_func_fork_works" = xyes; then
|
|
|
-
|
|
|
-$as_echo "#define HAVE_WORKING_FORK 1" >>build/confdefs.h
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
|
|
|
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
|
|
|
if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
|
|
|
@@ -8039,181 +7823,6 @@ esac
|
|
|
|
|
|
fi
|
|
|
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5
|
|
|
-$as_echo_n "checking whether lstat accepts an empty string... " >&6; }
|
|
|
-if ${ac_cv_func_lstat_empty_string_bug+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_lstat_empty_string_bug=yes
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-$ac_includes_default
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
-struct stat sbuf;
|
|
|
- return lstat ("", &sbuf) == 0;
|
|
|
- ;
|
|
|
- return 0;
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_lstat_empty_string_bug=no
|
|
|
-else
|
|
|
- ac_cv_func_lstat_empty_string_bug=yes
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5
|
|
|
-$as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; }
|
|
|
-if test $ac_cv_func_lstat_empty_string_bug = yes; then
|
|
|
- case " $LIBOBJS " in
|
|
|
- *" lstat.$ac_objext "* ) ;;
|
|
|
- *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
|
|
|
- ;;
|
|
|
-esac
|
|
|
-
|
|
|
-
|
|
|
-cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define HAVE_LSTAT_EMPTY_STRING_BUG 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
|
|
|
-$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
|
|
|
-if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- rm -f conftest.sym conftest.file
|
|
|
-echo >conftest.file
|
|
|
-if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_lstat_dereferences_slashed_symlink=no
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-$ac_includes_default
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
-struct stat sbuf;
|
|
|
- /* Linux will dereference the symlink and fail, as required by POSIX.
|
|
|
- That is better in the sense that it means we will not
|
|
|
- have to compile and use the lstat wrapper. */
|
|
|
- return lstat ("conftest.sym/", &sbuf) == 0;
|
|
|
- ;
|
|
|
- return 0;
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_lstat_dereferences_slashed_symlink=yes
|
|
|
-else
|
|
|
- ac_cv_func_lstat_dereferences_slashed_symlink=no
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-else
|
|
|
- # If the `ln -s' command failed, then we probably don't even
|
|
|
- # have an lstat function.
|
|
|
- ac_cv_func_lstat_dereferences_slashed_symlink=no
|
|
|
-fi
|
|
|
-rm -f conftest.sym conftest.file
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
|
|
|
-$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
|
|
|
-
|
|
|
-test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
|
|
|
-
|
|
|
-cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-
|
|
|
-if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
|
|
|
- case " $LIBOBJS " in
|
|
|
- *" lstat.$ac_objext "* ) ;;
|
|
|
- *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
|
|
|
- ;;
|
|
|
-esac
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-for ac_header in stdlib.h
|
|
|
-do :
|
|
|
- ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
|
|
|
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
|
|
|
- cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define HAVE_STDLIB_H 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-done
|
|
|
-
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
|
|
|
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
|
|
|
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_malloc_0_nonnull=no
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
|
|
|
-# include <stdlib.h>
|
|
|
-#else
|
|
|
-char *malloc ();
|
|
|
-#endif
|
|
|
-
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
-return ! malloc (0);
|
|
|
- ;
|
|
|
- return 0;
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_malloc_0_nonnull=yes
|
|
|
-else
|
|
|
- ac_cv_func_malloc_0_nonnull=no
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
|
|
|
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
|
|
|
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
|
|
|
-
|
|
|
-$as_echo "#define HAVE_MALLOC 1" >>build/confdefs.h
|
|
|
-
|
|
|
-else
|
|
|
- $as_echo "#define HAVE_MALLOC 0" >>build/confdefs.h
|
|
|
-
|
|
|
- case " $LIBOBJS " in
|
|
|
- *" malloc.$ac_objext "* ) ;;
|
|
|
- *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
|
|
|
- ;;
|
|
|
-esac
|
|
|
-
|
|
|
-
|
|
|
-$as_echo "#define malloc rpl_malloc" >>build/confdefs.h
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
@@ -8238,250 +7847,6 @@ done
|
|
|
|
|
|
|
|
|
|
|
|
- for ac_func in $ac_func_list
|
|
|
-do :
|
|
|
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
|
|
-ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
|
|
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
|
|
|
- cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-fi
|
|
|
-done
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
|
|
|
-$as_echo_n "checking for working mktime... " >&6; }
|
|
|
-if ${ac_cv_func_working_mktime+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_working_mktime=no
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-/* Test program from Paul Eggert and Tony Leneis. */
|
|
|
-#ifdef TIME_WITH_SYS_TIME
|
|
|
-# include <sys/time.h>
|
|
|
-# include <time.h>
|
|
|
-#else
|
|
|
-# ifdef HAVE_SYS_TIME_H
|
|
|
-# include <sys/time.h>
|
|
|
-# else
|
|
|
-# include <time.h>
|
|
|
-# endif
|
|
|
-#endif
|
|
|
-
|
|
|
-#include <limits.h>
|
|
|
-#include <stdlib.h>
|
|
|
-
|
|
|
-#ifdef HAVE_UNISTD_H
|
|
|
-# include <unistd.h>
|
|
|
-#endif
|
|
|
-
|
|
|
-#ifndef HAVE_ALARM
|
|
|
-# define alarm(X) /* empty */
|
|
|
-#endif
|
|
|
-
|
|
|
-/* Work around redefinition to rpl_putenv by other config tests. */
|
|
|
-#undef putenv
|
|
|
-
|
|
|
-static time_t time_t_max;
|
|
|
-static time_t time_t_min;
|
|
|
-
|
|
|
-/* Values we'll use to set the TZ environment variable. */
|
|
|
-static const char *tz_strings[] = {
|
|
|
- (const char *) 0, "TZ=GMT0", "TZ=JST-9",
|
|
|
- "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
|
|
|
-};
|
|
|
-#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
|
|
|
-
|
|
|
-/* Return 0 if mktime fails to convert a date in the spring-forward gap.
|
|
|
- Based on a problem report from Andreas Jaeger. */
|
|
|
-static int
|
|
|
-spring_forward_gap ()
|
|
|
-{
|
|
|
- /* glibc (up to about 1998-10-07) failed this test. */
|
|
|
- struct tm tm;
|
|
|
-
|
|
|
- /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
|
|
|
- instead of "TZ=America/Vancouver" in order to detect the bug even
|
|
|
- on systems that don't support the Olson extension, or don't have the
|
|
|
- full zoneinfo tables installed. */
|
|
|
- putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
|
|
|
-
|
|
|
- tm.tm_year = 98;
|
|
|
- tm.tm_mon = 3;
|
|
|
- tm.tm_mday = 5;
|
|
|
- tm.tm_hour = 2;
|
|
|
- tm.tm_min = 0;
|
|
|
- tm.tm_sec = 0;
|
|
|
- tm.tm_isdst = -1;
|
|
|
- return mktime (&tm) != (time_t) -1;
|
|
|
-}
|
|
|
-
|
|
|
-static int
|
|
|
-mktime_test1 (time_t now)
|
|
|
-{
|
|
|
- struct tm *lt;
|
|
|
- return ! (lt = localtime (&now)) || mktime (lt) == now;
|
|
|
-}
|
|
|
-
|
|
|
-static int
|
|
|
-mktime_test (time_t now)
|
|
|
-{
|
|
|
- return (mktime_test1 (now)
|
|
|
- && mktime_test1 ((time_t) (time_t_max - now))
|
|
|
- && mktime_test1 ((time_t) (time_t_min + now)));
|
|
|
-}
|
|
|
-
|
|
|
-static int
|
|
|
-irix_6_4_bug ()
|
|
|
-{
|
|
|
- /* Based on code from Ariel Faigon. */
|
|
|
- struct tm tm;
|
|
|
- tm.tm_year = 96;
|
|
|
- tm.tm_mon = 3;
|
|
|
- tm.tm_mday = 0;
|
|
|
- tm.tm_hour = 0;
|
|
|
- tm.tm_min = 0;
|
|
|
- tm.tm_sec = 0;
|
|
|
- tm.tm_isdst = -1;
|
|
|
- mktime (&tm);
|
|
|
- return tm.tm_mon == 2 && tm.tm_mday == 31;
|
|
|
-}
|
|
|
-
|
|
|
-static int
|
|
|
-bigtime_test (int j)
|
|
|
-{
|
|
|
- struct tm tm;
|
|
|
- time_t now;
|
|
|
- tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
|
|
|
- now = mktime (&tm);
|
|
|
- if (now != (time_t) -1)
|
|
|
- {
|
|
|
- struct tm *lt = localtime (&now);
|
|
|
- if (! (lt
|
|
|
- && lt->tm_year == tm.tm_year
|
|
|
- && lt->tm_mon == tm.tm_mon
|
|
|
- && lt->tm_mday == tm.tm_mday
|
|
|
- && lt->tm_hour == tm.tm_hour
|
|
|
- && lt->tm_min == tm.tm_min
|
|
|
- && lt->tm_sec == tm.tm_sec
|
|
|
- && lt->tm_yday == tm.tm_yday
|
|
|
- && lt->tm_wday == tm.tm_wday
|
|
|
- && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
|
|
|
- == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
|
|
|
- return 0;
|
|
|
- }
|
|
|
- return 1;
|
|
|
-}
|
|
|
-
|
|
|
-static int
|
|
|
-year_2050_test ()
|
|
|
-{
|
|
|
- /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
|
|
|
- ignoring leap seconds. */
|
|
|
- unsigned long int answer = 2527315200UL;
|
|
|
-
|
|
|
- struct tm tm;
|
|
|
- time_t t;
|
|
|
- tm.tm_year = 2050 - 1900;
|
|
|
- tm.tm_mon = 2 - 1;
|
|
|
- tm.tm_mday = 1;
|
|
|
- tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
|
|
|
- tm.tm_isdst = -1;
|
|
|
-
|
|
|
- /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
|
|
|
- instead of "TZ=America/Vancouver" in order to detect the bug even
|
|
|
- on systems that don't support the Olson extension, or don't have the
|
|
|
- full zoneinfo tables installed. */
|
|
|
- putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
|
|
|
-
|
|
|
- t = mktime (&tm);
|
|
|
-
|
|
|
- /* Check that the result is either a failure, or close enough
|
|
|
- to the correct answer that we can assume the discrepancy is
|
|
|
- due to leap seconds. */
|
|
|
- return (t == (time_t) -1
|
|
|
- || (0 < t && answer - 120 <= t && t <= answer + 120));
|
|
|
-}
|
|
|
-
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
- time_t t, delta;
|
|
|
- int i, j;
|
|
|
-
|
|
|
- /* This test makes some buggy mktime implementations loop.
|
|
|
- Give up after 60 seconds; a mktime slower than that
|
|
|
- isn't worth using anyway. */
|
|
|
- alarm (60);
|
|
|
-
|
|
|
- for (;;)
|
|
|
- {
|
|
|
- t = (time_t_max << 1) + 1;
|
|
|
- if (t <= time_t_max)
|
|
|
- break;
|
|
|
- time_t_max = t;
|
|
|
- }
|
|
|
- time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
|
|
|
-
|
|
|
- delta = time_t_max / 997; /* a suitable prime number */
|
|
|
- for (i = 0; i < N_STRINGS; i++)
|
|
|
- {
|
|
|
- if (tz_strings[i])
|
|
|
- putenv ((char*) tz_strings[i]);
|
|
|
-
|
|
|
- for (t = 0; t <= time_t_max - delta; t += delta)
|
|
|
- if (! mktime_test (t))
|
|
|
- return 1;
|
|
|
- if (! (mktime_test ((time_t) 1)
|
|
|
- && mktime_test ((time_t) (60 * 60))
|
|
|
- && mktime_test ((time_t) (60 * 60 * 24))))
|
|
|
- return 1;
|
|
|
-
|
|
|
- for (j = 1; ; j <<= 1)
|
|
|
- if (! bigtime_test (j))
|
|
|
- return 1;
|
|
|
- else if (INT_MAX / 2 < j)
|
|
|
- break;
|
|
|
- if (! bigtime_test (INT_MAX))
|
|
|
- return 1;
|
|
|
- }
|
|
|
- return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_working_mktime=yes
|
|
|
-else
|
|
|
- ac_cv_func_working_mktime=no
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
|
|
|
-$as_echo "$ac_cv_func_working_mktime" >&6; }
|
|
|
-if test $ac_cv_func_working_mktime = no; then
|
|
|
- case " $LIBOBJS " in
|
|
|
- *" mktime.$ac_objext "* ) ;;
|
|
|
- *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
|
|
|
- ;;
|
|
|
-esac
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
for ac_func in getpagesize
|
|
|
do :
|
|
|
ac_fn_cxx_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
|
|
|
@@ -8659,119 +8024,6 @@ $as_echo "#define HAVE_MMAP 1" >>build/confdefs.h
|
|
|
fi
|
|
|
rm -f conftest.mmap conftest.txt
|
|
|
|
|
|
-for ac_header in stdlib.h
|
|
|
-do :
|
|
|
- ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
|
|
|
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
|
|
|
- cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define HAVE_STDLIB_H 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-done
|
|
|
-
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
|
|
|
-$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
|
|
|
-if ${ac_cv_func_realloc_0_nonnull+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_realloc_0_nonnull=no
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
|
|
|
-# include <stdlib.h>
|
|
|
-#else
|
|
|
-char *realloc ();
|
|
|
-#endif
|
|
|
-
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
-return ! realloc (0, 0);
|
|
|
- ;
|
|
|
- return 0;
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_realloc_0_nonnull=yes
|
|
|
-else
|
|
|
- ac_cv_func_realloc_0_nonnull=no
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
|
|
|
-$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
|
|
|
-if test $ac_cv_func_realloc_0_nonnull = yes; then :
|
|
|
-
|
|
|
-$as_echo "#define HAVE_REALLOC 1" >>build/confdefs.h
|
|
|
-
|
|
|
-else
|
|
|
- $as_echo "#define HAVE_REALLOC 0" >>build/confdefs.h
|
|
|
-
|
|
|
- case " $LIBOBJS " in
|
|
|
- *" realloc.$ac_objext "* ) ;;
|
|
|
- *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
|
|
|
- ;;
|
|
|
-esac
|
|
|
-
|
|
|
-
|
|
|
-$as_echo "#define realloc rpl_realloc" >>build/confdefs.h
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
|
|
|
-$as_echo_n "checking whether stat accepts an empty string... " >&6; }
|
|
|
-if ${ac_cv_func_stat_empty_string_bug+:} false; then :
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- if test "$cross_compiling" = yes; then :
|
|
|
- ac_cv_func_stat_empty_string_bug=yes
|
|
|
-else
|
|
|
- cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
-/* end build/confdefs.h. */
|
|
|
-$ac_includes_default
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
-struct stat sbuf;
|
|
|
- return stat ("", &sbuf) == 0;
|
|
|
- ;
|
|
|
- return 0;
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
- ac_cv_func_stat_empty_string_bug=no
|
|
|
-else
|
|
|
- ac_cv_func_stat_empty_string_bug=yes
|
|
|
-fi
|
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
-fi
|
|
|
-
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
|
|
|
-$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
|
|
|
-if test $ac_cv_func_stat_empty_string_bug = yes; then
|
|
|
- case " $LIBOBJS " in
|
|
|
- *" stat.$ac_objext "* ) ;;
|
|
|
- *) LIBOBJS="$LIBOBJS stat.$ac_objext"
|
|
|
- ;;
|
|
|
-esac
|
|
|
-
|
|
|
-
|
|
|
-cat >>build/confdefs.h <<_ACEOF
|
|
|
-#define HAVE_STAT_EMPTY_STRING_BUG 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
|
|
|
ac_fn_cxx_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "#include <sys/types.h>
|
|
|
#include <sys/time.h>
|