diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-31 09:53:53 +0000 |
|---|---|---|
| committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-31 09:53:53 +0000 |
| commit | 9f4a1e1c75e86a38da22a3e82980fcddc4e58717 (patch) | |
| tree | 707fdec25c2510d52f3ba6b2e4da15ce9089efd0 | |
| parent | dfe6e74157e98a696b60c586a4ed0a35b9362838 (diff) | |
| download | busybox-w32-9f4a1e1c75e86a38da22a3e82980fcddc4e58717.tar.gz busybox-w32-9f4a1e1c75e86a38da22a3e82980fcddc4e58717.tar.bz2 busybox-w32-9f4a1e1c75e86a38da22a3e82980fcddc4e58717.zip | |
- add and use ATTRIBUTE_ALIGNED(num_bytes)
- remove unused parameter pindex from fdisk.c, xbsd_initlabel()
| -rw-r--r-- | include/platform.h | 4 | ||||
| -rw-r--r-- | networking/traceroute.c | 2 | ||||
| -rw-r--r-- | util-linux/fdisk.c | 11 |
3 files changed, 10 insertions, 7 deletions
diff --git a/include/platform.h b/include/platform.h index 763292d7a..773d6b8b2 100644 --- a/include/platform.h +++ b/include/platform.h | |||
| @@ -55,6 +55,10 @@ | |||
| 55 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) | 55 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) |
| 56 | #endif /* ATTRIBUTE_NORETURN */ | 56 | #endif /* ATTRIBUTE_NORETURN */ |
| 57 | 57 | ||
| 58 | #ifndef ATTRIBUTE_ALIGNED | ||
| 59 | #define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) | ||
| 60 | #endif /* ATTRIBUTE_ALIGNED */ | ||
| 61 | |||
| 58 | /* -fwhole-program makes all symbols local. The attribute externally_visible | 62 | /* -fwhole-program makes all symbols local. The attribute externally_visible |
| 59 | forces a symbol global. */ | 63 | forces a symbol global. */ |
| 60 | #ifndef ATTRIBUTE_EXTERNALLY_VISIBLE | 64 | #ifndef ATTRIBUTE_EXTERNALLY_VISIBLE |
diff --git a/networking/traceroute.c b/networking/traceroute.c index 95aa290a1..a9292a284 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
| @@ -293,7 +293,7 @@ struct IFADDRLIST { | |||
| 293 | static const char route[] = "/proc/net/route"; | 293 | static const char route[] = "/proc/net/route"; |
| 294 | 294 | ||
| 295 | /* last inbound (icmp) packet */ | 295 | /* last inbound (icmp) packet */ |
| 296 | static u_char packet[512] __attribute__((aligned (32))); | 296 | static u_char packet[512] ATTRIBUTE_ALIGNED(32); |
| 297 | 297 | ||
| 298 | static struct ip *outip; /* last output (udp) packet */ | 298 | static struct ip *outip; /* last output (udp) packet */ |
| 299 | static struct udphdr *outudp; /* last output (udp) packet */ | 299 | static struct udphdr *outudp; /* last output (udp) packet */ |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 48bea42c9..886b2695b 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
| @@ -867,8 +867,7 @@ static int xbsd_get_part_index (int max); | |||
| 867 | static int xbsd_check_new_partition (int *i); | 867 | static int xbsd_check_new_partition (int *i); |
| 868 | static void xbsd_list_types (void); | 868 | static void xbsd_list_types (void); |
| 869 | static u_short xbsd_dkcksum (struct xbsd_disklabel *lp); | 869 | static u_short xbsd_dkcksum (struct xbsd_disklabel *lp); |
| 870 | static int xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d, | 870 | static int xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d); |
| 871 | int pindex); | ||
| 872 | static int xbsd_readlabel (struct partition *p, struct xbsd_disklabel *d); | 871 | static int xbsd_readlabel (struct partition *p, struct xbsd_disklabel *d); |
| 873 | static int xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d); | 872 | static int xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d); |
| 874 | 873 | ||
| @@ -885,7 +884,7 @@ static int xbsd_part_index; | |||
| 885 | 884 | ||
| 886 | #if defined (__alpha__) | 885 | #if defined (__alpha__) |
| 887 | /* We access this through a uint64_t * when checksumming */ | 886 | /* We access this through a uint64_t * when checksumming */ |
| 888 | static char disklabelbuffer[BSD_BBSIZE] __attribute__((aligned(8))); | 887 | static char disklabelbuffer[BSD_BBSIZE] ATTRIBUTE_ALIGNED(8); |
| 889 | #else | 888 | #else |
| 890 | static char disklabelbuffer[BSD_BBSIZE]; | 889 | static char disklabelbuffer[BSD_BBSIZE]; |
| 891 | #endif | 890 | #endif |
| @@ -1223,9 +1222,9 @@ xbsd_create_disklabel (void) { | |||
| 1223 | if (xbsd_initlabel ( | 1222 | if (xbsd_initlabel ( |
| 1224 | #if defined (__alpha__) || defined (__powerpc__) || defined (__hppa__) || \ | 1223 | #if defined (__alpha__) || defined (__powerpc__) || defined (__hppa__) || \ |
| 1225 | defined (__s390__) || defined (__s390x__) | 1224 | defined (__s390__) || defined (__s390x__) |
| 1226 | NULL, &xbsd_dlabel, 0 | 1225 | NULL, &xbsd_dlabel |
| 1227 | #else | 1226 | #else |
| 1228 | xbsd_part, &xbsd_dlabel, xbsd_part_index | 1227 | xbsd_part, &xbsd_dlabel/* not used, xbsd_part_index*/ |
| 1229 | #endif | 1228 | #endif |
| 1230 | ) == 1) { | 1229 | ) == 1) { |
| 1231 | xbsd_print_disklabel (1); | 1230 | xbsd_print_disklabel (1); |
| @@ -1454,7 +1453,7 @@ xbsd_dkcksum (struct xbsd_disklabel *lp) { | |||
| 1454 | } | 1453 | } |
| 1455 | 1454 | ||
| 1456 | static int | 1455 | static int |
| 1457 | xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d, int pindex) { | 1456 | xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d) { |
| 1458 | struct xbsd_partition *pp; | 1457 | struct xbsd_partition *pp; |
| 1459 | 1458 | ||
| 1460 | get_geometry (); | 1459 | get_geometry (); |
