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.
This commit is contained in:
plunky 2014-07-14 18:50:22 +00:00
parent 409868ac4b
commit 0bf6a577c7

View File

@ -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