diff options
author | Ron Yorston <rmy@pobox.com> | 2019-02-17 16:08:01 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-02-17 16:11:32 +0000 |
commit | b1dcae0da4f5e9713fd54678ec42709a1744474b (patch) | |
tree | 57581923b3262e661ee2cd4ae627d66f06ca1aee /shell | |
parent | 743580b4c029e200b1390075a1328ab314973bc2 (diff) | |
download | busybox-w32-b1dcae0da4f5e9713fd54678ec42709a1744474b.tar.gz busybox-w32-b1dcae0da4f5e9713fd54678ec42709a1744474b.tar.bz2 busybox-w32-b1dcae0da4f5e9713fd54678ec42709a1744474b.zip |
win32: fix POSIX build
There were a few places where changes intended for the WIN32 build
also affected the POSIX build. Fix these so the result of 'make
defconfig; make' for busybox-w32 is identical to upstream BusyBox.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index 89bd886d3..d63304bdb 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -462,7 +462,9 @@ struct globals_misc { | |||
462 | int rootpid; /* pid of main shell */ | 462 | int rootpid; /* pid of main shell */ |
463 | /* shell level: 0 for the main shell, 1 for its children, and so on */ | 463 | /* shell level: 0 for the main shell, 1 for its children, and so on */ |
464 | int shlvl; | 464 | int shlvl; |
465 | #if ENABLE_PLATFORM_MINGW32 | ||
465 | int loopnest; /* current loop nesting level */ | 466 | int loopnest; /* current loop nesting level */ |
467 | #endif | ||
466 | #define rootshell (!shlvl) | 468 | #define rootshell (!shlvl) |
467 | int errlinno; | 469 | int errlinno; |
468 | 470 | ||
@@ -472,7 +474,9 @@ struct globals_misc { | |||
472 | char *physdir; // = nullstr; /* physical working directory */ | 474 | char *physdir; // = nullstr; /* physical working directory */ |
473 | 475 | ||
474 | char *arg0; /* value of $0 */ | 476 | char *arg0; /* value of $0 */ |
477 | #if ENABLE_PLATFORM_MINGW32 | ||
475 | char *commandname; | 478 | char *commandname; |
479 | #endif | ||
476 | 480 | ||
477 | struct jmploc *exception_handler; | 481 | struct jmploc *exception_handler; |
478 | 482 | ||
@@ -551,12 +555,16 @@ extern struct globals_misc *BB_GLOBAL_CONST ash_ptr_to_globals_misc; | |||
551 | #define rootpid (G_misc.rootpid ) | 555 | #define rootpid (G_misc.rootpid ) |
552 | #define shlvl (G_misc.shlvl ) | 556 | #define shlvl (G_misc.shlvl ) |
553 | #define errlinno (G_misc.errlinno ) | 557 | #define errlinno (G_misc.errlinno ) |
558 | #if ENABLE_PLATFORM_MINGW32 | ||
554 | #define loopnest (G_misc.loopnest ) | 559 | #define loopnest (G_misc.loopnest ) |
560 | #endif | ||
555 | #define minusc (G_misc.minusc ) | 561 | #define minusc (G_misc.minusc ) |
556 | #define curdir (G_misc.curdir ) | 562 | #define curdir (G_misc.curdir ) |
557 | #define physdir (G_misc.physdir ) | 563 | #define physdir (G_misc.physdir ) |
558 | #define arg0 (G_misc.arg0 ) | 564 | #define arg0 (G_misc.arg0 ) |
565 | #if ENABLE_PLATFORM_MINGW32 | ||
559 | #define commandname (G_misc.commandname) | 566 | #define commandname (G_misc.commandname) |
567 | #endif | ||
560 | #define exception_handler (G_misc.exception_handler) | 568 | #define exception_handler (G_misc.exception_handler) |
561 | #define exception_type (G_misc.exception_type ) | 569 | #define exception_type (G_misc.exception_type ) |
562 | #define suppress_int (G_misc.suppress_int ) | 570 | #define suppress_int (G_misc.suppress_int ) |
@@ -1429,6 +1437,9 @@ struct parsefile { | |||
1429 | 1437 | ||
1430 | static struct parsefile basepf; /* top level input file */ | 1438 | static struct parsefile basepf; /* top level input file */ |
1431 | static struct parsefile *g_parsefile = &basepf; /* current input file */ | 1439 | static struct parsefile *g_parsefile = &basepf; /* current input file */ |
1440 | #if ENABLE_PLATFORM_POSIX | ||
1441 | static char *commandname; /* currently executing command */ | ||
1442 | #endif | ||
1432 | 1443 | ||
1433 | 1444 | ||
1434 | /* ============ Message printing */ | 1445 | /* ============ Message printing */ |
@@ -9486,6 +9497,9 @@ defun(union node *func) | |||
9486 | #define SKIPFUNC (1 << 2) | 9497 | #define SKIPFUNC (1 << 2) |
9487 | static smallint evalskip; /* set to SKIPxxx if we are skipping commands */ | 9498 | static smallint evalskip; /* set to SKIPxxx if we are skipping commands */ |
9488 | static int skipcount; /* number of levels to skip */ | 9499 | static int skipcount; /* number of levels to skip */ |
9500 | #if ENABLE_PLATFORM_POSIX | ||
9501 | static int loopnest; /* current loop nesting level */ | ||
9502 | #endif | ||
9489 | static int funcline; /* starting line number of current function, or 0 if not in a function */ | 9503 | static int funcline; /* starting line number of current function, or 0 if not in a function */ |
9490 | 9504 | ||
9491 | /* Forward decl way out to parsing code - dotrap needs it */ | 9505 | /* Forward decl way out to parsing code - dotrap needs it */ |