sfdisk: do not depend on arch for packed attribute
PATCH 3/5 sfdisk: do not depend on arch for packed attribute
From: Davidlohr Bueso <[email protected]>
The packed gcc function attribute is moved to c.h and the arch-specific checks are removed since there is no harm in other platforms having the attribute, it will just make no difference.
--- fdisk/sfdisk.c | 9 --------- include/c.h | 3 +++ 2 files changed, 3 insertions(+), 9 deletions(-)
fdisk/sfdisk.c +0 -9
@@ -115,15 +115,6 @@ error(char *s, ...) { }/* -* arm needs PACKED - use it everywhere? -*/ -#if defined(__GNUC__) && (defined(__arm__) || defined(__alpha__)) -#define PACKED __attribute__ ((packed)) -#else -#define PACKED -#endif - -/* * A. About seeking */
include/c.h +3 -0
@@ -39,10 +39,13 @@ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \ }) +# define PACKED __attribute__ ((packed)) +#else /* !__GNUC__ */ # define __must_be_array (a) 0# define __attribute__ (_arg_)# define ignore_result (x) ((void) (x)) +# define PACKED #endif /* !__GNUC__ */ /*
Signature · 1 line
1.7.4.1