aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-09-21 17:38:30 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-09-21 17:38:30 +0000
commitd4cffd1cc3437910393c319215d14bd2dcaa4df6 (patch)
tree64eb4c7f01785a0f2cfedd2001f9df8ef260ddef
parentcef737f03817d8e5fafcc48e7ffda479e0e25f87 (diff)
downloadbusybox-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.h8
-rw-r--r--include/libbb.h21
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 *);
178extern struct BB_applet *find_applet_by_name(const char *name); 174extern struct BB_applet *find_applet_by_name(const char *name);
179void run_applet_by_name(const char *name, int argc, char **argv); 175void 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. */
183extern void *xmalloc (size_t size); 179extern void *xmalloc(size_t size);
184extern void *xrealloc(void *old, size_t size); 180extern void *xrealloc(void *old, size_t size);
185extern void *xcalloc(size_t nmemb, size_t size); 181extern void *xcalloc(size_t nmemb, size_t size);
186#endif 182
187extern char *bb_xstrdup (const char *s); 183extern char *bb_xstrdup (const char *s);
188extern char *bb_xstrndup (const char *s, int n); 184extern char *bb_xstrndup (const char *s, int n);
189extern char *safe_strncpy(char *dst, const char *src, size_t size); 185extern 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
421extern void renew_current_security_context(void); 417extern void renew_current_security_context(void);
422extern void set_current_security_context(security_context_t sid); 418extern void set_current_security_context(security_context_t sid);
423#endif 419#endif
424extern int run_parts(char **args, const unsigned char test_mode, char **env); 420extern int run_parts(char **args, const unsigned char test_mode, char **env);
425extern int restricted_shell ( const char *shell ); 421extern int restricted_shell ( const char *shell );
426extern void setup_environment ( const char *shell, int loginshell, int changeenv, const struct passwd *pw ); 422extern 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
476extern int hash_fd(int fd, const size_t size, const uint8_t hash_algo, uint8_t *hashval); 472extern 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__ */