aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-11-25 21:29:32 +0000
committerRon Yorston <rmy@pobox.com>2018-11-26 09:43:28 +0000
commit0856f3a689a26c88ff68f250c7ba2d7be7940fbe (patch)
treed2f3cde7205ee1488d87d301cb28a9425a1eae5a /include
parent1ae73ffecfa074e345c75dc761931a767c9c9318 (diff)
downloadbusybox-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.h3
-rw-r--r--include/mingw.h6
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;
1010char* str_tolower(char *str) FAST_FUNC; 1010char* str_tolower(char *str) FAST_FUNC;
1011 1011
1012char *utoa(unsigned n) FAST_FUNC; 1012char *utoa(unsigned n) FAST_FUNC;
1013#if ENABLE_PLATFORM_MINGW32
1014# define itoa bb_itoa
1015#endif
1016char *itoa(int n) FAST_FUNC; 1013char *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 */
1018char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; 1015char *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) == '\\')