kamil
acc2fa794c
ksh: Use ANSI C varargs, drop support for older version <varargs.h>
2017-06-23 00:18:01 +00:00
kamil
cb1c866326
ksh: Remove remnant hack for SCO UNIX in tty code
2017-06-23 00:11:01 +00:00
kamil
a761aa7e3f
ksh: Remove support for NeXT Operating System
2017-06-23 00:09:36 +00:00
kamil
0e8072bdff
ksh: Drop the latest ifdef for BSD4.1 and eliminate dead code around it
2017-06-23 00:07:15 +00:00
kamil
c65b0df2e9
ksh: Drop BSD4.3 temporary hack in tty code
2017-06-23 00:04:20 +00:00
kamil
14ae4d8526
ksh: Drop support for UNIX V7-style signal routines
2017-06-23 00:00:58 +00:00
kamil
0a9965d29a
ksh: Drop fallback for BSD4.2 signal routines
2017-06-22 23:59:28 +00:00
kamil
53e78cf286
ksh: Remove fallback to BSD4.1 signal routines
2017-06-22 23:56:24 +00:00
kamil
3b7ff6c991
ksh: Drop support for systems without mmap(2)
2017-06-22 23:54:13 +00:00
kamil
52b3355e26
ksh: Drop support for systems without dup2(2)
2017-06-22 23:50:24 +00:00
kamil
237b342911
ksh: Drop support for ISC UNIX
2017-06-22 23:47:29 +00:00
kamil
eed5a31e9b
ksh: Drop support for systems without offsetof(3)
2017-06-22 23:42:35 +00:00
kamil
bdcebfe8f5
ksh: Drop support for systems without <limits.h>
2017-06-22 23:38:49 +00:00
kamil
accac1300c
ksh: Drop support for systems without <fcntl.h>
2017-06-22 23:37:00 +00:00
kamil
fb30a30908
ksh: Drop support for systems without memmove(3) and stop using bcopy(3)
2017-06-22 23:33:36 +00:00
kamil
99f9f7cfb5
ksh: Drop support for systems without memset(3)
2017-06-22 23:30:42 +00:00
kamil
98fef8f2dd
ksh: Drop usage of SVID header <memory.h>, it's legacy standard
2017-06-22 23:29:35 +00:00
kamil
00f99741e1
ksh: Drop support for systems without strcasecmp(3) and strncasecmp(3)
2017-06-22 23:27:53 +00:00
kamil
05a5edb66a
ksh: Drop support for systems without strstr(3)
2017-06-22 23:26:17 +00:00
kamil
8f43bfe473
ksh: Drop support for systems without <string.h>
2017-06-22 23:23:27 +00:00
kamil
ba6c50ffa7
ksh: Drop support for systems without <stddef.h>
...
No functional change.
2017-06-22 23:19:53 +00:00
kamil
6f9fbdf520
ksh: Drop support for systems without <stdlib.h>
...
No functional change.
2017-06-22 23:17:50 +00:00
kamil
17e1427bb7
ksh: Drop support for systems without <unistd.h>
...
This code wouldn't work for them anyway.
No functional change.
2017-06-22 23:15:05 +00:00
kamil
b42d86bc68
ksh: Kill switch for CLOSEDIR_VOID (closedir(2) returns void)
...
No users in the code. No functional change.
2017-06-22 23:11:48 +00:00
kamil
9d04c96c0d
ksh: Assume that $CC handles const (ANSI C89)
...
No functional change.
2017-06-22 23:09:32 +00:00
kamil
af6175f2e1
Drop support for $CC incapable to use void* / volatile* (pre ANSI C89)
2017-06-22 19:46:54 +00:00
kamil
d6fe16556c
Drop Ultrix support from ksh(1), a DEC UNIX for VAX
2017-06-22 19:41:07 +00:00
kamil
eb13ce8ce3
Reapply removal of code from 90ties for OS/2 Cygwin AIX HPUX SCOUnix
...
Added missing #endif terminator in emacs.c
2017-06-22 14:20:46 +00:00
kamil
266bea007e
Temporarily revert previous.
...
emacs.* gets wrong code in generation
2017-06-22 14:11:27 +00:00
kamil
ffa8eeb219
Remove code for AIX, including hack for 3.2.5 (from 1997) - from ksh(1)
...
OK by <kre>
2017-06-22 13:37:16 +00:00
kamil
2f8869f916
Drop HP-UX support from ksh(1)
...
OK by <kre>
2017-06-22 13:35:47 +00:00
kamil
4ae20c97a6
Remove sco unix 3.2v4.1 support (from 1992) from ksh(1)
...
OK by <kre>
2017-06-22 13:34:48 +00:00
kamil
e5604d4f02
Remove os2 support in ksh(1)
...
OK by <kre>
2017-06-22 13:33:39 +00:00
kamil
fc74b4892d
Remove ancient cygwin support in ksh(1)
...
OK by <kre>
2017-06-22 13:32:04 +00:00
christos
905af67799
PR/52210: David H. Gutteridge: revert var pattern handling.
2017-05-03 00:41:34 +00:00
christos
b9dfc8dc3f
Use backtracking for regular patterns, but not ksh-specific ones [*?!+@](...)
...
which still use recursion.
2017-04-30 17:34:29 +00:00
maya
f959afb267
reorganize the code so we test if open fails at the open call.
...
this doesn't actually make a functional difference as ftruncate can
handle it, but it's a bit clearer and appeases static analyzers.
ok riastradh
2017-01-14 18:35:43 +00:00
dholland
f7f12e2d7d
PR 49595 William Ahern: The exit status of "unset NOTSET" should be 0, not 1.
...
(like 48312 but for ksh)
2016-10-11 06:31:07 +00:00
joerg
acfe9a7761
Add explicit char cast to show that the value change is intended.
2016-10-04 15:09:03 +00:00
christos
9c9fb684e0
s/sed/${SED}/
2016-03-17 13:59:02 +00:00
christos
c6f7781d4f
put back the complex sed/awk since the code can't handle unsorted or repeated
...
entries (Rin Okuyama)
2016-03-17 13:54:31 +00:00
christos
1a51ba6b13
Put back awk, other scripts need it.
2016-03-16 23:02:23 +00:00
christos
702bd67153
We don't need all this magic to build the signals lists. Do the work at
...
compile time.
2016-03-16 23:01:33 +00:00
christos
ac40619997
PR/50747: David Binderman: check bounds before dereference.
...
While here add some continues before semicolons.
2016-02-03 05:26:16 +00:00
christos
b357ba3056
We don't have RLIMIT_SWAP
2015-12-30 22:26:26 +00:00
christos
f49d3ada41
CID 1225088: check return of getrlimit
2015-05-09 13:26:06 +00:00
christos
4b6d6c838f
CID 1225077: check getrlimit return
2015-05-09 13:22:37 +00:00
jmcneill
fa0ed62f53
document ulimit -r
2015-04-12 17:05:03 +00:00
joerg
14bd6a1392
Make cast warnings for clang non-fatal.
2015-01-29 20:46:31 +00:00
christos
3dd8ce9f5e
Fixed unused warnings.
2013-10-18 19:53:34 +00:00
christos
8af1ed165c
support RLIMIT_NTHR
2012-06-09 02:50:43 +00:00
christos
bc5ad24935
PR/6764: Charles M. Hannum: `trap 0' does not work in ksh subshells. When
...
subshells exit normally, use unwind(LEXIT) instead of unwind(LLEAVE) so that
traps get executed.
2012-03-25 17:23:48 +00:00
reed
7c8c54b731
Fix typo.
...
From Snader_LB on IRC.
2011-10-18 12:36:31 +00:00
joerg
a2567f3beb
Don't use non-literal format strings.
2011-10-16 17:12:11 +00:00
reed
f67ef85d6d
Typo in comment fix from Snader_LB via IRC.
2011-10-16 00:32:25 +00:00
plunky
9f61b80465
NULL does not need a cast
2011-08-31 16:24:54 +00:00
dholland
0a54ac30f5
Requires stdint.h.
2011-08-21 21:24:34 +00:00
christos
0fa1334129
kill gcc-4.5 hack.
2011-08-14 10:40:25 +00:00
mrg
dec137ed28
add a missing part from rev 1.10 and s/newline/newlinex/. found by GCC 4.5.3.
2011-06-22 03:56:17 +00:00
mrg
c111245a78
apply some -Wno-error and/or -fno-strict-aliasing.
...
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
joerg
a216da57a6
Default to -Wno-sign-compare -Wno-pointer-sign for clang.
...
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
hauke
2a758472b6
The previous commit removed a { } block, and unintendedly introduced a
...
C99ism (inlined variable declaration), which hurts when pdksh is used
for bootstrapping pkgsrc. Move the two declarations to the beginning
of the block.
2011-01-23 17:15:15 +00:00
hauke
69c247a5bf
The Solaris 7 "/usr/{,xpg4/}bin/sort"s expect whitespace between the "-k"
...
option and its argument.
2011-01-23 17:11:55 +00:00
sjg
6d83722e40
PR: 39604
...
Reviewed by:
add_glob:
Do not stop scanning if we see '$' as it does more harm than good.
For $HOME/tm we should return $HOME/tm*
2010-06-05 03:02:37 +00:00
plunky
73d0ac941f
- int putbuf_func ARGS((const char *s, size_t len));
...
+ int (*putbuf_func) ARGS((const char *, size_t));
for pcc
- did not recognise pointer to function
- argument names shadowed other arguments
2010-04-02 20:19:40 +00:00
seanb
b0a8c7deed
Back out fix for PR 22846 as it has issues. See PR 22846 for details.
2009-11-24 16:00:42 +00:00
dsl
b392d5450b
Avoid generating a corrupt history file if multiple ksh exit together.
...
Fixes PR/28912
2009-10-31 21:54:01 +00:00
reed
7500459303
Show that -l is option for bind builtin.
...
(The -l is described later.)
2009-10-24 11:08:46 +00:00
seanb
282081cf28
Wrong buffer len being passed to strlcpy(). Innocuous
...
here but...
2009-10-22 15:53:19 +00:00
dsl
6b42da309a
Support 0xnn for hexadecimal constants - as well as 16#nn.
...
While here, make '-' only valid once, and at the start of the number.
Fixes PR/40512
2009-08-02 21:24:18 +00:00
lukem
7ca13b8bcd
Fix most of the -Wsign-compare issues.
2009-04-25 05:11:37 +00:00
lukem
46b57afcf7
Default to WARNS=4 (except for rcp & ksh)
2009-02-14 08:31:13 +00:00
apb
3f6e3bc032
In foo="`echo \"hi\"`", the backslashes should be removed by the outer
...
double quotes, not seen by the inner backquotes. Previously, ksh(1)
handled this correctly in non-posix mode but incorrectly in posix mode.
The previous comments in src/bin/ksh/lex.c quote parts of some version
of the POSIX specification. The version of POSIX being quoted is not
identified, but the wording is very similar to that in SUSv3
<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html >.
It seems clear that the words "having escape characters removed"
mean, in that context, that the backslash before the double quote in
"...`...\"...`..." is removed as part of the handling of the outer
double quotes, so that the backslash is not present when the inner
backquotes are handled. The new code in this commit follows this
interpretation. The previous code followed a different interpretation
which is now believed to be incorrect.
Discussed in tech-userlevel. Closes PR 26493.
2008-10-27 19:52:28 +00:00
apb
89799ead73
Pass SED=${TOOL_SED:Q} in the environment to scripts run during the build.
2008-10-25 22:23:55 +00:00
apb
125b7c8cbb
In shell scripts run during the build, add a SED variable, defaulting
...
to "sed". SED=${TOOL_SED:Q} should be passed in the environment to
override this.
2008-10-25 22:18:15 +00:00
apb
20d1e9a13e
Pass AWK in environment to shell scripts run during the build.
2008-10-20 07:11:55 +00:00
apb
cd5c0f944d
In shell scripts invoked during a build, and in crunchgen, use ${AWK}
...
instead of plain "awk". The Makefiles that invoke these scripts
or programs will pass AWK=${HOST_AWK:Q}.
2008-10-19 22:10:04 +00:00
sjg
2a76c8a41c
Avoid sign extention problems leading to:
...
$ ulimit -dH
3145728
$ ulimit -d 3145728
ksh: ulimit: bad limit: Invalid argument
$
2008-09-14 05:00:23 +00:00
lukem
bcf893f432
use __RCSID()
2007-12-12 22:55:42 +00:00
mjf
16b3db7a9b
Fix some grammatical errors in man pages.
...
Patch supplied by Joerg Niendorf in PR misc/36707, thanks.
2007-07-30 18:01:41 +00:00
christos
57bbaf572b
PR/36546: Aleksey Cheusov: problems with 8-bit input in /bin/ksh, needs to
...
call setlocale()
2007-06-24 18:00:49 +00:00
cbiere
622f4b424e
Applied patch by Arto Huusko from PR bin/24753 to append a slash to "."
...
and ".." instead of skipping over them fixing completion for patterns
like ".*" and "..*".
2007-01-28 22:30:12 +00:00
cbiere
26a246a095
* Escape '?', '[', ']' like other meta characters.
...
* Partial fix for completion when '[' is in the way.
* Addresses PR bin/22846.
2007-01-28 20:20:25 +00:00
cbiere
ecc8aad21d
Committed patch from PR bin/34755: Append a slash when expanding ~user
...
to user's home directory.
2007-01-28 20:01:02 +00:00
christos
ccc92a707d
fix the sort order too.
2006-11-14 20:27:10 +00:00
christos
ce725e8fad
Fix signal list generation, from Jukka Salmi
2006-11-14 19:10:55 +00:00
cbiere
1d3c56521c
Applied patch from PR bin/34790 so that ~/.kshrc is mentioned.
2006-10-24 18:30:25 +00:00
christos
d2bca38017
use c99 initializers
2006-10-16 00:07:32 +00:00
christos
67a8ed80ce
PR/33834: Bucky Katz: Crossbuild on FC5:sort doesn't handle '+' field
...
specifications
2006-06-27 12:27:27 +00:00
christos
62faec262e
Don't free random memory; thanks gcc-4.
2006-05-14 01:09:03 +00:00
christos
c5d3cabfdd
Coverity CID 3365: Fix inverted logic!
2006-05-13 21:58:51 +00:00
christos
f88f667da4
Coverity CID 3367, 3368: Avoid NULL deref.
2006-05-13 21:54:13 +00:00
christos
4f633ea02a
Coverity CID 3368: Fix memory leak.
2006-05-13 21:48:00 +00:00
christos
16464dcda5
Coverity CID 3369: Fix memory leak.
2006-05-13 21:42:45 +00:00
mrg
084c052803
quell GCC 4.1 uninitialised variable warnings.
...
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
christos
ec2162bd79
Avoid double free.
2006-04-27 13:25:21 +00:00
christos
6ce96df0b7
Coverity CID 2993: Fix memory leak.
2006-04-24 20:00:31 +00:00
christos
8a8f572953
Coverity CID 2994: Don't leak memory in the perm case.
2006-04-24 19:58:20 +00:00
christos
f2ec0dc9a2
Coverity CID 2995: Fix memory leak.
2006-04-24 19:53:08 +00:00
christos
868accdb18
Coverity CID 1836: Free Source after return from shell.
2006-04-01 23:39:58 +00:00