summaryrefslogtreecommitdiff
path: root/m4/lstat.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/lstat.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/lstat.m4')
-rw-r--r--m4/lstat.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/m4/lstat.m4 b/m4/lstat.m4
new file mode 100644
index 000000000..089d0ff59
--- /dev/null
+++ b/m4/lstat.m4
@@ -0,0 +1,28 @@
+# serial 20
+
+# Copyright (C) 1997-2001, 2003-2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_LSTAT],
+[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ dnl If lstat does not exist, the replacement <sys/stat.h> does
+ dnl "#define lstat stat", and lstat.c is a no-op.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ if test $ac_cv_func_lstat = yes; then
+ AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+ AC_REQUIRE([AC_C_INLINE])
+ else
+ HAVE_LSTAT=0
+ fi
+])