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]
Other format: [Raw text]

Fix ia64/sys/ucontext.h für g++ 3.5


G++ 3.5 no longer treats _SC_GR0_OFFSET as an integral constant expression.

2004-09-01  Andreas Schwab  <schwab@suse.de>

	* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h [g++ >= 3.5]: Use
	__builtin_offsetof.

--- sysdeps/unix/sysv/linux/ia64/sys/ucontext.h.~1.7.~	2003-01-16 11:33:48.000000000 +0100
+++ sysdeps/unix/sysv/linux/ia64/sys/ucontext.h	2004-09-01 11:26:14.058657019 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,10 @@
 
 typedef struct sigcontext mcontext_t;
 
-#ifdef __GNUC__
+#if defined __cplusplus && __GNUC_PREREQ (3, 5)
+# define _SC_GR0_OFFSET	\
+	__builtin_offsetof (struct sigcontext, sc_gr[0])
+#elif defined __GNUC__
 # define _SC_GR0_OFFSET	\
 	(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)
 #else

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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