diff options
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r-- | shell/shell_common.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c index 57297155e..4c870fab8 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c | |||
@@ -20,7 +20,11 @@ | |||
20 | #include "shell_common.h" | 20 | #include "shell_common.h" |
21 | #include <sys/resource.h> /* getrlimit */ | 21 | #include <sys/resource.h> /* getrlimit */ |
22 | 22 | ||
23 | #if !ENABLE_PLATFORM_MINGW32 | ||
23 | const char defifsvar[] ALIGN1 = "IFS= \t\n"; | 24 | const char defifsvar[] ALIGN1 = "IFS= \t\n"; |
25 | #else | ||
26 | const char defifsvar[] ALIGN1 = "IFS= \t\n\r"; | ||
27 | #endif | ||
24 | 28 | ||
25 | 29 | ||
26 | int FAST_FUNC is_well_formed_var_name(const char *s, char terminator) | 30 | int FAST_FUNC is_well_formed_var_name(const char *s, char terminator) |
@@ -201,7 +205,7 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val), | |||
201 | } | 205 | } |
202 | 206 | ||
203 | c = buffer[bufpos]; | 207 | c = buffer[bufpos]; |
204 | if (c == '\0') | 208 | if (c == '\0' || (ENABLE_PLATFORM_MINGW32 && c == '\r')) |
205 | continue; | 209 | continue; |
206 | if (backslash) { | 210 | if (backslash) { |
207 | backslash = 0; | 211 | backslash = 0; |
@@ -273,6 +277,7 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val), | |||
273 | 277 | ||
274 | /* ulimit builtin */ | 278 | /* ulimit builtin */ |
275 | 279 | ||
280 | #if !ENABLE_PLATFORM_MINGW32 | ||
276 | struct limits { | 281 | struct limits { |
277 | uint8_t cmd; /* RLIMIT_xxx fit into it */ | 282 | uint8_t cmd; /* RLIMIT_xxx fit into it */ |
278 | uint8_t factor_shift; /* shift by to get rlim_{cur,max} values */ | 283 | uint8_t factor_shift; /* shift by to get rlim_{cur,max} values */ |
@@ -498,3 +503,9 @@ shell_builtin_ulimit(char **argv) | |||
498 | 503 | ||
499 | return 0; | 504 | return 0; |
500 | } | 505 | } |
506 | #else | ||
507 | int FAST_FUNC shell_builtin_ulimit(char **argv UNUSED_PARAM) | ||
508 | { | ||
509 | return 1; | ||
510 | } | ||
511 | #endif | ||