This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

[PATCH] Header fixes


Hi!

These two changes were necessary to compile libstdc++-v3 against glibc
2.1.91 headers. The latter one is needed because that library is being
compiled with -Werror.

2000-07-11  Jakub Jelinek  <jakub@redhat.com>

	* math/bits/cmathcalls.h (cimag): Add __THROW.
	(creal, conj): Likewise.
	* wctype/wctype.h (_ISwbit): Avoid warnings about shifting left
	by negative value.

--- libc/math/bits/cmathcalls.h.jj	Mon Nov  9 19:20:54 1998
+++ libc/math/bits/cmathcalls.h	Tue Jul 11 15:27:36 2000
@@ -135,21 +135,21 @@ __MATHDECL (_Mdouble_,creal, (_Mdouble_c
 
 /* Imaginary part of Z.  */
 extern __inline _Mdouble_
-__MATH_PRECNAME(cimag) (_Mdouble_complex_ __z)
+__MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) __THROW
 {
   return __imag__ __z;
 }
 
 /* Real part of Z.  */
 extern __inline _Mdouble_
-__MATH_PRECNAME(creal) (_Mdouble_complex_ __z)
+__MATH_PRECNAME(creal) (_Mdouble_complex_ __z) __THROW
 {
   return __real__ __z;
 }
 
 /* Complex conjugate of Z.  */
 extern __inline _Mdouble_complex_
-__MATH_PRECNAME(conj) (_Mdouble_complex_ __z)
+__MATH_PRECNAME(conj) (_Mdouble_complex_ __z) __THROW
 {
   return ~__z;
 }
--- libc/wctype/wctype.h.jj	Tue Jul 11 15:28:54 2000
+++ libc/wctype/wctype.h	Tue Jul 11 15:29:24 2000
@@ -70,10 +70,10 @@ typedef unsigned long int wctype_t;
 #   define _ISwbit(bit)	(1 << (bit))
 #  else /* __BYTE_ORDER == __LITTLE_ENDIAN */
 #   define _ISwbit(bit)	\
-	((bit) < 8 ? (int) (1UL << ((bit) + 24))			      \
-	 : ((bit) < 16 ? (int) (1UL << ((bit) + 8))			      \
-	    : ((bit) < 24 ? (int) (1UL << ((bit) - 8 ))			      \
-	       : (int) (1UL << ((bit) - 24 )))))
+	((bit) < 8 ? (int) ((1UL << (bit)) << 24)			      \
+	 : ((bit) < 16 ? (int) ((1UL << (bit)) << 8)			      \
+	    : ((bit) < 24 ? (int) ((1UL << (bit)) >> 8)			      \
+	       : (int) ((1UL << (bit)) >> 24))))
 #  endif
 
 enum

	Jakub

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