Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys remove PCC specific definitions for __packed, __alig...



details:   https://anonhg.NetBSD.org/src/rev/b4e299317ace
branches:  trunk
changeset: 330587:b4e299317ace
user:      plunky <plunky%NetBSD.org@localhost>
date:      Mon Jul 14 18:50:22 2014 +0000

description:
remove PCC specific definitions for __packed, __aligned and __section
which result in a _Pragma() usage.  I don't think this ever worked,
as you can't concatenate string literals in this way.  A warning
would have been produced, but until recently did not result in an
error condition so this was overlooked. Use __attribute__ instead as
this is supported by PCC.

diffstat:

 sys/sys/cdefs.h |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (25 lines):

diff -r 1403b84fca8f -r b4e299317ace sys/sys/cdefs.h
--- a/sys/sys/cdefs.h   Mon Jul 14 16:29:50 2014 +0000
+++ b/sys/sys/cdefs.h   Mon Jul 14 18:50:22 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdefs.h,v 1.119 2014/03/13 20:36:01 pooka Exp $        */
+/*     $NetBSD: cdefs.h,v 1.120 2014/07/14 18:50:22 plunky Exp $       */
 
 /* * Copyright (c) 1991, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -353,14 +353,10 @@
 #define        __packed        __packed
 #define        __aligned(x)    /* delete */
 #define        __section(x)    /* delete */
-#elif __GNUC_PREREQ__(2, 7)
+#elif __GNUC_PREREQ__(2, 7) || defined(__PCC__)
 #define        __packed        __attribute__((__packed__))
 #define        __aligned(x)    __attribute__((__aligned__(x)))
 #define        __section(x)    __attribute__((__section__(x)))
-#elif defined(__PCC__)
-#define        __packed        _Pragma("packed 1")
-#define        __aligned(x)    _Pragma("aligned " __STRING(x))
-#define        __section(x)    _Pragma("section " ## x)
 #elif defined(_MSC_VER)
 #define        __packed        /* ignore */
 #else



Home | Main Index | Thread Index | Old Index