diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-05-10 20:10:13 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-05-10 20:10:13 +1000 |
commit | d2a9ddeb6cc58284996fbc5367877c99fee8914e (patch) | |
tree | 187cadb382d0336bbc529cc7ca9e3d1ccd680213 /include | |
parent | 1fa419fb3c7ef91e878398bb0388854d27d7bd8f (diff) | |
download | busybox-w32-old.tar.gz busybox-w32-old.tar.bz2 busybox-w32-old.zip |
general warning cleanupold
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 3 | ||||
-rw-r--r-- | include/mingw.h | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index ea02a9978..ce90a11c7 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -410,6 +410,7 @@ extern void *xzalloc(size_t size); | |||
410 | extern void *xrealloc(void *old, size_t size); | 410 | extern void *xrealloc(void *old, size_t size); |
411 | 411 | ||
412 | extern ssize_t safe_read(int fd, void *buf, size_t count); | 412 | extern ssize_t safe_read(int fd, void *buf, size_t count); |
413 | extern void xread(int fd, void *buf, size_t count); | ||
413 | extern ssize_t full_read(int fd, void *buf, size_t count); | 414 | extern ssize_t full_read(int fd, void *buf, size_t count); |
414 | extern unsigned char xread_char(int fd); | 415 | extern unsigned char xread_char(int fd); |
415 | extern char *reads(int fd, char *buf, size_t count); | 416 | extern char *reads(int fd, char *buf, size_t count); |
@@ -419,6 +420,7 @@ extern void *xmalloc_open_read_close(const char *filename, size_t *sizep); | |||
419 | 420 | ||
420 | #define safe_write(fd, buf, count) bb_safe_write(fd, buf, count) | 421 | #define safe_write(fd, buf, count) bb_safe_write(fd, buf, count) |
421 | extern ssize_t safe_write(int fd, const void *buf, size_t count); | 422 | extern ssize_t safe_write(int fd, const void *buf, size_t count); |
423 | extern void xwrite(int fd, const void *buf, size_t count); | ||
422 | extern ssize_t full_write(int fd, const void *buf, size_t count); | 424 | extern ssize_t full_write(int fd, const void *buf, size_t count); |
423 | 425 | ||
424 | /* Reads and prints to stdout till eof, then closes FILE. Exits on error: */ | 426 | /* Reads and prints to stdout till eof, then closes FILE. Exits on error: */ |
@@ -442,6 +444,7 @@ extern FILE *fopen_or_warn_stdin(const char *filename); | |||
442 | 444 | ||
443 | /* Convert each alpha char in str to lower-case */ | 445 | /* Convert each alpha char in str to lower-case */ |
444 | extern char* str_tolower(char *str); | 446 | extern char* str_tolower(char *str); |
447 | extern char* xstrndup(const char *s, int n); | ||
445 | 448 | ||
446 | char *utoa(unsigned n); | 449 | char *utoa(unsigned n); |
447 | #ifdef __MINGW32__ | 450 | #ifdef __MINGW32__ |
diff --git a/include/mingw.h b/include/mingw.h index 500308947..1c3728ee4 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -83,8 +83,10 @@ static inline int symlink(const char *oldpath, const char *newpath) | |||
83 | { errno = ENOSYS; return -1; } | 83 | { errno = ENOSYS; return -1; } |
84 | static inline int fchmod(int fildes, mode_t mode) | 84 | static inline int fchmod(int fildes, mode_t mode) |
85 | { errno = ENOSYS; return -1; } | 85 | { errno = ENOSYS; return -1; } |
86 | /* | ||
86 | static inline int fork(void) | 87 | static inline int fork(void) |
87 | { errno = ENOSYS; return -1; } | 88 | { errno = ENOSYS; return -1; } |
89 | */ | ||
88 | static inline unsigned int alarm(unsigned int seconds) | 90 | static inline unsigned int alarm(unsigned int seconds) |
89 | { return 0; } | 91 | { return 0; } |
90 | static inline int fsync(int fd) | 92 | static inline int fsync(int fd) |
@@ -93,7 +95,7 @@ static inline int getppid(void) | |||
93 | { return 1; } | 95 | { return 1; } |
94 | static inline void sync(void) | 96 | static inline void sync(void) |
95 | {} | 97 | {} |
96 | static inline int getuid() | 98 | static inline int getuid(void) |
97 | { return 1; } | 99 | { return 1; } |
98 | static inline struct passwd *getpwnam(const char *name) | 100 | static inline struct passwd *getpwnam(const char *name) |
99 | { return NULL; } | 101 | { return NULL; } |
@@ -148,6 +150,13 @@ int setitimer(int type, struct itimerval *in, struct itimerval *out); | |||
148 | int sigaction(int sig, struct sigaction *in, struct sigaction *out); | 150 | int sigaction(int sig, struct sigaction *in, struct sigaction *out); |
149 | int link(const char *oldpath, const char *newpath); | 151 | int link(const char *oldpath, const char *newpath); |
150 | time_t tm_to_time_t(const struct tm *tm); | 152 | time_t tm_to_time_t(const struct tm *tm); |
153 | char *strsep(char **stringp, const char *delim); | ||
154 | char *strptime(const char *s, const char *format, struct tm *tm); | ||
155 | void unsetenv(const char *env); | ||
156 | char *realpath(const char *path, char *resolved_path); | ||
157 | int fdprintf(int fd, const char *format, ...); | ||
158 | int setenv(const char *name, const char *value, int replace); | ||
159 | size_t strlcpy(char *dest, const char *src, size_t size); | ||
151 | 160 | ||
152 | /* | 161 | /* |
153 | * replacements of existing functions | 162 | * replacements of existing functions |
@@ -251,7 +260,7 @@ char **copy_environ(void); | |||
251 | void free_environ(char **env); | 260 | void free_environ(char **env); |
252 | char **env_setenv(char **env, const char *name); | 261 | char **env_setenv(char **env, const char *name); |
253 | 262 | ||
254 | const char *get_busybox_exec_path(); | 263 | const char *get_busybox_exec_path(void); |
255 | /* | 264 | /* |
256 | * A replacement of main() that ensures that argv[0] has a path | 265 | * A replacement of main() that ensures that argv[0] has a path |
257 | */ | 266 | */ |