1.1 --- a/epoc32/include/stdapis/sys/cdefs.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/stdapis/sys/cdefs.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,5 +1,5 @@
1.4 /*-
1.5 - * © Portions copyright (c) 2005 Nokia Corporation. All rights reserved.
1.6 + *
1.7 * Copyright (c) 1991, 1993
1.8 * The Regents of the University of California. All rights reserved.
1.9 *
1.10 @@ -29,7 +29,7 @@
1.11 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1.12 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1.13 * SUCH DAMAGE.
1.14 -* © Portions copyright (c) 2007-2008 Symbian Software Ltd. All rights reserved.
1.15 +* © Portions Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.16 * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
1.17 * $FreeBSD: src/sys/sys/cdefs.h,v 1.88.2.1 2005/10/09 07:48:48 netchild Exp $
1.18 */
1.19 @@ -247,8 +247,10 @@
1.20 #endif
1.21
1.22 /* XXX: should use `#if __STDC_VERSION__ < 199901'. */
1.23 +#if __STDC_VERSION__ < 199901
1.24 #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
1.25 -#define __func__ NULL
1.26 +#define __func__ ""
1.27 +#endif
1.28 #endif
1.29
1.30 #if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
1.31 @@ -324,15 +326,24 @@
1.32 * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
1.33 * require it.
1.34 */
1.35 -
1.36 -#if !defined(__cplusplus) || defined(__SYMBIAN32__)
1.37 +#if !defined(__cplusplus)
1.38 #define __offsetof(type, field) ((size_t)(&((type *)0)->field))
1.39 #else
1.40 +#if defined(__GNUC__)
1.41 +#if(__GNUC__ > 3)
1.42 #define __offsetof(type, field) \
1.43 - (__offsetof__ (reinterpret_cast <size_t> \
1.44 - (&reinterpret_cast <const volatile char &> \
1.45 - (static_cast<type *> (0)->field))))
1.46 + (__builtin_offsetof (type,field))
1.47 +#else
1.48 +#define __offsetof(type, field) \
1.49 + (__offsetof__ (type,field))
1.50 #endif
1.51 +#else
1.52 +#define __offsetof(type, field) (reinterpret_cast <size_t> \
1.53 + (&reinterpret_cast <const volatile char &> \
1.54 + (static_cast<type *> (0)->field)))
1.55 +#endif
1.56 +#endif
1.57 +
1.58 #define __rangeof(type, start, end) \
1.59 (__offsetof(type, end) - __offsetof(type, start))
1.60