diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-09-21 17:38:30 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-09-21 17:38:30 +0000 |
commit | d4cffd1cc3437910393c319215d14bd2dcaa4df6 (patch) | |
tree | 64eb4c7f01785a0f2cfedd2001f9df8ef260ddef | |
parent | cef737f03817d8e5fafcc48e7ffda479e0e25f87 (diff) | |
download | busybox-w32-d4cffd1cc3437910393c319215d14bd2dcaa4df6.tar.gz busybox-w32-d4cffd1cc3437910393c319215d14bd2dcaa4df6.tar.bz2 busybox-w32-d4cffd1cc3437910393c319215d14bd2dcaa4df6.zip |
- make sure to include dmalloc.h at the very end of busybox.h or libbb.h.
-rw-r--r-- | include/busybox.h | 8 | ||||
-rw-r--r-- | include/libbb.h | 21 |
2 files changed, 15 insertions, 14 deletions
diff --git a/include/busybox.h b/include/busybox.h index e7ed135c0..4870871f2 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -44,10 +44,6 @@ | |||
44 | #define BB_BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" | 44 | #define BB_BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #ifdef DMALLOC | ||
48 | #include <dmalloc.h> | ||
49 | #endif | ||
50 | |||
51 | #include <features.h> | 47 | #include <features.h> |
52 | 48 | ||
53 | /* Pull in the utility routines from libbb */ | 49 | /* Pull in the utility routines from libbb */ |
@@ -118,4 +114,8 @@ extern const struct BB_applet applets[]; | |||
118 | #define PATH_MAX 256 | 114 | #define PATH_MAX 256 |
119 | #endif | 115 | #endif |
120 | 116 | ||
117 | #ifdef DMALLOC | ||
118 | #include <dmalloc.h> | ||
119 | #endif | ||
120 | |||
121 | #endif /* _BB_INTERNAL_H_ */ | 121 | #endif /* _BB_INTERNAL_H_ */ |
diff --git a/include/libbb.h b/include/libbb.h index b9794779d..c380ed739 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -34,15 +34,11 @@ | |||
34 | 34 | ||
35 | #include <netdb.h> | 35 | #include <netdb.h> |
36 | 36 | ||
37 | #ifdef DMALLOC | ||
38 | #include <dmalloc.h> | ||
39 | #endif | ||
40 | |||
41 | #include <features.h> | 37 | #include <features.h> |
42 | 38 | ||
43 | #include "bb_config.h" | 39 | #include "bb_config.h" |
44 | #ifdef CONFIG_SELINUX | 40 | #ifdef CONFIG_SELINUX |
45 | #include <selinux/selinux.h> | 41 | #include <selinux/selinux.h> |
46 | #endif | 42 | #endif |
47 | 43 | ||
48 | #include "pwd_.h" | 44 | #include "pwd_.h" |
@@ -178,12 +174,12 @@ extern const char *bb_skip_whitespace(const char *); | |||
178 | extern struct BB_applet *find_applet_by_name(const char *name); | 174 | extern struct BB_applet *find_applet_by_name(const char *name); |
179 | void run_applet_by_name(const char *name, int argc, char **argv); | 175 | void run_applet_by_name(const char *name, int argc, char **argv); |
180 | 176 | ||
181 | //#warning is this needed anymore? | 177 | /* dmalloc will redefine these to it's own implementation. It is safe |
182 | #ifndef DMALLOC | 178 | * to have the prototypes here unconditionally. */ |
183 | extern void *xmalloc (size_t size); | 179 | extern void *xmalloc(size_t size); |
184 | extern void *xrealloc(void *old, size_t size); | 180 | extern void *xrealloc(void *old, size_t size); |
185 | extern void *xcalloc(size_t nmemb, size_t size); | 181 | extern void *xcalloc(size_t nmemb, size_t size); |
186 | #endif | 182 | |
187 | extern char *bb_xstrdup (const char *s); | 183 | extern char *bb_xstrdup (const char *s); |
188 | extern char *bb_xstrndup (const char *s, int n); | 184 | extern char *bb_xstrndup (const char *s, int n); |
189 | extern char *safe_strncpy(char *dst, const char *src, size_t size); | 185 | extern char *safe_strncpy(char *dst, const char *src, size_t size); |
@@ -420,7 +416,7 @@ extern void run_shell ( const char *shell, int loginshell, const char *command, | |||
420 | #ifdef CONFIG_SELINUX | 416 | #ifdef CONFIG_SELINUX |
421 | extern void renew_current_security_context(void); | 417 | extern void renew_current_security_context(void); |
422 | extern void set_current_security_context(security_context_t sid); | 418 | extern void set_current_security_context(security_context_t sid); |
423 | #endif | 419 | #endif |
424 | extern int run_parts(char **args, const unsigned char test_mode, char **env); | 420 | extern int run_parts(char **args, const unsigned char test_mode, char **env); |
425 | extern int restricted_shell ( const char *shell ); | 421 | extern int restricted_shell ( const char *shell ); |
426 | extern void setup_environment ( const char *shell, int loginshell, int changeenv, const struct passwd *pw ); | 422 | extern void setup_environment ( const char *shell, int loginshell, int changeenv, const struct passwd *pw ); |
@@ -475,4 +471,9 @@ extern unsigned long get_ug_id(const char *s, long (*__bb_getxxnam)(const char * | |||
475 | #define HASH_MD5 2 | 471 | #define HASH_MD5 2 |
476 | extern int hash_fd(int fd, const size_t size, const uint8_t hash_algo, uint8_t *hashval); | 472 | extern int hash_fd(int fd, const size_t size, const uint8_t hash_algo, uint8_t *hashval); |
477 | 473 | ||
474 | /* busybox.h will include dmalloc later for us, else include it here. */ | ||
475 | #if !defined _BB_INTERNAL_H_ && defined DMALLOC | ||
476 | #include <dmalloc.h> | ||
477 | #endif | ||
478 | |||
478 | #endif /* __LIBCONFIG_H__ */ | 479 | #endif /* __LIBCONFIG_H__ */ |