about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-11-19 10:03:46 -0800
committerPetr Baudis <pasky@ucw.cz>2009-11-19 22:16:56 +0100
commit488e337a17866ebdb9ca6a07f91fc9fcf9f1c3db (patch)
tree85befe0ea9792d360e96c7a9767e0830013007e2 /sysdeps
parentb12103e146512f80531ccced34ec8f106d3cec66 (diff)
downloadglibc-488e337a17866ebdb9ca6a07f91fc9fcf9f1c3db.tar.gz
glibc-488e337a17866ebdb9ca6a07f91fc9fcf9f1c3db.tar.xz
glibc-488e337a17866ebdb9ca6a07f91fc9fcf9f1c3db.zip
Avoid warnings in CPU_* macros when using const bitsets.
(cherry picked from commit 03ebadd9eaa4663f58bd3fa6fe8283f255925632)
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 95d05b4ab2..18269a99b9 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -1,6 +1,6 @@
 /* Definitions of constants and data structure for POSIX 1003.1b-1993
    scheduling interface.
-   Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008
+   Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -154,7 +154,7 @@ typedef struct
   (__extension__							      \
    ({ size_t __cpu = (cpu);						      \
       __cpu < 8 * (setsize)						      \
-      ? ((((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]	      \
+      ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]      \
 	  & __CPUMASK (__cpu))) != 0					      \
       : 0; }))
 
@@ -167,8 +167,8 @@ typedef struct
 # else
 #  define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
   (__extension__							      \
-   ({ __cpu_mask *__arr1 = (cpusetp1)->__bits;				      \
-      __cpu_mask *__arr2 = (cpusetp2)->__bits;				      \
+   ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits;			      \
+      __const __cpu_mask *__arr2 = (cpusetp2)->__bits;			      \
       size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
       size_t __i;							      \
       for (__i = 0; __i < __imax; ++__i)				      \
@@ -180,8 +180,8 @@ typedef struct
 # define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
   (__extension__							      \
    ({ cpu_set_t *__dest = (destset);					      \
-      __cpu_mask *__arr1 = (srcset1)->__bits;				      \
-      __cpu_mask *__arr2 = (srcset2)->__bits;				      \
+      __const __cpu_mask *__arr1 = (srcset1)->__bits;			      \
+      __const __cpu_mask *__arr2 = (srcset2)->__bits;			      \
       size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
       size_t __i;							      \
       for (__i = 0; __i < __imax; ++__i)				      \