aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h18
-rw-r--r--include/platform.h20
2 files changed, 19 insertions, 19 deletions
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;
295extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC; 295extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC;
296/* "short" copy can be detected by return value < size */ 296/* "short" copy can be detected by return value < size */
297/* this helper yells "short read!" if param is not -1 */ 297/* this helper yells "short read!" if param is not -1 */
298extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN FAST_FUNC; 298extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC;
299extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; 299extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC;
300/* xxxx_strip version can modify its parameter: 300/* xxxx_strip version can modify its parameter:
301 * "/" -> "/" 301 * "/" -> "/"
@@ -365,7 +365,7 @@ void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC;
365/* syscalls like read() won't be interrupted (though select/poll will be): */ 365/* syscalls like read() won't be interrupted (though select/poll will be): */
366void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; 366void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC;
367void wait_for_any_sig(void) FAST_FUNC; 367void wait_for_any_sig(void) FAST_FUNC;
368void kill_myself_with_sig(int sig) ATTRIBUTE_NORETURN FAST_FUNC; 368void kill_myself_with_sig(int sig) NORETURN FAST_FUNC;
369void sig_block(int sig) FAST_FUNC; 369void sig_block(int sig) FAST_FUNC;
370void sig_unblock(int sig) FAST_FUNC; 370void sig_unblock(int sig) FAST_FUNC;
371/* Will do sigaction(signum, act, NULL): */ 371/* Will do sigaction(signum, act, NULL): */
@@ -611,7 +611,7 @@ extern char *bb_get_chunk_from_file(FILE *file, int *end) FAST_FUNC;
611extern void die_if_ferror(FILE *file, const char *msg) FAST_FUNC; 611extern void die_if_ferror(FILE *file, const char *msg) FAST_FUNC;
612extern void die_if_ferror_stdout(void) FAST_FUNC; 612extern void die_if_ferror_stdout(void) FAST_FUNC;
613extern void xfflush_stdout(void) FAST_FUNC; 613extern void xfflush_stdout(void) FAST_FUNC;
614extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN FAST_FUNC; 614extern void fflush_stdout_and_exit(int retval) NORETURN FAST_FUNC;
615extern int fclose_if_not_stdin(FILE *file) FAST_FUNC; 615extern int fclose_if_not_stdin(FILE *file) FAST_FUNC;
616extern FILE *xfopen(const char *filename, const char *mode) FAST_FUNC; 616extern FILE *xfopen(const char *filename, const char *mode) FAST_FUNC;
617/* Prints warning to stderr and returns NULL on failure: */ 617/* Prints warning to stderr and returns NULL on failure: */
@@ -789,7 +789,7 @@ enum {
789# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) 789# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags)
790# define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) 790# define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus)
791#else 791#else
792 void re_exec(char **argv) ATTRIBUTE_NORETURN FAST_FUNC; 792 void re_exec(char **argv) NORETURN FAST_FUNC;
793 void forkexit_or_rexec(char **argv) FAST_FUNC; 793 void forkexit_or_rexec(char **argv) FAST_FUNC;
794 extern bool re_execed; 794 extern bool re_execed;
795 int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC; 795 int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC;
@@ -855,8 +855,8 @@ extern smallint logmode;
855extern int die_sleep; 855extern int die_sleep;
856extern int xfunc_error_retval; 856extern int xfunc_error_retval;
857extern jmp_buf die_jmp; 857extern jmp_buf die_jmp;
858extern void xfunc_die(void) ATTRIBUTE_NORETURN FAST_FUNC; 858extern void xfunc_die(void) NORETURN FAST_FUNC;
859extern void bb_show_usage(void) ATTRIBUTE_NORETURN FAST_FUNC; 859extern void bb_show_usage(void) NORETURN FAST_FUNC;
860extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; 860extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC;
861extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; 861extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC;
862extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; 862extern 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,
865extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn)) FAST_FUNC; 865extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn)) FAST_FUNC;
866extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; 866extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC;
867extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; 867extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC;
868extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN FAST_FUNC; 868extern void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC;
869extern void bb_perror_nomsg(void) FAST_FUNC; 869extern void bb_perror_nomsg(void) FAST_FUNC;
870extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; 870extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC;
871extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; 871extern 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;
947extern int find_applet_by_name(const char *name) FAST_FUNC; 947extern int find_applet_by_name(const char *name) FAST_FUNC;
948/* Returns only if applet is not found. */ 948/* Returns only if applet is not found. */
949extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC; 949extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC;
950extern void run_applet_no_and_exit(int a, char **argv) ATTRIBUTE_NORETURN FAST_FUNC; 950extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC;
951#endif 951#endif
952 952
953#ifdef HAVE_MNTENT_H 953#ifdef HAVE_MNTENT_H
@@ -1001,7 +1001,7 @@ char *bb_simplify_path(const char *path) FAST_FUNC;
1001#define FAIL_DELAY 3 1001#define FAIL_DELAY 3
1002extern void bb_do_delay(int seconds) FAST_FUNC; 1002extern void bb_do_delay(int seconds) FAST_FUNC;
1003extern void change_identity(const struct passwd *pw) FAST_FUNC; 1003extern void change_identity(const struct passwd *pw) FAST_FUNC;
1004extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN FAST_FUNC; 1004extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC;
1005extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC; 1005extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC;
1006#if ENABLE_SELINUX 1006#if ENABLE_SELINUX
1007extern void renew_current_security_context(void) FAST_FUNC; 1007extern 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 @@
48# define __const const 48# define __const const
49#endif 49#endif
50 50
51#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) 51#define UNUSED_PARAM __attribute__ ((__unused__))
52#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) 52#define NORETURN __attribute__ ((__noreturn__))
53#define ATTRIBUTE_PACKED __attribute__ ((__packed__)) 53#define PACKED __attribute__ ((__packed__))
54#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) 54#define ALIGNED(m) __attribute__ ((__aligned__(m)))
55/* __NO_INLINE__: some gcc's do not honor inlining! :( */ 55/* __NO_INLINE__: some gcc's do not honor inlining! :( */
56#if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__) 56#if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__)
57# define ALWAYS_INLINE __attribute__ ((always_inline)) inline 57# define ALWAYS_INLINE __attribute__ ((always_inline)) inline
58/* I've seen a toolchain where I needed __noinline__ instead of noinline */ 58/* I've seen a toolchain where I needed __noinline__ instead of noinline */
59# define NOINLINE __attribute__((__noinline__)) 59# define NOINLINE __attribute__((__noinline__))
60# if !ENABLE_WERROR 60# if !ENABLE_WERROR
61# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) 61# define DEPRECATED __attribute__ ((__deprecated__))
62# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result)) 62# define UNUSED_PARAM_RESULT __attribute__ ((warn_unused_result))
63# else 63# else
64# define ATTRIBUTE_DEPRECATED /* n/a */ 64# define DEPRECATED /* n/a */
65# define ATTRIBUTE_UNUSED_RESULT /* n/a */ 65# define UNUSED_PARAM_RESULT /* n/a */
66# endif 66# endif
67#else 67#else
68# define ALWAYS_INLINE inline /* n/a */ 68# define ALWAYS_INLINE inline /* n/a */
69# define NOINLINE /* n/a */ 69# define NOINLINE /* n/a */
70# define ATTRIBUTE_DEPRECATED /* n/a */ 70# define DEPRECATED /* n/a */
71# define ATTRIBUTE_UNUSED_RESULT /* n/a */ 71# define UNUSED_PARAM_RESULT /* n/a */
72#endif 72#endif
73 73
74/* -fwhole-program makes all symbols local. The attribute externally_visible 74/* -fwhole-program makes all symbols local. The attribute externally_visible