-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-o posix: always recognise octals in "let" builtin
Though the "let" builtin is not itself a POSIX standard command, it processes standard shell arithmetic, so it should recognise octals by leading zeros as POSIX requires if the 'posix' option is on. This overrides the setting of the 'letoctal' option. Note that none of this applies to the ((...)) arithmetic command, which has always recognised leading-octal zeros and does not listen to 'letoctal'. So setting the posix mode makes this consistent. src/cmd/ksh93/sh/arith.c: - When running the 'let' builtin, test that both SH_LETOCTAL and SH_POSIX are off before stripping leading zeros to disable octal number recognition. - Cosmetic: fix spurious newline. src/cmd/ksh93/sh.1: - Document the change. src/cmd/ksh93/tests/shtests: - Make sure to disable posix mode by default for regression tests.
- Loading branch information
Showing
5 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters