summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/math.c3
-rw-r--r--Src/options.c1
-rw-r--r--Src/zsh.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/Src/math.c b/Src/math.c
index 75f0106bb..a7fcd0978 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -357,7 +357,8 @@ zzlex(void)
 		yyval.u.l = zstrtol(++ptr, &ptr, lastbase = 16);
 		return NUM;
 	    }
-	    else if (idigit(*ptr) && (memchr(ptr, '.', strlen(ptr)) == NULL)) {
+	    else if (isset(OCTALZEROES) &&
+		    (memchr(ptr, '.', strlen(ptr)) == NULL)) {
 	        yyval.u.l = zstrtol(ptr, &ptr, lastbase = 8);
 	        return NUM;
 	    }
diff --git a/Src/options.c b/Src/options.c
index 9125a2380..ea3bf13de 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -162,6 +162,7 @@ static struct optname optns[] = {
 {NULL, "notify",	      OPT_ZSH,			 NOTIFY},
 {NULL, "nullglob",	      OPT_EMULATE,		 NULLGLOB},
 {NULL, "numericglobsort",     OPT_EMULATE,		 NUMERICGLOBSORT},
+{NULL, "octalzeroes",         OPT_EMULATE|OPT_SH,	 OCTALZEROES},
 {NULL, "overstrike",	      0,			 OVERSTRIKE},
 {NULL, "pathdirs",	      OPT_EMULATE,		 PATHDIRS},
 {NULL, "posixbuiltins",	      OPT_EMULATE|OPT_BOURNE,	 POSIXBUILTINS},
diff --git a/Src/zsh.h b/Src/zsh.h
index dec00c9e7..34cde8b54 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1395,6 +1395,7 @@ enum {
     NOTIFY,
     NULLGLOB,
     NUMERICGLOBSORT,
+    OCTALZEROES,
     OVERSTRIKE,
     PATHDIRS,
     POSIXBUILTINS,