Commit Graph

164 Commits

Author SHA1 Message Date
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
christos
c28f114217 Coverity CID 1844: Add annotations for aresize. 2006-04-01 23:36:28 +00:00
christos
0ad4767103 Coverity CID 1829: Fix memory leak. 2006-04-01 23:34:43 +00:00