/* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */
#undef HAVE_AIX_SMT_EXP
-/* Define to 1 if you have the `alarm' function. */
-#undef HAVE_ALARM
-
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
may be supplied by this distribution. */
#undef HAVE_ALLOCA
/* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */
#undef HAVE_DBUS_WATCH_GET_UNIX_FD
+/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
+ */
+#undef HAVE_DECL_ALARM
+
/* Define to 1 if you have the declaration of `fdopendir', and to 0 if you
don't. */
#undef HAVE_DECL_FDOPENDIR
don't. */
#undef HAVE_DECL_UNSETENV
+/* Define to 1 if you have the declaration of `_putenv', and to 0 if you
+ don't. */
+#undef HAVE_DECL__PUTENV
+
/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
don't. */
#undef HAVE_DECL___FPENDING
/* Define to 1 if you have the `_ftime' function. */
#undef HAVE__FTIME
-/* Define to 1 if you have the `_putenv' function. */
-#undef HAVE__PUTENV
-
/* Define to 1 if _setjmp and _longjmp work. */
#undef HAVE__SETJMP
as_fn_append ac_header_list " stdint.h"
as_fn_append ac_header_list " inttypes.h"
as_fn_append ac_func_list " lstat"
-as_fn_append ac_func_list " alarm"
as_fn_append ac_header_list " sys/select.h"
as_fn_append ac_func_list " pselect"
as_fn_append ac_func_list " pthread_sigmask"
REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
REPLACE_TIMEGM=GNULIB_PORTCHECK;
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
GNULIB_PSELECT=0;
# include <unistd.h>
#endif
-#ifndef HAVE_ALARM
-# define alarm(X) /* empty */
+#if HAVE_DECL_ALARM
+# include <signal.h>
#endif
/* Work around redefinition to rpl_putenv by other config tests. */
int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
int time_t_signed = ! ((time_t) 0 < (time_t) -1);
+#if HAVE_DECL_ALARM
/* This test makes some buggy mktime implementations loop.
Give up after 60 seconds; a mktime slower than that
isn't worth using anyway. */
+ signal (SIGALRM, SIG_DFL);
alarm (60);
+#endif
time_t_max = (! time_t_signed
? (time_t) -1
gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
- for ac_func in _putenv
-do :
- ac_fn_c_check_func "$LINENO" "_putenv" "ac_cv_func__putenv"
-if test "x$ac_cv_func__putenv" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE__PUTENV 1
-_ACEOF
-
+ ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl__putenv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
fi
-done
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__PUTENV $ac_have_decl
+_ACEOF
fi