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 /util-linux/rev.c | |
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 'util-linux/rev.c')
-rw-r--r-- | util-linux/rev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/rev.c b/util-linux/rev.c index b0a0c01aa..c90b4bbaf 100644 --- a/util-linux/rev.c +++ b/util-linux/rev.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | /* In-place invert */ | 33 | /* In-place invert */ |
34 | static void bb_strrev(CHAR_T *s, int len) | 34 | static void strrev(CHAR_T *s, int len) |
35 | { | 35 | { |
36 | int i; | 36 | int i; |
37 | 37 | ||
@@ -103,14 +103,14 @@ int rev_main(int argc UNUSED_PARAM, char **argv) | |||
103 | /* Convert to wchar_t (might error out!) */ | 103 | /* Convert to wchar_t (might error out!) */ |
104 | int len = mbstowcs(tmp, buf, bufsize); | 104 | int len = mbstowcs(tmp, buf, bufsize); |
105 | if (len >= 0) { | 105 | if (len >= 0) { |
106 | bb_strrev(tmp, len); | 106 | strrev(tmp, len); |
107 | /* Convert back to char */ | 107 | /* Convert back to char */ |
108 | wcstombs(buf, tmp, bufsize); | 108 | wcstombs(buf, tmp, bufsize); |
109 | } | 109 | } |
110 | free(tmp); | 110 | free(tmp); |
111 | } | 111 | } |
112 | #else | 112 | #else |
113 | bb_strrev(buf, strlen(buf)); | 113 | strrev(buf, strlen(buf)); |
114 | #endif | 114 | #endif |
115 | fputs(buf, stdout); | 115 | fputs(buf, stdout); |
116 | } | 116 | } |