summaryrefslogtreecommitdiff
path: root/m4/readlinkat.m4
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-08-09 11:16:07 -0600
committerEric Blake <eblake@redhat.com>2010-08-09 11:16:31 -0600
commitbe5bb85c5cbfe813efb92e7de9c8d29860de8f09 (patch)
tree7c66f4a5bcf11e5bedc61f28308bb518d394638d /m4/readlinkat.m4
parentacc262490748a9999e4def60e3f4510865ca3a5d (diff)
downloadgnulib-be5bb85c5cbfe813efb92e7de9c8d29860de8f09.tar.gz
readlinkat: split into its own module
* modules/symlinkat: Split readlinkat... * modules/readlinkat: ...into separate module. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move readlinkat check... * m4/readlinkat.m4 (gl_FUNC_READLINAT): ...to new file. * lib/symlinkat.c (readlinkat): Move... * lib/readlinkat.c: ...into new file. * modules/symlinkat-tests: Split readlinkat test... * modules/readlinkat-tests: ...into separate module. * tests/test-symlinkat.c: Split... * tests/test-readlinkat.c: ...into new file. * NEWS: Document the split. * doc/posix-functions/readlinkat.texi (readlinkat): Likewise. * lib/unistd.in.h (readlinkat): Likewise. Suggested by Bruno Haible. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'm4/readlinkat.m4')
-rw-r--r--m4/readlinkat.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4
new file mode 100644
index 0000000000..a3897498ae
--- /dev/null
+++ b/m4/readlinkat.m4
@@ -0,0 +1,21 @@
+# serial 1
+# See if we need to provide readlinkat replacement.
+
+dnl Copyright (C) 2009-2010 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.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_READLINKAT],
+[
+ AC_REQUIRE([gl_FUNC_OPENAT])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([readlinkat])
+ if test $ac_cv_func_readlinkat = no; then
+ HAVE_READLINKAT=0
+ AC_LIBOBJ([readlinkat])
+ fi
+])