to strcasestr, it was used in a wrong way (reverse logic error in
checking its return value), turning to mis-detection of UTF-8 locale.
* sh.h, check.t: bump version
* copyright: bump year
diffs] , Mon Nov 20 21:53:39 2006 UTC (2 weeks, 1 day ago) by miod
Compute user-given ulimit value times ulimit unit as an rlim_t value, not a
long value; catches some 32 bit overflows on 32 bit platforms.
Found by drahn@, ok otto@
"set +o emacs-usemeta" and "set -o vi-show8" which are always on now,
since we have proper internationalisation (i.e. utf-8) support, and
assume the user either has a 'C' locale and can't enter 8-bit chars,
his terminal is 8bit-transparent, or he has a 'UTF-8' locale.
twkm (from #ksh on freenode), that $RANDOM is always an unsigned
15-bit decimal integer.
(RANDOM << 15 | RANDOM) thusly yields 30 bit, which is still more
than 36^5, so we can use it on the baselife CD to speed things up
cought by crib in IRC, thanks
(our textproc/groff port is unaffected since it uses the MirOS implementation,
a BSD derived one with fixes, by default instead but can reproduce the defect
with -mgdoc instead of -mdoc as parametre)
main.c: In function 'main':
main.c:208: warning: cast discards qualifiers from pointer target type
main.c:329: warning: cast discards qualifiers from pointer target type
no warnings at autoconf time left either; will take care of these two later
(might revisit changes from this commit), maybe change declararion for the
builtins to have their argv[] be const strings, and go through strict type
and qualifier checking again. this'll further improve stability.
XXX these changes might have introduced (more?) memory leaks,
XXX someone who knows about these tools should verify with
XXX automatic memory usage analysers (valgrind?)
still passes testsuite
XXX one of these uses a gcc extension, ok for now tho
* don't include <ctype.h> any more at all
* don't try nl_langinfo in small mode, just check locale
saves 171 .text, 4 .data, 256 .bss, 1 import
return a value in case of an error (0 or the partial result, which
is the full result in case of trailing junk even), using it to rid
atoi() is possible, saving 9t 4d 1i