diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-10 08:18:21 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-10 08:18:21 +0300 |
commit | 6de0102373304c0fdf70a7ddeb17dd1caa3a9b23 (patch) | |
tree | 7a8f3f18180e0b84893a4cccd883c80ffb7d9bc0 /main.c | |
parent | d7c8dfd41bd5671ddfa6c81b2ef1779cab06e56b (diff) | |
parent | ca9f23d6c33c4b5cb3786d480948a42988ca99ac (diff) | |
download | egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.tar.gz egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.tar.bz2 egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.zip |
Merge branch 'master' into comment
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -33,6 +33,16 @@ #include <mcheck.h> #endif +#ifdef HAVE_LIBSIGSEGV +#include <sigsegv.h> +#else +typedef void *stackoverflow_context_t; +/* the argument to this macro is purposely not used */ +#define sigsegv_install_handler(catchsegv) signal(SIGSEGV, catchsig) +/* define as 0 rather than empty so that (void) cast on it works */ +#define stackoverflow_install_handler(catchstackoverflow, extra_stack, STACK_SIZE) 0 +#endif + #define DEFAULT_PROFILE "awkprof.out" /* where to put profile */ #define DEFAULT_VARFILE "awkvars.out" /* where to put vars */ #define DEFAULT_PREC 53 @@ -262,17 +272,6 @@ main(int argc, char **argv) */ gawk_mb_cur_max = MB_CUR_MAX; /* Without MBS_SUPPORT, gawk_mb_cur_max is 1. */ -#ifdef LIBC_IS_BORKED -{ - const char *env_lc; - - env_lc = getenv("LC_ALL"); - if (env_lc == NULL) - env_lc = getenv("LANG"); - if (env_lc != NULL && env_lc[1] == '\0' && tolower(env_lc[0]) == 'c') - gawk_mb_cur_max = 1; -} -#endif /* init the cache for checking bytes if they're characters */ init_btowc_cache(); @@ -705,6 +704,8 @@ out: if (do_intl) exit(EXIT_SUCCESS); + install_builtins(); + if (do_lint) shadow_funcs(); @@ -825,7 +826,7 @@ usage(int exitval, FILE *fp) fputs(_("\t-h\t\t\t--help\n"), fp); fputs(_("\t-i includefile\t\t--include=includefile\n"), fp); fputs(_("\t-l library\t\t--load=library\n"), fp); - fputs(_("\t-L [fatal]\t\t--lint[=fatal]\n"), fp); + fputs(_("\t-L[fatal|invalid]\t--lint[=fatal|invalid]\n"), fp); fputs(_("\t-M\t\t\t--bignum\n"), fp); fputs(_("\t-N\t\t\t--use-lc-numeric\n"), fp); fputs(_("\t-n\t\t\t--non-decimal-data\n"), fp); |