All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH 3/5] sfdisk: do not depend on arch for packed attribute
Date: Tue, 20 Dec 2011 14:42:05 +0100	[thread overview]
Message-ID: <1324388525.3316.9.camel@offbook> (raw)

From: Davidlohr Bueso <dave@gnu.org>

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(-)

diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 979eadc..fdc63d6 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -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
  */
 
diff --git a/include/c.h b/include/c.h
index 073615e..26582e4 100644
--- a/include/c.h
+++ b/include/c.h
@@ -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__ */
 
 /*
-- 
1.7.4.1





         reply	other threads:[~2011-12-20 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 23:02 [PATCH 2/2] sfdisk: use is_blkdev Davidlohr Bueso
2012-01-04 23:02 ` [PATCH 1/2] blkdev: add is_blkdev function Davidlohr Bueso
2012-01-04 22:28   ` [PATCH] lscpu: fix compiler warnings Davidlohr Bueso
     [not found]     ` <1324994959-24298-1-git-send-email-gaowanlong@cn.fujitsu.com>
2011-12-20 13:42       ` [PATCH 4/5] fdisk: remove packed definitions Davidlohr Bueso
2011-12-20 13:42         ` Davidlohr Bueso [this message]
2012-01-05 16:29           ` [PATCH 3/5] sfdisk: do not depend on arch for packed attribute Karel Zak
2011-12-22  2:33         ` [PATCH 4/5] fdisk: remove packed definitions Guillem Jover
2012-01-05 16:30     ` [PATCH] lscpu: fix compiler warnings Karel Zak
2012-01-05 16:31   ` [PATCH 1/2] blkdev: add is_blkdev function Karel Zak
2012-01-05 16:31 ` [PATCH 2/2] sfdisk: use is_blkdev Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1324388525.3316.9.camel@offbook \
    --to=dave@gnu.org \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.