summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sys
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 /sysdeps/unix/sysv/linux/sys
parent3ff9459622c6ed4449381c0db453c0e5a9c79993 (diff)
downloadglibc-295e904fe6cc5b2d0535ff6016a08b6162d7e22c.tar.gz
glibc-295e904fe6cc5b2d0535ff6016a08b6162d7e22c.tar.xz
glibc-295e904fe6cc5b2d0535ff6016a08b6162d7e22c.zip
Add const attr to gnu_dev_{major,minor,makedev}
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
-rw-r--r--sysdeps/unix/sysv/linux/sys/sysmacros.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h
index 3fc01dff11..4600c93694 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)