aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-06-22 16:44:23 +0100
committerRon Yorston <rmy@pobox.com>2024-06-22 16:44:23 +0100
commit98a0e0e272018a1ae2cc5cd4fa9775c5cfb33dec (patch)
treeefec06cd0ad50e6929cce41a4089a6a5f446d189 /include
parent790e37727319c3dd9c2d4e45dac9b6cc38a5d25f (diff)
downloadbusybox-w32-98a0e0e272018a1ae2cc5cd4fa9775c5cfb33dec.tar.gz
busybox-w32-98a0e0e272018a1ae2cc5cd4fa9775c5cfb33dec.tar.bz2
busybox-w32-98a0e0e272018a1ae2cc5cd4fa9775c5cfb33dec.zip
win32: add env var to control error dialogs
If the environment variable BB_CRITICAL_ERROR_DIALOGS is set to 1 critical error dialogs are enabled. If unset or set to any other value they aren't. In either case the error messages introduced by commit 790e37727 (win32: revert 'don't set error mode') are issued. The shell exports BB_CRITICAL_ERROR_DIALOGS to the environment immediately on any change so the setting takes effect at once. Adds 104-160 bytes. (GitHub issue #423)
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h1
-rw-r--r--include/mingw.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index d37d4e64c..9055ed066 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -2418,6 +2418,7 @@ extern const char bbvar[] ALIGN1;
2418#define BB_SKIP_ANSI_EMULATION bbafter(BB_OVERRIDE_APPLETS) 2418#define BB_SKIP_ANSI_EMULATION bbafter(BB_OVERRIDE_APPLETS)
2419#define BB_TERMINAL_MODE bbafter(BB_SKIP_ANSI_EMULATION) 2419#define BB_TERMINAL_MODE bbafter(BB_SKIP_ANSI_EMULATION)
2420#define BB_SYSTEMROOT bbafter(BB_TERMINAL_MODE) 2420#define BB_SYSTEMROOT bbafter(BB_TERMINAL_MODE)
2421#define BB_CRITICAL_ERROR_DIALOGS bbafter(BB_SYSTEMROOT)
2421#endif 2422#endif
2422 2423
2423extern const int const_int_0; 2424extern const int const_int_0;
diff --git a/include/mingw.h b/include/mingw.h
index fae732332..93fad0605 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -639,3 +639,4 @@ char *quote_arg(const char *arg);
639char *find_first_executable(const char *name); 639char *find_first_executable(const char *name);
640char *xappendword(const char *str, const char *word); 640char *xappendword(const char *str, const char *word);
641int windows_env(void); 641int windows_env(void);
642void change_critical_error_dialogs(const char *newval) FAST_FUNC;