Age | Commit message (Collapse) | Author |
|
mkstemp uses mktemp, which is only declared
when including files with _BSD_SOURCE, so
define _BSD_SOURCE before including the headers
|
|
|
|
The new rc's exit status will be '' for a successfull
pipeline execution instead of '|'.
This is a bit too tightly coupled, so just use if()
statement instead, handling this in a portable way.
|
|
Use O_EXCL and make the file descriptor writeable. This is more
usefull and it conforms to Single Unix and other specs.
|
|
Using strlen in strndup will walk past the first
n bytes up to the terminator, which may not be
present. This is not what we want.
While we're here, do some cleanups.
|
|
strndup is part of POSIX.1, so APE should provide it.
This patch adds it, so need to patch it out of fewer
programs going forward.
|
|
Our ctype.h mistakenly ommitted isblank. Add it in.
While we're here, the make the 'isfoo()' functions
are broken: they're offsetting into the array, and
don't work with negative character values.
Sync the function bodies with the macros, and make
them produce correct results.
|
|
We're missing type flags for:
hh: char
ll: vlong
z: size_t
t: ptrdiff_t
j: intmax_t
The lack of '%lld' was causing us to fail when parsing
timezone files. This brings us in line with the specifiers
in the C99 standard, section 7.19.6.2p11
|
|
|
|
q
|
|
For ape, we never enabled warnings in cflags.
Turning it on brings up a lot of warnings. Most are noise,
but a few caught unused variables and trunctaions of pointers.
to smaller integers (int, long).
A few warnings remain.
|
|
|
|
|
|
|
|
including <string.h> should be enougth to make strdup()
available.
|
|
|
|
|
|
writing /env in putenv() doesnt work. exec will create
new enviroment anyway. we have to modify environ array!
|
|
|
|
|
|
|
|
|