This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-124-g295e904


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  295e904fe6cc5b2d0535ff6016a08b6162d7e22c (commit)
      from  3ff9459622c6ed4449381c0db453c0e5a9c79993 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=295e904fe6cc5b2d0535ff6016a08b6162d7e22c

commit 295e904fe6cc5b2d0535ff6016a08b6162d7e22c
Author: Marek Polacek <mpolacek@redhat.com>
Date:   Wed Jul 20 12:35:29 2011 -0400

    Add const attr to gnu_dev_{major,minor,makedev}

diff --git a/ChangeLog b/ChangeLog
index 13def71..2d05c82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-12  Marek Polacek  <mpolacek@redhat.com>
+
+	* misc/sys/cdefs.h: Add support for const attribute.
+	* sysdeps/unix/sysv/linux/sys/sysmacros.h: Add __attribute_const__
+	to gnu_dev_{major,minor,makedev} functions.
+
 2011-07-20  Marek Polacek  <mpolacek@redhat.com>
 
 	* intl/dcigettext.c (get_output_charset): Add missing bracket.
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index c9495a4..165a94a 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.  */
diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h
index 3fc01df..4600c93 100644
--- a/sysdeps/unix/sysv/linux/sys/sysmacros.h
+++ b/sysdeps/unix/sysv/linux/sys/sysmacros.h
@@ -31,29 +31,29 @@ __BEGIN_DECLS
 
 __extension__
 extern unsigned int gnu_dev_major (unsigned long long int __dev)
-     __THROW;
+     __THROW __attribute_const__;
 __extension__
 extern unsigned int gnu_dev_minor (unsigned long long int __dev)
-     __THROW;
+     __THROW __attribute_const__;
 __extension__
 extern unsigned long long int gnu_dev_makedev (unsigned int __major,
 					       unsigned int __minor)
-     __THROW;
+     __THROW __attribute_const__;
 
 # if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES
-__extension__ __extern_inline unsigned int
+__extension__ __extern_inline __attribute_const__ unsigned int
 __NTH (gnu_dev_major (unsigned long long int __dev))
 {
   return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
 }
 
-__extension__ __extern_inline unsigned int
+__extension__ __extern_inline __attribute_const__ unsigned int
 __NTH (gnu_dev_minor (unsigned long long int __dev))
 {
   return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
 }
 
-__extension__ __extern_inline unsigned long long int
+__extension__ __extern_inline __attribute_const__ unsigned long long int
 __NTH (gnu_dev_makedev (unsigned int __major, unsigned int __minor))
 {
   return ((__minor & 0xff) | ((__major & 0xfff) << 8)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                               |    6 ++++++
 misc/sys/cdefs.h                        |    9 ++++++++-
 sysdeps/unix/sysv/linux/sys/sysmacros.h |   12 ++++++------
 3 files changed, 20 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]