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, release/2.11/master, updated. glibc-2.11-23-g16b583e


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, release/2.11/master has been updated
       via  16b583ea7ec0b96c8908e6c5418836f74554329a (commit)
       via  488e337a17866ebdb9ca6a07f91fc9fcf9f1c3db (commit)
      from  b12103e146512f80531ccced34ec8f106d3cec66 (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=16b583ea7ec0b96c8908e6c5418836f74554329a

commit 16b583ea7ec0b96c8908e6c5418836f74554329a
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Thu Nov 19 10:29:16 2009 -0800

    Fix getwc* and putwc* on non-wide streams.
    
    (cherry picked from commit df1934daa7788ca5f19d82efb02cdf9b9c495b1a)

diff --git a/ChangeLog b/ChangeLog
index 34d486a..b6f77ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-11-19  Ulrich Drepper  <drepper@redhat.com>
 
+	[BZ #10958]
+	* libio/libio.h (_IO_getwc_unlocked): Check for _wide_data being
+	initialized before using it.
+	(_IO_putwc_unlocked): Likewise.
+
 	[BZ #10918]
 	* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_ISSET_S): Use __const
 	in cast to not throw away const-ness of parameters.
diff --git a/libio/libio.h b/libio/libio.h
index 643812f..3c9f2bd 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1995,1997-2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995,1997-2006,2007,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -442,13 +442,15 @@ extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t);
 
 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
 # define _IO_getwc_unlocked(_fp) \
-  (_IO_BE ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end,\
-	   0) \
+  (_IO_BE ((_fp)->_wide_data == NULL					\
+	   || ((_fp)->_wide_data->_IO_read_ptr				\
+	       >= (_fp)->_wide_data->_IO_read_end), 0)			\
    ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++)
 # define _IO_putwc_unlocked(_wch, _fp) \
-  (_IO_BE ((_fp)->_wide_data->_IO_write_ptr \
-	   >= (_fp)->_wide_data->_IO_write_end, 0) \
-   ? __woverflow (_fp, _wch) \
+  (_IO_BE ((_fp)->_wide_data == NULL					\
+	   || ((_fp)->_wide_data->_IO_write_ptr				\
+	       >= (_fp)->_wide_data->_IO_write_end), 0)			\
+   ? __woverflow (_fp, _wch)						\
    : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))
 #endif
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=488e337a17866ebdb9ca6a07f91fc9fcf9f1c3db

commit 488e337a17866ebdb9ca6a07f91fc9fcf9f1c3db
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Thu Nov 19 10:03:46 2009 -0800

    Avoid warnings in CPU_* macros when using const bitsets.
    
    (cherry picked from commit 03ebadd9eaa4663f58bd3fa6fe8283f255925632)

diff --git a/ChangeLog b/ChangeLog
index bbc9eb0..34d486a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-19  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #10918]
+	* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_ISSET_S): Use __const
+	in cast to not throw away const-ness of parameters.
+	(__CPU_EQUAL_S): Likewise.
+	(__CPU_OP_S): Likewise.
+
 2009-11-17  Paolo Bonzini  <bonzini@gnu.org>
 
 	* posix/bug-regex30.c: New file.
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 95d05b4..18269a9 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)				      \

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

Summary of changes:
 ChangeLog                            |   13 +++++++++++++
 libio/libio.h                        |   14 ++++++++------
 sysdeps/unix/sysv/linux/bits/sched.h |   12 ++++++------
 3 files changed, 27 insertions(+), 12 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]