diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
commit | 86f5c9906beac527f3d7966f24811b571a589e08 (patch) | |
tree | 1c9eba853c728b5d734506e1c66c269d96fe46ea | |
parent | 2edf52643d3eb3d13f26d31f9678cf122f2063bc (diff) | |
download | busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.gz busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.bz2 busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.zip |
- add platform.h.
- use shorter boilerplate while at it.
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | applets/busybox.c | 2 | ||||
-rw-r--r-- | archival/libunarchive/header_skip.c | 2 | ||||
-rw-r--r-- | archival/unzip.c | 23 | ||||
-rw-r--r-- | coreutils/stty.c | 13 | ||||
-rw-r--r-- | e2fsprogs/tune2fs.c | 2 | ||||
-rw-r--r-- | e2fsprogs/uuid/uuid.h | 2 | ||||
-rw-r--r-- | editors/awk.c | 19 | ||||
-rw-r--r-- | include/busybox.h | 23 | ||||
-rw-r--r-- | include/libbb.h | 43 | ||||
-rw-r--r-- | include/platform.h | 82 | ||||
-rw-r--r-- | loginutils/adduser.c | 17 | ||||
-rw-r--r-- | loginutils/getty.c | 2 | ||||
-rw-r--r-- | networking/inetd.c | 22 | ||||
-rw-r--r-- | networking/libiproute/ip_common.h | 5 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 2 | ||||
-rw-r--r-- | networking/libiproute/utils.h | 9 | ||||
-rw-r--r-- | networking/nameif.c | 4 | ||||
-rw-r--r-- | networking/traceroute.c | 2 | ||||
-rw-r--r-- | networking/udhcp/arpping.h | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 18 | ||||
-rw-r--r-- | networking/udhcp/dumpleases.c | 6 | ||||
-rw-r--r-- | networking/zcip.c | 19 | ||||
-rw-r--r-- | shell/ash.c | 34 | ||||
-rw-r--r-- | shell/hush.c | 16 | ||||
-rw-r--r-- | shell/lash.c | 17 | ||||
-rw-r--r-- | sysklogd/klogd.c | 19 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 17 | ||||
-rw-r--r-- | util-linux/fdisk.c | 9 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 2 |
30 files changed, 182 insertions, 264 deletions
@@ -381,7 +381,7 @@ docs/busybox.net/BusyBox.html: docs/busybox.pod | |||
381 | scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c | 381 | scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c |
382 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< | 382 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< |
383 | 383 | ||
384 | DEP_INCLUDES := include/config.h include/bb_config.h | 384 | DEP_INCLUDES := include/config.h include/bb_config.h include/_usage.h |
385 | 385 | ||
386 | ifeq ($(strip $(CONFIG_BBCONFIG)),y) | 386 | ifeq ($(strip $(CONFIG_BBCONFIG)),y) |
387 | DEP_INCLUDES += include/bbconfigopts.h | 387 | DEP_INCLUDES += include/bbconfigopts.h |
@@ -411,13 +411,22 @@ include/bb_config.h: include/config.h | |||
411 | < $< >> $@ | 411 | < $< >> $@ |
412 | @echo "#endif" >> $@ | 412 | @echo "#endif" >> $@ |
413 | 413 | ||
414 | # Create macros for usage.h, e.g.: | ||
415 | #if ENABLE_HAVE_DOT_CONFIG | ||
416 | #define USAGE_HAVE_DOT_CONFIG(a) a | ||
417 | #else | ||
418 | #define USAGE_HAVE_DOT_CONFIG(a) | ||
419 | #endif | ||
420 | include/_usage.h: .config | ||
421 | awk '/CONFIG|BB_APPLET/{gsub("#[[:space:]]*|=y|.*CONFIG_|.*BB_APPLET_","");if(!/=/){print("#if ENABLE_"$$1"\n#define USAGE_"$$1"(a) a\n#else\n#define USAGE_"$$1"(a)\n#endif");}}' $(<) > $(@) | ||
422 | |||
414 | clean: | 423 | clean: |
415 | - $(MAKE) -C scripts/config $@ | 424 | - $(MAKE) -C scripts/config $@ |
416 | - $(RM_F) docs/busybox.dvi docs/busybox.ps \ | 425 | - $(RM_F) docs/busybox.dvi docs/busybox.ps \ |
417 | docs/busybox.pod docs/busybox.net/busybox.html \ | 426 | docs/busybox.pod docs/busybox.net/busybox.html \ |
418 | docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \ | 427 | docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \ |
419 | docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \ | 428 | docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \ |
420 | docs/busybox.net/BusyBox.html busybox.links libbb/loop.h \ | 429 | docs/busybox.net/BusyBox.html busybox.links include/_usage.h \ |
421 | $(DO_INSTALL_LIBS) $(LIBBUSYBOX_SONAME) \ | 430 | $(DO_INSTALL_LIBS) $(LIBBUSYBOX_SONAME) \ |
422 | .config.old busybox | 431 | .config.old busybox |
423 | - rm -rf _install testsuite/links | 432 | - rm -rf _install testsuite/links |
diff --git a/applets/busybox.c b/applets/busybox.c index 3d7a0fd0b..db78b7ccd 100644 --- a/applets/busybox.c +++ b/applets/busybox.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #define setlocale(x,y) | 11 | #define setlocale(x,y) |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | const char *bb_applet_name __attribute__((externally_visible)); | 14 | const char *bb_applet_name ATTRIBUTE_EXTERNALLY_VISIBLE; |
15 | 15 | ||
16 | #ifdef CONFIG_FEATURE_INSTALLER | 16 | #ifdef CONFIG_FEATURE_INSTALLER |
17 | /* | 17 | /* |
diff --git a/archival/libunarchive/header_skip.c b/archival/libunarchive/header_skip.c index 0b153980e..963d113a4 100644 --- a/archival/libunarchive/header_skip.c +++ b/archival/libunarchive/header_skip.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include "unarchive.h" | 2 | #include "unarchive.h" |
3 | 3 | ||
4 | extern void header_skip(const file_header_t *file_header __attribute__((unused))) | 4 | extern void header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED) |
5 | { | 5 | { |
6 | } | 6 | } |
diff --git a/archival/unzip.c b/archival/unzip.c index 50d148692..caac716cc 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -7,20 +7,7 @@ | |||
7 | * Loosely based on original busybox unzip applet by Laurence Anderson. | 7 | * Loosely based on original busybox unzip applet by Laurence Anderson. |
8 | * All options and features should work in this version. | 8 | * All options and features should work in this version. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | * General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | 11 | */ |
25 | 12 | ||
26 | /* For reference see | 13 | /* For reference see |
@@ -79,12 +66,12 @@ typedef union { | |||
79 | unsigned short method; /* 4-5 */ | 66 | unsigned short method; /* 4-5 */ |
80 | unsigned short modtime; /* 6-7 */ | 67 | unsigned short modtime; /* 6-7 */ |
81 | unsigned short moddate; /* 8-9 */ | 68 | unsigned short moddate; /* 8-9 */ |
82 | unsigned int crc32 __attribute__ ((packed)); /* 10-13 */ | 69 | unsigned int crc32 ATTRIBUTE_PACKED; /* 10-13 */ |
83 | unsigned int cmpsize __attribute__ ((packed)); /* 14-17 */ | 70 | unsigned int cmpsize ATTRIBUTE_PACKED; /* 14-17 */ |
84 | unsigned int ucmpsize __attribute__ ((packed)); /* 18-21 */ | 71 | unsigned int ucmpsize ATTRIBUTE_PACKED; /* 18-21 */ |
85 | unsigned short filename_len; /* 22-23 */ | 72 | unsigned short filename_len; /* 22-23 */ |
86 | unsigned short extra_len; /* 24-25 */ | 73 | unsigned short extra_len; /* 24-25 */ |
87 | } formated __attribute__ ((packed)); | 74 | } formated ATTRIBUTE_PACKED; |
88 | } zip_header_t; | 75 | } zip_header_t; |
89 | 76 | ||
90 | static void unzip_skip(int fd, off_t skip) | 77 | static void unzip_skip(int fd, off_t skip) |
diff --git a/coreutils/stty.c b/coreutils/stty.c index d62068668..cbd2c22e9 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -2,15 +2,8 @@ | |||
2 | /* stty -- change and print terminal line settings | 2 | /* stty -- change and print terminal line settings |
3 | Copyright (C) 1990-1999 Free Software Foundation, Inc. | 3 | Copyright (C) 1990-1999 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
6 | it under the terms of the GNU General Public License as published by | 6 | */ |
7 | the Free Software Foundation; either version 2, or (at your option) | ||
8 | any later version. | ||
9 | |||
10 | You should have received a copy of the GNU General Public License | ||
11 | along with this program; if not, write to the Free Software Foundation, | ||
12 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | ||
13 | |||
14 | /* Usage: stty [-ag] [-F device] [setting...] | 7 | /* Usage: stty [-ag] [-F device] [setting...] |
15 | 8 | ||
16 | Options: | 9 | Options: |
@@ -428,7 +421,7 @@ static void set_window_size(int rows, int cols, int fd); | |||
428 | 421 | ||
429 | static const char *device_name; | 422 | static const char *device_name; |
430 | 423 | ||
431 | static __attribute__ ((noreturn)) void perror_on_device(const char *fmt) | 424 | static ATTRIBUTE_NORETURN void perror_on_device(const char *fmt) |
432 | { | 425 | { |
433 | bb_perror_msg_and_die(fmt, device_name); | 426 | bb_perror_msg_and_die(fmt, device_name); |
434 | } | 427 | } |
diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c index e36c47734..f23688bc3 100644 --- a/e2fsprogs/tune2fs.c +++ b/e2fsprogs/tune2fs.c | |||
@@ -566,7 +566,7 @@ MOUNTS_COUNT_ERROR: | |||
566 | } | 566 | } |
567 | 567 | ||
568 | #ifdef CONFIG_FINDFS | 568 | #ifdef CONFIG_FINDFS |
569 | static attribute_noreturn void do_findfs(int argc, char **argv) | 569 | static ATTRIBUTE_NORETURN void do_findfs(int argc, char **argv) |
570 | { | 570 | { |
571 | if ((argc != 2) || | 571 | if ((argc != 2) || |
572 | (strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5))) | 572 | (strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5))) |
diff --git a/e2fsprogs/uuid/uuid.h b/e2fsprogs/uuid/uuid.h index ec6ba52d7..a05f1c690 100644 --- a/e2fsprogs/uuid/uuid.h +++ b/e2fsprogs/uuid/uuid.h | |||
@@ -54,7 +54,7 @@ typedef unsigned char uuid_t[16]; | |||
54 | /* Allow UUID constants to be defined */ | 54 | /* Allow UUID constants to be defined */ |
55 | #ifdef __GNUC__ | 55 | #ifdef __GNUC__ |
56 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ | 56 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ |
57 | static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} | 57 | static const uuid_t name ATTRIBUTE_UNUSED = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} |
58 | #else | 58 | #else |
59 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ | 59 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ |
60 | static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} | 60 | static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} |
diff --git a/editors/awk.c b/editors/awk.c index 4bd872924..80ff8c77b 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -4,20 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (C) 2002 by Dmitry Zakharov <dmit@crp.bank.gov.ua> | 5 | * Copyright (C) 2002 by Dmitry Zakharov <dmit@crp.bank.gov.ua> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | 8 | */ |
22 | 9 | ||
23 | #include <stdio.h> | 10 | #include <stdio.h> |
@@ -445,7 +432,7 @@ static void chain_group(void); | |||
445 | static var *evaluate(node *, var *); | 432 | static var *evaluate(node *, var *); |
446 | static rstream *next_input_file(void); | 433 | static rstream *next_input_file(void); |
447 | static int fmt_num(char *, int, const char *, double, int); | 434 | static int fmt_num(char *, int, const char *, double, int); |
448 | static int awk_exit(int) attribute_noreturn; | 435 | static int awk_exit(int) ATTRIBUTE_NORETURN; |
449 | 436 | ||
450 | /* ---- error handling ---- */ | 437 | /* ---- error handling ---- */ |
451 | 438 | ||
@@ -462,7 +449,7 @@ static const char EMSG_UNDEF_FUNC[] = "Call to undefined function"; | |||
462 | static const char EMSG_NO_MATH[] = "Math support is not compiled in"; | 449 | static const char EMSG_NO_MATH[] = "Math support is not compiled in"; |
463 | #endif | 450 | #endif |
464 | 451 | ||
465 | static void syntax_error(const char * const message) attribute_noreturn; | 452 | static void syntax_error(const char * const message) ATTRIBUTE_NORETURN; |
466 | static void syntax_error(const char * const message) | 453 | static void syntax_error(const char * const message) |
467 | { | 454 | { |
468 | bb_error_msg_and_die("%s:%i: %s", programname, lineno, message); | 455 | bb_error_msg_and_die("%s:%i: %s", programname, lineno, message); |
diff --git a/include/busybox.h b/include/busybox.h index f16be706d..9fb95036e 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -2,24 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Busybox main internal header file | 3 | * Busybox main internal header file |
4 | * | 4 | * |
5 | * | 5 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell | ||
21 | * Permission has been granted to redistribute this code under the GPL. | ||
22 | * | ||
23 | */ | 6 | */ |
24 | #ifndef _BB_INTERNAL_H_ | 7 | #ifndef _BB_INTERNAL_H_ |
25 | #define _BB_INTERNAL_H_ 1 | 8 | #define _BB_INTERNAL_H_ 1 |
@@ -66,8 +49,8 @@ enum SUIDRoot { | |||
66 | struct BB_applet { | 49 | struct BB_applet { |
67 | const char *name; | 50 | const char *name; |
68 | int (*main) (int argc, char **argv); | 51 | int (*main) (int argc, char **argv); |
69 | enum Location location:4; | 52 | __extension__ enum Location location:4; |
70 | enum SUIDRoot need_suid:4; | 53 | __extension__ enum SUIDRoot need_suid:4; |
71 | }; | 54 | }; |
72 | 55 | ||
73 | /* From busybox.c */ | 56 | /* From busybox.c */ |
diff --git a/include/libbb.h b/include/libbb.h index 2e697a350..8ec1a24c0 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -2,27 +2,14 @@ | |||
2 | /* | 2 | /* |
3 | * Busybox main internal header file | 3 | * Busybox main internal header file |
4 | * | 4 | * |
5 | * | 5 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | 6 | * |
20 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell | 7 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell |
21 | * Permission has been granted to redistribute this code under the GPL. | 8 | * Permission has been granted to redistribute this code under the GPL. |
22 | * | 9 | * |
23 | */ | 10 | */ |
24 | #ifndef __LIBCONFIG_H__ | 11 | #ifndef __LIBBUSYBOX_H__ |
25 | #define __LIBCONFIG_H__ 1 | 12 | #define __LIBBUSYBOX_H__ 1 |
26 | 13 | ||
27 | #include <stdio.h> | 14 | #include <stdio.h> |
28 | #include <stdlib.h> | 15 | #include <stdlib.h> |
@@ -36,6 +23,7 @@ | |||
36 | 23 | ||
37 | #include <features.h> | 24 | #include <features.h> |
38 | 25 | ||
26 | #include "platform.h" | ||
39 | #include "bb_config.h" | 27 | #include "bb_config.h" |
40 | #ifdef CONFIG_SELINUX | 28 | #ifdef CONFIG_SELINUX |
41 | #include <selinux/selinux.h> | 29 | #include <selinux/selinux.h> |
@@ -50,21 +38,6 @@ | |||
50 | # include "sha1.h" | 38 | # include "sha1.h" |
51 | #endif | 39 | #endif |
52 | 40 | ||
53 | /* Convenience macros to test the version of gcc. */ | ||
54 | #if defined __GNUC__ && defined __GNUC_MINOR__ | ||
55 | # define __GNUC_PREREQ(maj, min) \ | ||
56 | ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) | ||
57 | #else | ||
58 | # define __GNUC_PREREQ(maj, min) 0 | ||
59 | #endif | ||
60 | |||
61 | /* __restrict is known in EGCS 1.2 and above. */ | ||
62 | #if !__GNUC_PREREQ (2,92) | ||
63 | # define __restrict /* Ignore */ | ||
64 | #endif | ||
65 | |||
66 | #define attribute_noreturn __attribute__ ((__noreturn__)) | ||
67 | |||
68 | /* Some useful definitions */ | 41 | /* Some useful definitions */ |
69 | #define FALSE ((int) 0) | 42 | #define FALSE ((int) 0) |
70 | #define TRUE ((int) 1) | 43 | #define TRUE ((int) 1) |
@@ -86,7 +59,7 @@ | |||
86 | #define MAX(a,b) (((a)>(b))?(a):(b)) | 59 | #define MAX(a,b) (((a)>(b))?(a):(b)) |
87 | #endif | 60 | #endif |
88 | 61 | ||
89 | extern void bb_show_usage(void) __attribute__ ((noreturn, externally_visible)); | 62 | extern void bb_show_usage(void) ATTRIBUTE_NORETURN ATTRIBUTE_EXTERNALLY_VISIBLE; |
90 | extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); | 63 | extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
91 | extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); | 64 | extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
92 | extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); | 65 | extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
@@ -95,7 +68,7 @@ extern void bb_vherror_msg(const char *s, va_list p); | |||
95 | extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); | 68 | extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
96 | extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); | 69 | extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
97 | 70 | ||
98 | extern void bb_perror_nomsg_and_die(void) __attribute__ ((noreturn)); | 71 | extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN; |
99 | extern void bb_perror_nomsg(void); | 72 | extern void bb_perror_nomsg(void); |
100 | 73 | ||
101 | /* These two are used internally -- you shouldn't need to use them */ | 74 | /* These two are used internally -- you shouldn't need to use them */ |
@@ -147,7 +120,7 @@ extern FILE *bb_wfopen_input(const char *filename); | |||
147 | extern FILE *bb_xfopen(const char *path, const char *mode); | 120 | extern FILE *bb_xfopen(const char *path, const char *mode); |
148 | 121 | ||
149 | extern int bb_fclose_nonstdin(FILE *f); | 122 | extern int bb_fclose_nonstdin(FILE *f); |
150 | extern void bb_fflush_stdout_and_exit(int retval) __attribute__ ((noreturn)); | 123 | extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; |
151 | 124 | ||
152 | #define BB_GETOPT_ERROR 0x80000000UL | 125 | #define BB_GETOPT_ERROR 0x80000000UL |
153 | extern const char *bb_opt_complementally; | 126 | extern const char *bb_opt_complementally; |
@@ -498,4 +471,4 @@ extern int hash_fd(int fd, const size_t size, const uint8_t hash_algo, uint8_t * | |||
498 | #include <dmalloc.h> | 471 | #include <dmalloc.h> |
499 | #endif | 472 | #endif |
500 | 473 | ||
501 | #endif /* __LIBCONFIG_H__ */ | 474 | #endif /* __LIBBUSYBOX_H__ */ |
diff --git a/include/platform.h b/include/platform.h new file mode 100644 index 000000000..763292d7a --- /dev/null +++ b/include/platform.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | Copyright 2006, Bernhard Fischer | ||
3 | |||
4 | Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | ||
5 | */ | ||
6 | #ifndef __PLATFORM_H | ||
7 | #define __PLATFORM_H 1 | ||
8 | |||
9 | /* Convenience macros to test the version of gcc. */ | ||
10 | #undef __GNUC_PREREQ | ||
11 | #if defined __GNUC__ && defined __GNUC_MINOR__ | ||
12 | # define __GNUC_PREREQ(maj, min) \ | ||
13 | ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) | ||
14 | #else | ||
15 | # define __GNUC_PREREQ(maj, min) 0 | ||
16 | #endif | ||
17 | |||
18 | /* __restrict is known in EGCS 1.2 and above. */ | ||
19 | #if !__GNUC_PREREQ (2,92) | ||
20 | # ifndef __restrict | ||
21 | # define __restrict /* Ignore */ | ||
22 | # endif | ||
23 | #endif | ||
24 | |||
25 | /* Define macros for some gcc attributes. This permits us to use the | ||
26 | macros freely, and know that they will come into play for the | ||
27 | version of gcc in which they are supported. */ | ||
28 | |||
29 | #if !__GNUC_PREREQ (2,7) | ||
30 | # ifndef __attribute__ | ||
31 | # define __attribute__(x) | ||
32 | # endif | ||
33 | #endif | ||
34 | |||
35 | #if 0 | ||
36 | /* Attribute __malloc__ on functions was valid as of gcc 2.96. */ | ||
37 | #ifndef ATTRIBUTE_MALLOC | ||
38 | # if __GNUC_PREREQ (2,96) | ||
39 | # define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) | ||
40 | # else | ||
41 | # define ATTRIBUTE_MALLOC | ||
42 | # endif /* GNUC >= 2.96 */ | ||
43 | #endif /* ATTRIBUTE_MALLOC */ | ||
44 | #endif | ||
45 | |||
46 | #ifndef ATTRIBUTE_UNUSED | ||
47 | #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) | ||
48 | #endif /* ATTRIBUTE_UNUSED */ | ||
49 | |||
50 | #ifndef ATTRIBUTE_NORETURN | ||
51 | #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) | ||
52 | #endif /* ATTRIBUTE_NORETURN */ | ||
53 | |||
54 | #ifndef ATTRIBUTE_PACKED | ||
55 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) | ||
56 | #endif /* ATTRIBUTE_NORETURN */ | ||
57 | |||
58 | /* -fwhole-program makes all symbols local. The attribute externally_visible | ||
59 | forces a symbol global. */ | ||
60 | #ifndef ATTRIBUTE_EXTERNALLY_VISIBLE | ||
61 | # if __GNUC_PREREQ (4,1) | ||
62 | # define ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((__externally_visible__)) | ||
63 | # else | ||
64 | # define ATTRIBUTE_EXTERNALLY_VISIBLE | ||
65 | # endif /* GNUC >= 4.1 */ | ||
66 | #endif /* ATTRIBUTE_EXTERNALLY_VISIBLE */ | ||
67 | |||
68 | /* We use __extension__ in some places to suppress -pedantic warnings | ||
69 | about GCC extensions. This feature didn't work properly before | ||
70 | gcc 2.8. */ | ||
71 | #if !__GNUC_PREREQ (2,8) | ||
72 | # ifndef __extension__ | ||
73 | # define __extension__ | ||
74 | # endif | ||
75 | #endif | ||
76 | |||
77 | |||
78 | /* include USAGE_APPLET_x helper macros for usage.h. */ | ||
79 | /* | ||
80 | #include "_usage.h" | ||
81 | */ | ||
82 | #endif /* platform.h */ | ||
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 5ff0cd962..a25632e44 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
@@ -5,20 +5,7 @@ | |||
5 | * Copyright (C) 1999 by Lineo, inc. and John Beppu | 5 | * Copyright (C) 1999 by Lineo, inc. and John Beppu |
6 | * Copyright (C) 1999,2000,2001 by John Beppu <beppu@codepoet.org> | 6 | * Copyright (C) 1999,2000,2001 by John Beppu <beppu@codepoet.org> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | 9 | */ |
23 | 10 | ||
24 | #ifndef _GNU_SOURCE | 11 | #ifndef _GNU_SOURCE |
@@ -122,7 +109,7 @@ static void addgroup_wrapper(const char *login, gid_t gid) | |||
122 | free(cmd); | 109 | free(cmd); |
123 | } | 110 | } |
124 | 111 | ||
125 | static void passwd_wrapper(const char *login) __attribute__ ((noreturn)); | 112 | static void passwd_wrapper(const char *login) ATTRIBUTE_NORETURN; |
126 | 113 | ||
127 | static void passwd_wrapper(const char *login) | 114 | static void passwd_wrapper(const char *login) |
128 | { | 115 | { |
diff --git a/loginutils/getty.c b/loginutils/getty.c index 1cfbd6734..1399118a5 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -225,7 +225,7 @@ static void termio_final(struct options *op, struct termio *tp, | |||
225 | struct chardata *cp); | 225 | struct chardata *cp); |
226 | static int caps_lock(const char *s); | 226 | static int caps_lock(const char *s); |
227 | static int bcode(const char *s); | 227 | static int bcode(const char *s); |
228 | static void error(const char *fmt, ...) __attribute__ ((noreturn)); | 228 | static void error(const char *fmt, ...) ATTRIBUTE_NORETURN; |
229 | 229 | ||
230 | #ifdef SYSV_STYLE | 230 | #ifdef SYSV_STYLE |
231 | #ifdef CONFIG_FEATURE_UTMP | 231 | #ifdef CONFIG_FEATURE_UTMP |
diff --git a/networking/inetd.c b/networking/inetd.c index 5388bf789..7a6ffae0c 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -928,7 +928,7 @@ static int matchconf (servtab_t *old, servtab_t *new) | |||
928 | return (1); | 928 | return (1); |
929 | } | 929 | } |
930 | 930 | ||
931 | static void config (int sig __attribute__((unused))) | 931 | static void config (int sig ATTRIBUTE_UNUSED) |
932 | { | 932 | { |
933 | servtab_t *sep, *cp, **sepp; | 933 | servtab_t *sep, *cp, **sepp; |
934 | sigset_t omask; | 934 | sigset_t omask; |
@@ -1149,7 +1149,7 @@ static void config (int sig __attribute__((unused))) | |||
1149 | } | 1149 | } |
1150 | 1150 | ||
1151 | 1151 | ||
1152 | static void reapchild (int sig __attribute__((unused))) | 1152 | static void reapchild (int sig ATTRIBUTE_UNUSED) |
1153 | { | 1153 | { |
1154 | pid_t pid; | 1154 | pid_t pid; |
1155 | int save_errno = errno, status; | 1155 | int save_errno = errno, status; |
@@ -1176,7 +1176,7 @@ static void reapchild (int sig __attribute__((unused))) | |||
1176 | errno = save_errno; | 1176 | errno = save_errno; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | static void retry (int sig __attribute__((unused))) | 1179 | static void retry (int sig ATTRIBUTE_UNUSED) |
1180 | { | 1180 | { |
1181 | servtab_t *sep; | 1181 | servtab_t *sep; |
1182 | 1182 | ||
@@ -1200,7 +1200,7 @@ static void retry (int sig __attribute__((unused))) | |||
1200 | } | 1200 | } |
1201 | } | 1201 | } |
1202 | 1202 | ||
1203 | static void goaway (int sig __attribute__((unused))) | 1203 | static void goaway (int sig ATTRIBUTE_UNUSED) |
1204 | { | 1204 | { |
1205 | servtab_t *sep; | 1205 | servtab_t *sep; |
1206 | 1206 | ||
@@ -1582,7 +1582,7 @@ echo_stream (int s, servtab_t *sep) | |||
1582 | /* Echo service -- echo data back */ | 1582 | /* Echo service -- echo data back */ |
1583 | /* ARGSUSED */ | 1583 | /* ARGSUSED */ |
1584 | static void | 1584 | static void |
1585 | echo_dg (int s, servtab_t *sep __attribute__((unused))) | 1585 | echo_dg (int s, servtab_t *sep ATTRIBUTE_UNUSED) |
1586 | { | 1586 | { |
1587 | char buffer[BUFSIZE]; | 1587 | char buffer[BUFSIZE]; |
1588 | int i; | 1588 | int i; |
@@ -1616,7 +1616,7 @@ discard_stream (int s, servtab_t *sep) | |||
1616 | /* Discard service -- ignore data */ | 1616 | /* Discard service -- ignore data */ |
1617 | /* ARGSUSED */ | 1617 | /* ARGSUSED */ |
1618 | static void | 1618 | static void |
1619 | discard_dg (int s, servtab_t *sep __attribute__((unused))) | 1619 | discard_dg (int s, servtab_t *sep ATTRIBUTE_UNUSED) |
1620 | { | 1620 | { |
1621 | char buffer[BUFSIZE]; | 1621 | char buffer[BUFSIZE]; |
1622 | 1622 | ||
@@ -1678,7 +1678,7 @@ chargen_stream (int s, servtab_t *sep) | |||
1678 | /* Character generator */ | 1678 | /* Character generator */ |
1679 | /* ARGSUSED */ | 1679 | /* ARGSUSED */ |
1680 | static void | 1680 | static void |
1681 | chargen_dg (int s, servtab_t *sep __attribute__((unused))) | 1681 | chargen_dg (int s, servtab_t *sep ATTRIBUTE_UNUSED) |
1682 | { | 1682 | { |
1683 | /* struct sockaddr_storage ss; */ | 1683 | /* struct sockaddr_storage ss; */ |
1684 | struct sockaddr sa; | 1684 | struct sockaddr sa; |
@@ -1735,7 +1735,7 @@ static u_int machtime (void) | |||
1735 | 1735 | ||
1736 | /* ARGSUSED */ | 1736 | /* ARGSUSED */ |
1737 | static void | 1737 | static void |
1738 | machtime_stream (int s, servtab_t *sep __attribute__((unused))) | 1738 | machtime_stream (int s, servtab_t *sep ATTRIBUTE_UNUSED) |
1739 | { | 1739 | { |
1740 | u_int result; | 1740 | u_int result; |
1741 | 1741 | ||
@@ -1745,7 +1745,7 @@ machtime_stream (int s, servtab_t *sep __attribute__((unused))) | |||
1745 | 1745 | ||
1746 | /* ARGSUSED */ | 1746 | /* ARGSUSED */ |
1747 | static void | 1747 | static void |
1748 | machtime_dg (int s, servtab_t *sep __attribute__((unused))) | 1748 | machtime_dg (int s, servtab_t *sep ATTRIBUTE_UNUSED) |
1749 | { | 1749 | { |
1750 | u_int result; | 1750 | u_int result; |
1751 | /* struct sockaddr_storage ss; */ | 1751 | /* struct sockaddr_storage ss; */ |
@@ -1770,7 +1770,7 @@ machtime_dg (int s, servtab_t *sep __attribute__((unused))) | |||
1770 | #ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME | 1770 | #ifdef CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME |
1771 | /* Return human-readable time of day */ | 1771 | /* Return human-readable time of day */ |
1772 | /* ARGSUSED */ | 1772 | /* ARGSUSED */ |
1773 | static void daytime_stream (int s, servtab_t *sep __attribute__((unused))) | 1773 | static void daytime_stream (int s, servtab_t *sep ATTRIBUTE_UNUSED) |
1774 | { | 1774 | { |
1775 | char buffer[256]; | 1775 | char buffer[256]; |
1776 | time_t t; | 1776 | time_t t; |
@@ -1784,7 +1784,7 @@ static void daytime_stream (int s, servtab_t *sep __attribute__((unused))) | |||
1784 | /* Return human-readable time of day */ | 1784 | /* Return human-readable time of day */ |
1785 | /* ARGSUSED */ | 1785 | /* ARGSUSED */ |
1786 | void | 1786 | void |
1787 | daytime_dg (int s, servtab_t *sep __attribute__((unused))) | 1787 | daytime_dg (int s, servtab_t *sep ATTRIBUTE_UNUSED) |
1788 | { | 1788 | { |
1789 | char buffer[256]; | 1789 | char buffer[256]; |
1790 | time_t t; | 1790 | time_t t; |
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h index 25e9c6c81..71be8269e 100644 --- a/networking/libiproute/ip_common.h +++ b/networking/libiproute/ip_common.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifndef _IP_COMMON_H | ||
2 | #define _IP_COMMON_H 1 | ||
1 | extern int preferred_family; | 3 | extern int preferred_family; |
2 | extern char * _SL_; | 4 | extern char * _SL_; |
3 | 5 | ||
@@ -5,7 +7,7 @@ extern void ip_parse_common_args(int *argcp, char ***argvp); | |||
5 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); | 7 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); |
6 | extern int ipaddr_list_or_flush(int argc, char **argv, int flush); | 8 | extern int ipaddr_list_or_flush(int argc, char **argv, int flush); |
7 | extern int iproute_monitor(int argc, char **argv); | 9 | extern int iproute_monitor(int argc, char **argv); |
8 | extern void iplink_usage(void) __attribute__((noreturn)); | 10 | extern void iplink_usage(void) ATTRIBUTE_NORETURN; |
9 | extern void ipneigh_reset_filter(void); | 11 | extern void ipneigh_reset_filter(void); |
10 | extern int do_ipaddr(int argc, char **argv); | 12 | extern int do_ipaddr(int argc, char **argv); |
11 | extern int do_iproute(int argc, char **argv); | 13 | extern int do_iproute(int argc, char **argv); |
@@ -16,3 +18,4 @@ extern int do_iplink(int argc, char **argv); | |||
16 | extern int do_ipmonitor(int argc, char **argv); | 18 | extern int do_ipmonitor(int argc, char **argv); |
17 | extern int do_multiaddr(int argc, char **argv); | 19 | extern int do_multiaddr(int argc, char **argv); |
18 | extern int do_multiroute(int argc, char **argv); | 20 | extern int do_multiroute(int argc, char **argv); |
21 | #endif /* ip_common.h */ | ||
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index a15fc81dc..b622afd47 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -63,7 +63,7 @@ static int flush_update(void) | |||
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | 65 | ||
66 | static int print_route(struct sockaddr_nl *who __attribute__((unused)), | 66 | static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED, |
67 | struct nlmsghdr *n, void *arg) | 67 | struct nlmsghdr *n, void *arg) |
68 | { | 68 | { |
69 | FILE *fp = (FILE*)arg; | 69 | FILE *fp = (FILE*)arg; |
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index e79e177b9..3d223edf6 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "libnetlink.h" | 7 | #include "libnetlink.h" |
8 | #include "ll_map.h" | 8 | #include "ll_map.h" |
9 | #include "rtm_map.h" | 9 | #include "rtm_map.h" |
10 | #include "libbb.h" | ||
10 | 11 | ||
11 | extern int preferred_family; | 12 | extern int preferred_family; |
12 | extern int show_stats; | 13 | extern int show_stats; |
@@ -26,7 +27,7 @@ extern char * _SL_; | |||
26 | #define SPRINT_BSIZE 64 | 27 | #define SPRINT_BSIZE 64 |
27 | #define SPRINT_BUF(x) char x[SPRINT_BSIZE] | 28 | #define SPRINT_BUF(x) char x[SPRINT_BSIZE] |
28 | 29 | ||
29 | extern void incomplete_command(void) __attribute__((noreturn)); | 30 | extern void incomplete_command(void) ATTRIBUTE_NORETURN; |
30 | 31 | ||
31 | #define NEXT_ARG() do { argv++; if (--argc <= 0) incomplete_command(); } while(0) | 32 | #define NEXT_ARG() do { argv++; if (--argc <= 0) incomplete_command(); } while(0) |
32 | 33 | ||
@@ -76,9 +77,9 @@ extern int get_s8(__s8 *val, char *arg, int base); | |||
76 | extern const char *format_host(int af, int len, void *addr, char *buf, int buflen); | 77 | extern const char *format_host(int af, int len, void *addr, char *buf, int buflen); |
77 | extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen); | 78 | extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen); |
78 | 79 | ||
79 | void invarg(char *, char *) __attribute__((noreturn)); | 80 | void invarg(char *, char *) ATTRIBUTE_NORETURN; |
80 | void duparg(char *, char *) __attribute__((noreturn)); | 81 | void duparg(char *, char *) ATTRIBUTE_NORETURN; |
81 | void duparg2(char *, char *) __attribute__((noreturn)); | 82 | void duparg2(char *, char *) ATTRIBUTE_NORETURN; |
82 | int matches(char *arg, char *pattern); | 83 | int matches(char *arg, char *pattern); |
83 | extern int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits); | 84 | extern int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits); |
84 | 85 | ||
diff --git a/networking/nameif.c b/networking/nameif.c index a2c8b4915..f28e5ebe3 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Busybox port 2002 by Nick Fedchik <nick@fedchik.org.ua> | 5 | * Busybox port 2002 by Nick Fedchik <nick@fedchik.org.ua> |
6 | * Glenn McGrath <bug1@iinet.net.au> | 6 | * Glenn McGrath <bug1@iinet.net.au> |
7 | * | 7 | * |
8 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 8 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <sys/syslog.h> | 11 | #include <sys/syslog.h> |
@@ -48,7 +48,7 @@ typedef struct mactable_s { | |||
48 | 48 | ||
49 | static unsigned long flags; | 49 | static unsigned long flags; |
50 | 50 | ||
51 | static void serror(const char *s, ...) __attribute__ ((noreturn)); | 51 | static void serror(const char *s, ...) ATTRIBUTE_NORETURN; |
52 | 52 | ||
53 | static void serror(const char *s, ...) | 53 | static void serror(const char *s, ...) |
54 | { | 54 | { |
diff --git a/networking/traceroute.c b/networking/traceroute.c index 690e21f82..b6252ad3e 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -281,7 +281,7 @@ struct hostinfo { | |||
281 | struct outdata { | 281 | struct outdata { |
282 | u_char seq; /* sequence number of this packet */ | 282 | u_char seq; /* sequence number of this packet */ |
283 | u_char ttl; /* ttl packet left with */ | 283 | u_char ttl; /* ttl packet left with */ |
284 | struct timeval tv __attribute__((packed)); /* time packet left */ | 284 | struct timeval tv ATTRIBUTE_PACKED; /* time packet left */ |
285 | }; | 285 | }; |
286 | 286 | ||
287 | struct IFADDRLIST { | 287 | struct IFADDRLIST { |
diff --git a/networking/udhcp/arpping.h b/networking/udhcp/arpping.h index 6f27d9f75..30959ca99 100644 --- a/networking/udhcp/arpping.h +++ b/networking/udhcp/arpping.h | |||
@@ -27,7 +27,7 @@ struct arpMsg { | |||
27 | uint8_t tHaddr[6]; /* target's hardware address */ | 27 | uint8_t tHaddr[6]; /* target's hardware address */ |
28 | uint8_t tInaddr[4]; /* target's IP address */ | 28 | uint8_t tInaddr[4]; /* target's IP address */ |
29 | uint8_t pad[18]; /* pad for min. Ethernet payload (60 bytes) */ | 29 | uint8_t pad[18]; /* pad for min. Ethernet payload (60 bytes) */ |
30 | } __attribute__ ((packed)); | 30 | } ATTRIBUTE_PACKED; |
31 | 31 | ||
32 | /* function prototypes */ | 32 | /* function prototypes */ |
33 | int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface); | 33 | int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface); |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index d5c69db42..c4277e3f1 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -4,19 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Russ Dill <Russ.Dill@asu.edu> July 2001 | 5 | * Russ Dill <Russ.Dill@asu.edu> July 2001 |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | 8 | */ |
21 | 9 | ||
22 | #include <sys/time.h> | 10 | #include <sys/time.h> |
@@ -74,7 +62,7 @@ struct client_config_t client_config = { | |||
74 | }; | 62 | }; |
75 | 63 | ||
76 | #ifndef IN_BUSYBOX | 64 | #ifndef IN_BUSYBOX |
77 | static void __attribute__ ((noreturn)) show_usage(void) | 65 | static void ATTRIBUTE_NORETURN show_usage(void) |
78 | { | 66 | { |
79 | printf( | 67 | printf( |
80 | "Usage: udhcpc [OPTIONS]\n\n" | 68 | "Usage: udhcpc [OPTIONS]\n\n" |
@@ -101,7 +89,7 @@ static void __attribute__ ((noreturn)) show_usage(void) | |||
101 | } | 89 | } |
102 | #else | 90 | #else |
103 | #define show_usage bb_show_usage | 91 | #define show_usage bb_show_usage |
104 | extern void show_usage(void) __attribute__ ((noreturn)); | 92 | extern void show_usage(void) ATTRIBUTE_NORETURN; |
105 | #endif | 93 | #endif |
106 | 94 | ||
107 | 95 | ||
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index a9036dfbd..ca5c6059e 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -1,3 +1,7 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | ||
4 | */ | ||
1 | #include <fcntl.h> | 5 | #include <fcntl.h> |
2 | #include <string.h> | 6 | #include <string.h> |
3 | #include <stdlib.h> | 7 | #include <stdlib.h> |
@@ -21,7 +25,7 @@ | |||
21 | 25 | ||
22 | 26 | ||
23 | #ifndef IN_BUSYBOX | 27 | #ifndef IN_BUSYBOX |
24 | static void __attribute__ ((noreturn)) show_usage(void) | 28 | static void ATTRIBUTE_NORETURN show_usage(void) |
25 | { | 29 | { |
26 | printf( | 30 | printf( |
27 | "Usage: dumpleases -f <file> -[r|a]\n\n" | 31 | "Usage: dumpleases -f <file> -[r|a]\n\n" |
diff --git a/networking/zcip.c b/networking/zcip.c index ad1131f3b..294ffd066 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -5,20 +5,7 @@ | |||
5 | * Copyright (C) 2003 by Arthur van Hoff (avh@strangeberry.com) | 5 | * Copyright (C) 2003 by Arthur van Hoff (avh@strangeberry.com) |
6 | * Copyright (C) 2004 by David Brownell | 6 | * Copyright (C) 2004 by David Brownell |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
21 | * 02111-1307 USA | ||
22 | */ | 9 | */ |
23 | 10 | ||
24 | /* | 11 | /* |
@@ -73,7 +60,7 @@ struct arp_packet { | |||
73 | struct in_addr source_ip; | 60 | struct in_addr source_ip; |
74 | struct ether_addr target_addr; | 61 | struct ether_addr target_addr; |
75 | struct in_addr target_ip; | 62 | struct in_addr target_ip; |
76 | } __attribute__ ((__packed__)); | 63 | } ATTRIBUTE_PACKED; |
77 | 64 | ||
78 | /* 169.254.0.0 */ | 65 | /* 169.254.0.0 */ |
79 | static const uint32_t LINKLOCAL_ADDR = 0xa9fe0000; | 66 | static const uint32_t LINKLOCAL_ADDR = 0xa9fe0000; |
@@ -214,7 +201,7 @@ bad: | |||
214 | /** | 201 | /** |
215 | * Print usage information. | 202 | * Print usage information. |
216 | */ | 203 | */ |
217 | static void __attribute__((noreturn)) | 204 | static void ATTRIBUTE_NORETURN |
218 | zcip_usage(const char *msg) | 205 | zcip_usage(const char *msg) |
219 | { | 206 | { |
220 | fprintf(stderr, "%s: %s\n", prog, msg); | 207 | fprintf(stderr, "%s: %s\n", prog, msg); |
diff --git a/shell/ash.c b/shell/ash.c index db537c44d..ef1fe0af7 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -12,19 +12,7 @@ | |||
12 | * This code is derived from software contributed to Berkeley by | 12 | * This code is derived from software contributed to Berkeley by |
13 | * Kenneth Almquist. | 13 | * Kenneth Almquist. |
14 | * | 14 | * |
15 | * This program is free software; you can redistribute it and/or modify | 15 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
16 | * it under the terms of the GNU General Public License as published by | ||
17 | * the Free Software Foundation; either version 2 of the License, or | ||
18 | * (at your option) any later version. | ||
19 | * | ||
20 | * This program is distributed in the hope that it will be useful, | ||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
23 | * General Public License for more details. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License | ||
26 | * along with this program; if not, write to the Free Software | ||
27 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
28 | * | 16 | * |
29 | * Original BSD copyright notice is retained at the end of this file. | 17 | * Original BSD copyright notice is retained at the end of this file. |
30 | */ | 18 | */ |
@@ -233,11 +221,11 @@ static volatile sig_atomic_t pendingsigs; | |||
233 | /* EXSIG is turned off by evalbltin(). */ | 221 | /* EXSIG is turned off by evalbltin(). */ |
234 | 222 | ||
235 | 223 | ||
236 | static void exraise(int) __attribute__((__noreturn__)); | 224 | static void exraise(int) ATTRIBUTE_NORETURN; |
237 | static void onint(void) __attribute__((__noreturn__)); | 225 | static void onint(void) ATTRIBUTE_NORETURN; |
238 | 226 | ||
239 | static void sh_error(const char *, ...) __attribute__((__noreturn__)); | 227 | static void sh_error(const char *, ...) ATTRIBUTE_NORETURN; |
240 | static void exerror(int, const char *, ...) __attribute__((__noreturn__)); | 228 | static void exerror(int, const char *, ...) ATTRIBUTE_NORETURN; |
241 | 229 | ||
242 | static void sh_warnx(const char *, ...); | 230 | static void sh_warnx(const char *, ...); |
243 | 231 | ||
@@ -1400,7 +1388,7 @@ struct cmdentry { | |||
1400 | static const char *pathopt; /* set by padvance */ | 1388 | static const char *pathopt; /* set by padvance */ |
1401 | 1389 | ||
1402 | static void shellexec(char **, const char *, int) | 1390 | static void shellexec(char **, const char *, int) |
1403 | __attribute__((__noreturn__)); | 1391 | ATTRIBUTE_NORETURN; |
1404 | static char *padvance(const char **, const char *); | 1392 | static char *padvance(const char **, const char *); |
1405 | static void find_command(char *, struct cmdentry *, int, const char *); | 1393 | static void find_command(char *, struct cmdentry *, int, const char *); |
1406 | static struct builtincmd *find_builtin(const char *); | 1394 | static struct builtincmd *find_builtin(const char *); |
@@ -2026,7 +2014,7 @@ static void ignoresig(int); | |||
2026 | static void onsig(int); | 2014 | static void onsig(int); |
2027 | static int dotrap(void); | 2015 | static int dotrap(void); |
2028 | static void setinteractive(int); | 2016 | static void setinteractive(int); |
2029 | static void exitshell(void) __attribute__((__noreturn__)); | 2017 | static void exitshell(void) ATTRIBUTE_NORETURN; |
2030 | static int decode_signal(const char *, int); | 2018 | static int decode_signal(const char *, int); |
2031 | 2019 | ||
2032 | /* | 2020 | /* |
@@ -2504,7 +2492,7 @@ setpwd(const char *val, int setold) | |||
2504 | 2492 | ||
2505 | 2493 | ||
2506 | static void exverror(int, const char *, va_list) | 2494 | static void exverror(int, const char *, va_list) |
2507 | __attribute__((__noreturn__)); | 2495 | ATTRIBUTE_NORETURN; |
2508 | 2496 | ||
2509 | /* | 2497 | /* |
2510 | * Called to raise an exception. Since C doesn't include exceptions, we | 2498 | * Called to raise an exception. Since C doesn't include exceptions, we |
@@ -4518,7 +4506,7 @@ static size_t esclen(const char *, const char *); | |||
4518 | static char *scanleft(char *, char *, char *, char *, int, int); | 4506 | static char *scanleft(char *, char *, char *, char *, int, int); |
4519 | static char *scanright(char *, char *, char *, char *, int, int); | 4507 | static char *scanright(char *, char *, char *, char *, int, int); |
4520 | static void varunset(const char *, const char *, const char *, int) | 4508 | static void varunset(const char *, const char *, const char *, int) |
4521 | __attribute__((__noreturn__)); | 4509 | ATTRIBUTE_NORETURN; |
4522 | 4510 | ||
4523 | 4511 | ||
4524 | #define pmatch(a, b) !fnmatch((a), (b), 0) | 4512 | #define pmatch(a, b) !fnmatch((a), (b), 0) |
@@ -9325,8 +9313,8 @@ static int readtoken(void); | |||
9325 | static int xxreadtoken(void); | 9313 | static int xxreadtoken(void); |
9326 | static int readtoken1(int firstc, int syntax, char *eofmark, int striptabs); | 9314 | static int readtoken1(int firstc, int syntax, char *eofmark, int striptabs); |
9327 | static int noexpand(char *); | 9315 | static int noexpand(char *); |
9328 | static void synexpect(int) __attribute__((__noreturn__)); | 9316 | static void synexpect(int) ATTRIBUTE_NORETURN; |
9329 | static void synerror(const char *) __attribute__((__noreturn__)); | 9317 | static void synerror(const char *) ATTRIBUTE_NORETURN; |
9330 | static void setprompt(int); | 9318 | static void setprompt(int); |
9331 | 9319 | ||
9332 | 9320 | ||
diff --git a/shell/hush.c b/shell/hush.c index e83d49a86..70533a2b0 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -75,19 +75,7 @@ | |||
75 | * maybe change map[] to use 2-bit entries | 75 | * maybe change map[] to use 2-bit entries |
76 | * (eventually) remove all the printf's | 76 | * (eventually) remove all the printf's |
77 | * | 77 | * |
78 | * This program is free software; you can redistribute it and/or modify | 78 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
79 | * it under the terms of the GNU General Public License as published by | ||
80 | * the Free Software Foundation; either version 2 of the License, or | ||
81 | * (at your option) any later version. | ||
82 | * | ||
83 | * This program is distributed in the hope that it will be useful, | ||
84 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
85 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
86 | * General Public License for more details. | ||
87 | * | ||
88 | * You should have received a copy of the GNU General Public License | ||
89 | * along with this program; if not, write to the Free Software | ||
90 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
91 | */ | 79 | */ |
92 | #include <ctype.h> /* isalpha, isdigit */ | 80 | #include <ctype.h> /* isalpha, isdigit */ |
93 | #include <unistd.h> /* getpid */ | 81 | #include <unistd.h> /* getpid */ |
@@ -369,7 +357,7 @@ static int free_pipe(struct pipe *pi, int indent); | |||
369 | /* really run the final data structures: */ | 357 | /* really run the final data structures: */ |
370 | static int setup_redirects(struct child_prog *prog, int squirrel[]); | 358 | static int setup_redirects(struct child_prog *prog, int squirrel[]); |
371 | static int run_list_real(struct pipe *pi); | 359 | static int run_list_real(struct pipe *pi); |
372 | static void pseudo_exec(struct child_prog *child) __attribute__ ((noreturn)); | 360 | static void pseudo_exec(struct child_prog *child) ATTRIBUTE_NORETURN; |
373 | static int run_pipe_real(struct pipe *pi); | 361 | static int run_pipe_real(struct pipe *pi); |
374 | /* extended glob support: */ | 362 | /* extended glob support: */ |
375 | static int globhack(const char *src, int flags, glob_t *pglob); | 363 | static int globhack(const char *src, int flags, glob_t *pglob); |
diff --git a/shell/lash.c b/shell/lash.c index f4cadde14..a23f5f4d4 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -8,20 +8,7 @@ | |||
8 | * under the following liberal license: "We have placed this source code in the | 8 | * under the following liberal license: "We have placed this source code in the |
9 | * public domain. Use it in any project, free or commercial." | 9 | * public domain. Use it in any project, free or commercial." |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
19 | * General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
24 | * | ||
25 | */ | 12 | */ |
26 | 13 | ||
27 | /* This shell's parsing engine is officially at a dead-end. Future | 14 | /* This shell's parsing engine is officially at a dead-end. Future |
@@ -148,7 +135,7 @@ static void remove_job(struct jobset *j_list, struct job *job); | |||
148 | static int get_command(FILE * source, char *command); | 135 | static int get_command(FILE * source, char *command); |
149 | static int parse_command(char **command_ptr, struct job *job, int *inbg); | 136 | static int parse_command(char **command_ptr, struct job *job, int *inbg); |
150 | static int run_command(struct job *newjob, int inbg, int outpipe[2]); | 137 | static int run_command(struct job *newjob, int inbg, int outpipe[2]); |
151 | static int pseudo_exec(struct child_prog *cmd) __attribute__ ((noreturn)); | 138 | static int pseudo_exec(struct child_prog *cmd) ATTRIBUTE_NORETURN; |
152 | static int busy_loop(FILE * input); | 139 | static int busy_loop(FILE * input); |
153 | 140 | ||
154 | 141 | ||
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index e4c8a630e..b8d69c445 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (C) 2001 by Gennady Feldman <gfeldman@gena01.com>. | 5 | * Copyright (C) 2001 by Gennady Feldman <gfeldman@gena01.com>. |
6 | * Changes: Made this a standalone busybox module which uses standalone | 6 | * Changes: Made this a standalone busybox module which uses standalone |
7 | * syslog() client interface. | 7 | * syslog() client interface. |
8 | * | 8 | * |
9 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> | 9 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
10 | * | 10 | * |
@@ -14,20 +14,7 @@ | |||
14 | * | 14 | * |
15 | * Maintainer: Gennady Feldman <gfeldman@gena01.com> as of Mar 12, 2001 | 15 | * Maintainer: Gennady Feldman <gfeldman@gena01.com> as of Mar 12, 2001 |
16 | * | 16 | * |
17 | * This program is free software; you can redistribute it and/or modify | 17 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
18 | * it under the terms of the GNU General Public License as published by | ||
19 | * the Free Software Foundation; either version 2 of the License, or | ||
20 | * (at your option) any later version. | ||
21 | * | ||
22 | * This program is distributed in the hope that it will be useful, | ||
23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
25 | * General Public License for more details. | ||
26 | * | ||
27 | * You should have received a copy of the GNU General Public License | ||
28 | * along with this program; if not, write to the Free Software | ||
29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
30 | * | ||
31 | */ | 18 | */ |
32 | 19 | ||
33 | #include <stdio.h> | 20 | #include <stdio.h> |
@@ -51,7 +38,7 @@ static void klogd_signal(int sig) | |||
51 | exit(EXIT_SUCCESS); | 38 | exit(EXIT_SUCCESS); |
52 | } | 39 | } |
53 | 40 | ||
54 | static void doKlogd(const int console_log_level) __attribute__ ((noreturn)); | 41 | static void doKlogd(const int console_log_level) ATTRIBUTE_NORETURN; |
55 | static void doKlogd(const int console_log_level) | 42 | static void doKlogd(const int console_log_level) |
56 | { | 43 | { |
57 | int priority = LOG_INFO; | 44 | int priority = LOG_INFO; |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 3d94069e2..e6b7ee7ed 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -10,20 +10,7 @@ | |||
10 | * | 10 | * |
11 | * Maintainer: Gennady Feldman <gfeldman@gena01.com> as of Mar 12, 2001 | 11 | * Maintainer: Gennady Feldman <gfeldman@gena01.com> as of Mar 12, 2001 |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or modify | 13 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, | ||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | * General Public License for more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
26 | * | ||
27 | */ | 14 | */ |
28 | 15 | ||
29 | #include <stdio.h> | 16 | #include <stdio.h> |
@@ -527,7 +514,7 @@ static int serveConnection(char *tmpbuf, int n_read) | |||
527 | return n_read; | 514 | return n_read; |
528 | } | 515 | } |
529 | 516 | ||
530 | static void doSyslogd(void) __attribute__ ((noreturn)); | 517 | static void doSyslogd(void) ATTRIBUTE_NORETURN; |
531 | static void doSyslogd(void) | 518 | static void doSyslogd(void) |
532 | { | 519 | { |
533 | struct sockaddr_un sunx; | 520 | struct sockaddr_un sunx; |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index eec82a6be..6edf9c31e 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -2,10 +2,7 @@ | |||
2 | * | 2 | * |
3 | * Copyright (C) 1992 A. V. Le Blanc (LeBlanc@mcc.ac.uk) | 3 | * Copyright (C) 1992 A. V. Le Blanc (LeBlanc@mcc.ac.uk) |
4 | * | 4 | * |
5 | * This program is free software. You can redistribute it and/or | 5 | * Licensed under the GPL v1 or later, see the file LICENSE in this tarball. |
6 | * modify it under the terms of the GNU General Public License as | ||
7 | * published by the Free Software Foundation: either version 1 or | ||
8 | * (at your option) any later version. | ||
9 | * | 6 | * |
10 | * Vladimir Oleynik <dzo@simtreas.ru> 2001,2002 Busybox port | 7 | * Vladimir Oleynik <dzo@simtreas.ru> 2001,2002 Busybox port |
11 | */ | 8 | */ |
@@ -200,7 +197,7 @@ struct partition { | |||
200 | unsigned char end_cyl; /* end cylinder */ | 197 | unsigned char end_cyl; /* end cylinder */ |
201 | unsigned char start4[4]; /* starting sector counting from 0 */ | 198 | unsigned char start4[4]; /* starting sector counting from 0 */ |
202 | unsigned char size4[4]; /* nr of sectors in partition */ | 199 | unsigned char size4[4]; /* nr of sectors in partition */ |
203 | } __attribute__((__packed__)); | 200 | } ATTRIBUTE_PACKED; |
204 | 201 | ||
205 | enum failure { | 202 | enum failure { |
206 | ioctl_error, unable_to_open, unable_to_read, unable_to_seek, | 203 | ioctl_error, unable_to_open, unable_to_read, unable_to_seek, |
@@ -224,7 +221,7 @@ static void list_types(const struct systypes *sys); | |||
224 | static uint read_int(uint low, uint dflt, uint high, uint base, char *mesg); | 221 | static uint read_int(uint low, uint dflt, uint high, uint base, char *mesg); |
225 | #endif | 222 | #endif |
226 | static const char *partition_type(unsigned char type); | 223 | static const char *partition_type(unsigned char type); |
227 | static void fdisk_fatal(enum failure why) __attribute__ ((noreturn)); | 224 | static void fdisk_fatal(enum failure why) ATTRIBUTE_NORETURN; |
228 | static void get_geometry(void); | 225 | static void get_geometry(void); |
229 | static int get_boot(enum action what); | 226 | static int get_boot(enum action what); |
230 | 227 | ||
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index f6d7deaab..1814537c5 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -269,7 +269,7 @@ static inline int bit(char * a,unsigned int i) | |||
269 | #define mark_zone(x) (setbit(zone_map,(x)-FIRSTZONE+1),changed=1) | 269 | #define mark_zone(x) (setbit(zone_map,(x)-FIRSTZONE+1),changed=1) |
270 | #define unmark_zone(x) (clrbit(zone_map,(x)-FIRSTZONE+1),changed=1) | 270 | #define unmark_zone(x) (clrbit(zone_map,(x)-FIRSTZONE+1),changed=1) |
271 | 271 | ||
272 | static void leave(int) __attribute__ ((noreturn)); | 272 | static void leave(int) ATTRIBUTE_NORETURN; |
273 | static void leave(int status) | 273 | static void leave(int status) |
274 | { | 274 | { |
275 | if (termios_set) | 275 | if (termios_set) |