aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-07-13 10:39:58 +0100
committerRon Yorston <rmy@pobox.com>2021-07-13 10:43:14 +0100
commitdcca23dc4cf9b51a1c2576360fea190e9b71204e (patch)
tree568f171efb20f24b54df495948152c1b585416db /shell
parent819188c1cc2b90d95cf35dae6c72d304df4297b7 (diff)
downloadbusybox-w32-dcca23dc4cf9b51a1c2576360fea190e9b71204e.tar.gz
busybox-w32-dcca23dc4cf9b51a1c2576360fea190e9b71204e.tar.bz2
busybox-w32-dcca23dc4cf9b51a1c2576360fea190e9b71204e.zip
ash, libbb: don't affect POSIX build
Tweak code to avoid contamination of the POSIX build. There weren't any adverse effects, but better safe than sorry.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 712286fbd..8b8c5f1dc 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -349,8 +349,9 @@ typedef long arith_t;
349# define BB_GLOBAL_CONST const 349# define BB_GLOBAL_CONST const
350#endif 350#endif
351 351
352#define FORKSHELL_DEBUG 0
353#if ENABLE_PLATFORM_MINGW32 352#if ENABLE_PLATFORM_MINGW32
353# define FORKSHELL_DEBUG 0
354
354union node; 355union node;
355struct strlist; 356struct strlist;
356struct job; 357struct job;
@@ -9660,17 +9661,20 @@ nodeckstrdup(const char *s)
9660 9661
9661static union node *copynode(union node *); 9662static union node *copynode(union node *);
9662 9663
9663#if ENABLE_PLATFORM_MINGW32 && FORKSHELL_DEBUG
9664# define FREE 1
9665# define NO_FREE 2
9666# define ANNOT(dst,note) {if (annot) annot[(char *)&dst - (char *)fs_start] = note;}
9667#else
9668# define FREE 1
9669# define NO_FREE 1
9670# define ANNOT(dst,note)
9671#endif
9672
9673#if ENABLE_PLATFORM_MINGW32 9664#if ENABLE_PLATFORM_MINGW32
9665# if FORKSHELL_DEBUG
9666# define FREE 1
9667# define NO_FREE 2
9668# define ANNOT(dst,note) { \
9669 if (annot) \
9670 annot[(char *)&dst - (char *)fs_start] = note; \
9671 }
9672# else
9673# define FREE 1
9674# define NO_FREE 1
9675# define ANNOT(dst,note)
9676# endif
9677
9674/* The relocation map is offset from the start of the forkshell data 9678/* The relocation map is offset from the start of the forkshell data
9675 * block by 'fs_size' bytes. The flag relating to a particular destination 9679 * block by 'fs_size' bytes. The flag relating to a particular destination
9676 * pointer is thus at (dst+fs_size). */ 9680 * pointer is thus at (dst+fs_size). */