summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorMarek Polacek <mpolacek@redhat.com>2011-07-20 12:35:29 -0400
committerUlrich Drepper <drepper@gmail.com>2011-07-20 12:35:29 -0400
commit295e904fe6cc5b2d0535ff6016a08b6162d7e22c (patch)
treec8cc4eecfd22b589cf39d33da42f6e3d787033af /misc
parent3ff9459622c6ed4449381c0db453c0e5a9c79993 (diff)
downloadglibc-295e904fe6cc5b2d0535ff6016a08b6162d7e22c.tar.gz
Add const attr to gnu_dev_{major,minor,makedev}
Diffstat (limited to 'misc')
-rw-r--r--misc/sys/cdefs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index c9495a479e..165a94a64b 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2002, 2004, 2005, 2006, 2007, 2009
+/* Copyright (C) 1992-2001, 2002, 2004, 2005, 2006, 2007, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -218,6 +218,13 @@
# define __attribute_pure__ /* Ignore */
#endif
+/* This declaration tells the compiler that the value is constant. */
+#if __GNUC_PREREQ (2,5)
+# define __attribute_const__ __attribute__ ((__const__))
+#else
+# define __attribute_const__ /* Ignore */
+#endif
+
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */