summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-06 12:53:44 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-06 12:53:44 -0700
commit9afafefb1b8341816a20eac9491f3f9aaf2aea61 (patch)
tree0cddbd8afe6099fb0a4bdf3f3628d5b7a70f68d7
parent001903b5498d4898455e1a69bff166a9cc699ec0 (diff)
downloademacs-9afafefb1b8341816a20eac9491f3f9aaf2aea61.tar.gz
Merge from gnulib.
* lib/careadlinkat.c, lib/careadlinkat.h, m4/gnulib-common.m4: Merge.
-rw-r--r--ChangeLog5
-rw-r--r--lib/careadlinkat.c2
-rw-r--r--lib/careadlinkat.h5
-rw-r--r--m4/gnulib-common.m416
4 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c0e5329964e..020991e4677 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ Merge from gnulib.
+ * lib/careadlinkat.c, lib/careadlinkat.h, m4/gnulib-common.m4: Merge.
+
2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
* lib/allocator.h, lib/careadlinkat.c: Merge from gnulib.
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c
index 6e4aa1395ff..751578b9a58 100644
--- a/lib/careadlinkat.c
+++ b/lib/careadlinkat.c
@@ -39,7 +39,6 @@
#include "allocator.h"
-#if ! HAVE_READLINKAT
/* Get the symbolic link value of FILENAME and put it into BUFFER, with
size BUFFER_SIZE. This function acts like readlink but has
readlinkat's signature. */
@@ -53,7 +52,6 @@ careadlinkatcwd (int fd, char const *filename, char *buffer,
abort ();
return readlink (filename, buffer, buffer_size);
}
-#endif
/* Assuming the current directory is FD, get the symbolic link value
of FILENAME as a null-terminated string and put it into a buffer.
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
index 4f0184bbc33..6576fb2cecc 100644
--- a/lib/careadlinkat.h
+++ b/lib/careadlinkat.h
@@ -56,8 +56,7 @@ char *careadlinkat (int fd, char const *filename,
when doing a plain readlink:
Pass FD = AT_FDCWD and PREADLINKAT = careadlinkatcwd. */
#if HAVE_READLINKAT
-/* AT_FDCWD is declared in <fcntl.h>, readlinkat in <unistd.h>. */
-# define careadlinkatcwd readlinkat
+/* AT_FDCWD is declared in <fcntl.h>. */
#else
/* Define AT_FDCWD independently, so that the careadlinkat module does
not depend on the fcntl-h module. The value does not matter, since
@@ -66,8 +65,8 @@ char *careadlinkat (int fd, char const *filename,
# ifndef AT_FDCWD
# define AT_FDCWD (-3041965)
# endif
+#endif
ssize_t careadlinkatcwd (int fd, char const *filename,
char *buffer, size_t buffer_size);
-#endif
#endif /* _GL_CAREADLINKAT_H */
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index c4d7a20ea35..8b73f1d022e 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 24
+# gnulib-common.m4 serial 25
dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -34,6 +34,20 @@ AC_DEFUN([gl_COMMON_BODY], [
/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
+
+/* The __pure__ attribute was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
])
dnl Preparation for running test programs:
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not