From a60f84ebf07863e390b72a2b6150e461a1ec18e9 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 5 Jul 2008 09:18:54 +0000 Subject: *: rename ATTRIBUTE_XXX to just XXX. --- include/libbb.h | 18 +++++++++--------- include/platform.h | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 54601f87b..378cb4401 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -295,7 +295,7 @@ extern off_t bb_copyfd_size(int fd1, int fd2, off_t size) FAST_FUNC; extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC; /* "short" copy can be detected by return value < size */ /* this helper yells "short read!" if param is not -1 */ -extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN FAST_FUNC; +extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC; extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; /* xxxx_strip version can modify its parameter: * "/" -> "/" @@ -365,7 +365,7 @@ void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; /* syscalls like read() won't be interrupted (though select/poll will be): */ void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; void wait_for_any_sig(void) FAST_FUNC; -void kill_myself_with_sig(int sig) ATTRIBUTE_NORETURN FAST_FUNC; +void kill_myself_with_sig(int sig) NORETURN FAST_FUNC; void sig_block(int sig) FAST_FUNC; void sig_unblock(int sig) FAST_FUNC; /* Will do sigaction(signum, act, NULL): */ @@ -611,7 +611,7 @@ extern char *bb_get_chunk_from_file(FILE *file, int *end) FAST_FUNC; extern void die_if_ferror(FILE *file, const char *msg) FAST_FUNC; extern void die_if_ferror_stdout(void) FAST_FUNC; extern void xfflush_stdout(void) FAST_FUNC; -extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN FAST_FUNC; +extern void fflush_stdout_and_exit(int retval) NORETURN FAST_FUNC; extern int fclose_if_not_stdin(FILE *file) FAST_FUNC; extern FILE *xfopen(const char *filename, const char *mode) FAST_FUNC; /* Prints warning to stderr and returns NULL on failure: */ @@ -789,7 +789,7 @@ enum { # define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) # define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) #else - void re_exec(char **argv) ATTRIBUTE_NORETURN FAST_FUNC; + void re_exec(char **argv) NORETURN FAST_FUNC; void forkexit_or_rexec(char **argv) FAST_FUNC; extern bool re_execed; int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC; @@ -855,8 +855,8 @@ extern smallint logmode; extern int die_sleep; extern int xfunc_error_retval; extern jmp_buf die_jmp; -extern void xfunc_die(void) ATTRIBUTE_NORETURN FAST_FUNC; -extern void bb_show_usage(void) ATTRIBUTE_NORETURN FAST_FUNC; +extern void xfunc_die(void) NORETURN FAST_FUNC; +extern void bb_show_usage(void) NORETURN FAST_FUNC; extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; @@ -865,7 +865,7 @@ extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn)) FAST_FUNC; extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; -extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN FAST_FUNC; +extern void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC; extern void bb_perror_nomsg(void) FAST_FUNC; extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; @@ -947,7 +947,7 @@ const struct hwtype *get_hwntype(int type) FAST_FUNC; extern int find_applet_by_name(const char *name) FAST_FUNC; /* Returns only if applet is not found. */ extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC; -extern void run_applet_no_and_exit(int a, char **argv) ATTRIBUTE_NORETURN FAST_FUNC; +extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; #endif #ifdef HAVE_MNTENT_H @@ -1001,7 +1001,7 @@ char *bb_simplify_path(const char *path) FAST_FUNC; #define FAIL_DELAY 3 extern void bb_do_delay(int seconds) FAST_FUNC; extern void change_identity(const struct passwd *pw) FAST_FUNC; -extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN FAST_FUNC; +extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC; extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC; #if ENABLE_SELINUX extern void renew_current_security_context(void) FAST_FUNC; diff --git a/include/platform.h b/include/platform.h index 12cb4d5a7..d2c1f9d20 100644 --- a/include/platform.h +++ b/include/platform.h @@ -48,27 +48,27 @@ # define __const const #endif -#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#define ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) +#define UNUSED_PARAM __attribute__ ((__unused__)) +#define NORETURN __attribute__ ((__noreturn__)) +#define PACKED __attribute__ ((__packed__)) +#define ALIGNED(m) __attribute__ ((__aligned__(m))) /* __NO_INLINE__: some gcc's do not honor inlining! :( */ #if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__) # define ALWAYS_INLINE __attribute__ ((always_inline)) inline /* I've seen a toolchain where I needed __noinline__ instead of noinline */ # define NOINLINE __attribute__((__noinline__)) # if !ENABLE_WERROR -# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result)) +# define DEPRECATED __attribute__ ((__deprecated__)) +# define UNUSED_PARAM_RESULT __attribute__ ((warn_unused_result)) # else -# define ATTRIBUTE_DEPRECATED /* n/a */ -# define ATTRIBUTE_UNUSED_RESULT /* n/a */ +# define DEPRECATED /* n/a */ +# define UNUSED_PARAM_RESULT /* n/a */ # endif #else # define ALWAYS_INLINE inline /* n/a */ # define NOINLINE /* n/a */ -# define ATTRIBUTE_DEPRECATED /* n/a */ -# define ATTRIBUTE_UNUSED_RESULT /* n/a */ +# define DEPRECATED /* n/a */ +# define UNUSED_PARAM_RESULT /* n/a */ #endif /* -fwhole-program makes all symbols local. The attribute externally_visible -- cgit v1.2.3