{ VSTRFIXED|VTEXTFIXED , "PS2=> " , NULL },
{ VSTRFIXED|VTEXTFIXED , "PS4=+ " , NULL },
#if ENABLE_ASH_GETOPTS
- { VSTRFIXED|VTEXTFIXED , "OPTIND=1" , getoptsreset },
+ { VSTRFIXED|VTEXTFIXED , defoptindvar, getoptsreset },
#endif
#if ENABLE_ASH_RANDOM_SUPPORT
{ VSTRFIXED|VTEXTFIXED|VUNSET|VDYNAMIC, "RANDOM", change_random },
}
}
+ setvareq((char*)defoptindvar, VTEXTFIXED);
+
setvar0("PPID", utoa(getppid()));
#if ENABLE_ASH_BASH_COMPAT
p = lookupvar("SHLVL");
#include <sys/resource.h> /* getrlimit */
const char defifsvar[] ALIGN1 = "IFS= \t\n";
+const char defoptindvar[] ALIGN1 = "OPTIND=1";
int FAST_FUNC is_well_formed_var_name(const char *s, char terminator)
extern const char defifsvar[] ALIGN1; /* "IFS= \t\n" */
#define defifs (defifsvar + 4)
+extern const char defoptindvar[] ALIGN1; /* "OPTIND=1" */
+
int FAST_FUNC is_well_formed_var_name(const char *s, char terminator);
/* Builtins */