diff options
author | Ron Yorston <rmy@pobox.com> | 2018-11-25 21:29:32 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-11-26 09:43:28 +0000 |
commit | 0856f3a689a26c88ff68f250c7ba2d7be7940fbe (patch) | |
tree | d2f3cde7205ee1488d87d301cb28a9425a1eae5a /include | |
parent | 1ae73ffecfa074e345c75dc761931a767c9c9318 (diff) | |
download | busybox-w32-0856f3a689a26c88ff68f250c7ba2d7be7940fbe.tar.gz busybox-w32-0856f3a689a26c88ff68f250c7ba2d7be7940fbe.tar.bz2 busybox-w32-0856f3a689a26c88ff68f250c7ba2d7be7940fbe.zip |
win32: move function redefinitions to mingw.h
The itoa and strrev functions have different prototypes in BusyBox
and WIN32. Move the #defines which handle this to mingw.h, reducing
differences between busybox-w32 and upstream.
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 3 | ||||
-rw-r--r-- | include/mingw.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h index 0a333dca8..90fdd1178 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1010,9 +1010,6 @@ char *safe_gethostname(void) FAST_FUNC; | |||
1010 | char* str_tolower(char *str) FAST_FUNC; | 1010 | char* str_tolower(char *str) FAST_FUNC; |
1011 | 1011 | ||
1012 | char *utoa(unsigned n) FAST_FUNC; | 1012 | char *utoa(unsigned n) FAST_FUNC; |
1013 | #if ENABLE_PLATFORM_MINGW32 | ||
1014 | # define itoa bb_itoa | ||
1015 | #endif | ||
1016 | char *itoa(int n) FAST_FUNC; | 1013 | char *itoa(int n) FAST_FUNC; |
1017 | /* Returns a pointer past the formatted number, does NOT null-terminate */ | 1014 | /* Returns a pointer past the formatted number, does NOT null-terminate */ |
1018 | char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; | 1015 | char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; |
diff --git a/include/mingw.h b/include/mingw.h index 7ee9c15cc..025c4e22b 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -419,6 +419,12 @@ DIR *mingw_opendir(const char *path); | |||
419 | #define opendir mingw_opendir | 419 | #define opendir mingw_opendir |
420 | 420 | ||
421 | /* | 421 | /* |
422 | * Functions with different prototypes in BusyBox and WIN32 | ||
423 | */ | ||
424 | #define itoa bb_itoa | ||
425 | #define strrev bb_strrev | ||
426 | |||
427 | /* | ||
422 | * MinGW specific | 428 | * MinGW specific |
423 | */ | 429 | */ |
424 | #define is_dir_sep(c) ((c) == '/' || (c) == '\\') | 430 | #define is_dir_sep(c) ((c) == '/' || (c) == '\\') |