summaryrefslogtreecommitdiff
path: root/m4/time_r.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-11-15 20:16:40 +0100
committerLudovic Courtès <ludo@gnu.org>2009-11-16 09:23:46 +0100
commit8912421cf3829a4fd65877fd1255125c191f6f89 (patch)
tree6b89fecf0738a1f80792bbe7453730f7882f1d54 /m4/time_r.m4
parent3fe87cf7aff396d7bd993aa009f48eb8afd6c1cd (diff)
downloadguile-8912421cf3829a4fd65877fd1255125c191f6f89.tar.gz
Use Gnulib's `inet_ntop' and `inet_pton' modules.
* m4/gnulib-cache.m4: Add `inet_ntop' and `inet_pton'. * configure.ac: Don't check for `inet_ntop' and `inet_pton'. * libguile/socket.c (scm_inet_pton, scm_inet_ntop): Compile regardless of `HAVE_INET_PTON' and `HAVE_INET_NTOP' respectively. * libguile/filesys.c: Use <stdlib.h> instead of <canonicalize.h>.
Diffstat (limited to 'm4/time_r.m4')
-rw-r--r--m4/time_r.m420
1 files changed, 10 insertions, 10 deletions
diff --git a/m4/time_r.m4 b/m4/time_r.m4
index c871b56d7..de22db906 100644
--- a/m4/time_r.m4
+++ b/m4/time_r.m4
@@ -1,6 +1,6 @@
dnl Reentrant time functions like localtime_r.
-dnl Copyright (C) 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,15 +17,15 @@ AC_DEFUN([gl_TIME_R],
AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature],
[gl_cv_time_r_posix],
- [AC_TRY_COMPILE(
- [#include <time.h>],
- [/* We don't need to append 'restrict's to the argument types,
- even though the POSIX signature has the 'restrict's,
- since C99 says they can't affect type compatibility. */
- struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
- if (ptr) return 0;
- /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */
- *localtime_r (0, 0);],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <time.h>]],
+ [[/* We don't need to append 'restrict's to the argument types,
+ even though the POSIX signature has the 'restrict's,
+ since C99 says they can't affect type compatibility. */
+ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+ if (ptr) return 0;
+ /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */
+ *localtime_r (0, 0);]])],
[gl_cv_time_r_posix=yes],
[gl_cv_time_r_posix=no])])
if test $gl_cv_time_r_posix = yes; then