summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-09 04:28:21 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-09 04:28:21 +0000
commitd843131446fa32915ceb12049d3606062307a8fe (patch)
tree682bf1ffda298891ad7163b4f5f8b0e4aadb0a24 /include
parent1ed1385ecb1c11d6915adac74afa2ff7da8be5d1 (diff)
Modify obstack.[hc] to avoid having to include other gnulib files
Using the standard gnulib obstack source requires importing quite a lot of other files from gnulib, and requires build changes. include/ * obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE. libiberty/ * obstack.c (__alignof__): Expand alignof_type from alignof.h. (obstack_exit_failure): Don't use exitfail.h. (_): Include libintl.h when HAVE_LIBINTL_H and nls enabled. Provide default. Don't include gettext.h. (_Noreturn): Define. * obstacks.texi: Adjust node references to external libc info files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229988 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/obstack.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index e7b137ed24f0..004d355228a5 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,6 +1,11 @@
2015-11-09 Alan Modra <amodra@gmail.com>
PR gdb/17133
+ * obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
+
+2015-11-09 Alan Modra <amodra@gmail.com>
+
+ PR gdb/17133
* obstack.h: Import current gnulib file.
2015-11-05 Jakub Jelinek <jakub@redhat.com>
diff --git a/include/obstack.h b/include/obstack.h
index 0ff330984430..0d13c72d056c 100644
--- a/include/obstack.h
+++ b/include/obstack.h
@@ -142,7 +142,11 @@
P, A)
#ifndef __attribute_pure__
-# define __attribute_pure__ _GL_ATTRIBUTE_PURE
+# if defined __GNUC_MINOR__ && __GNUC__ * 1000 + __GNUC_MINOR__ >= 2096
+# define __attribute_pure__ __attribute__ ((__pure__))
+# else
+# define __attribute_pure__
+# endif
#endif
#ifdef __cplusplus