summary refs log tree commit diff
path: root/src (follow)
Commit message (Collapse)AuthorAge
...
* [MEMALLOC] Remove unnecessary truncation in _STPUTCHerbert Xu2005-11-13
| | | | | Using char in the function argument causes unnecessary truncation to occur. This patch changes it to an int.
* [HELPER] Use mktemp if tempfile is not availableHerbert Xu2005-11-04
| | | | tempfile(1) is Debian-specific so let's use mktemp(1) as a fallback.
* [JOBS] Fixed support for disabling job controlHerbert Xu2005-10-30
| | | | | Since nobody has compiled with JOBS turned off for quite a while, it has bit-rotted. This patch makes it build again.
* [SYSTEM] Fixed fallback stpcpy implementationHerbert Xu2005-10-29
| | | | | | The implementation has an off-by-one bug. This results in random memory corruption. In one particular case, it caused certain bits of a function body to go missing.
* [SYSTEM] Added out-of-line ctypes functions for klibcHerbert Xu2005-10-29
| | | | | Unfortunately klibc doesn't provide out-of-line versions of ctypes functions such as isalpha. This is a nasty hack to create them.
* [SYSTEM] Include system.h for stpcpy in nodes.cHerbert Xu2005-10-29
| | | | | | Since we have a fallback implementation for stpcpy we can now use it unconditionally in nodes.c.pat. This also fixes a link error with klibc.
* [SYSTEM] Added dummy sysconf implementationHerbert Xu2005-10-29
| | | | Add a dummy sysconf implementation that always fails for klibc.
* [BUILTIN] Removed standalone/csh support from testHerbert Xu2005-10-29
| | | | | Let's remove the support for standalone support from test for the same reason as printf.
* [SYSTEM] Added dummy strtod implementationHerbert Xu2005-10-29
| | | | | klibc doesn't have strtod or atof. So add an implementation that always fails by setting the end pointer to the input string.
* [BUILTIN] Removed standalone/csh support from printfHerbert Xu2005-10-29
| | | | | The support for standalone/csh printf only serves to complicate maintainence.
* [SYSTEM] Added default definition for SSIZE_MAXHerbert Xu2005-10-29
| | | | klibc doesn't define the macro SSIZE_MAX.
* [BUILTIN] Disable histcmd completely when SMALL is definedHerbert Xu2005-10-29
| | | | | Now that mkbuiltins correctly disabled histcmd we don't need the dummy histcmd implementation anymore.
* [BUILTIN] Disable ulimit if there is no getrlimitHerbert Xu2005-10-29
| | | | | | | | | | For systems without getrlimit (e.g., klibc) we will disable ulimit. In order to achieve this, builtins.def is now produced by cpp which allows us to use macros such as HAVE_GETRLIMIT in it. Thie also means that we can get rid of the cflags parsing code in mkbuiltins.
* [SIGNAL] Added default implementation of killpgHerbert Xu2005-10-29
| | | | | klibc doesn't have killpg. Since we only call it for valid values of pid, we can call kill instead.
* [SIGNAL] Added default implementation of strsignalHerbert Xu2005-10-29
| | | | klibc doesn't have strsignal but it does have sys_siglist.
* Added missing system.h inclusion for mempcpyHerbert Xu2005-10-29
| | | | All users of mempcpy must include system.h.
* Fixed gcc 4.0 compilation problemsHerbert Xu2005-10-29
| | | | | | | | Removed obsolete extern declaration on funcnest. This conflits with the correct static definition. Changed memtodest prototype to use char * instead of unsigned char *. Perform the unsigned char cast inside memtodest instead.
* [EXPAND] Added getpwhome as a wrapper for getpwnamHerbert Xu2005-10-29
| | | | | klibc doesn't have and doesn't need getpwnam. This change creates getpwhome which always returns NULL if getpwnam doesn't exist.
* [SYSTEM] Added default implementation of bsearchHerbert Xu2005-10-29
| | | | Added impelmentation of bsearch since klibc doesn't have it yet.
* [BUILTIN] Stop using sysexits.h in commandcmdHerbert Xu2005-10-29
| | | | | | | | | | | This gets rid of the only reference of sysexits.h in dash which is from commandcmd. This is needed for klibc support since it doesn't have sysexits.h. The only uses of sysexits.h in commandcmd is superfluous anyway. In fact, it is overly sensitive about usages such as 'command -vV ls'. By making its behaviour close to that of bash/ksh, we end up saving a bit of space too.
* [SIGNAL] Removed use of __P from error.hHerbert Xu2005-10-29
| | | | | This is the only instance of __P in the entire source so it makes sense to get rid of it rather than making it work with klibc.
* Copyright/licence updates and remove all traces of sys/cdefs.hHerbert Xu2005-10-29
| | | | | | | | | | | This change updates the BSD licence to the three-clause version since NetBSD has already done so. This makes dash GPL-compatible. It also adds Christos Zoulas (NetBSD ash maintainer) to the COPYING file. I've added "copyright by Herbert Xu" to most files. Finally all CVS IDs and inclusion of sys/cdefs.h have been removed. The latter is needed for support of klibc.
* [INPUT] Size optimisations in preadbuffer()Herbert Xu2005-10-26
| | | | | | | Added unlikely markers. Reduced switch coverage. Removed p since we now erase NULs as soon as we see them. Use more to store parselleft.
* [INPUT] Fix NUL skipping in preadbufferHerbert Xu2005-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On Sun, Sep 25, 2005 at 07:50:54PM +0000, Gerrit Pape wrote: > On Sat, Sep 03, 2005 at 02:56:00PM +0200, Martin Dickopp wrote: > > When analysing the bug I came to the following conclusion: The loop > > beginning at input.c:302 overwrites a single input line with itself, > > skipping NUL characters. Therefore, after the loop the line buffer > > has less characters than originally read if and only if the input line > > contains NUL characters. > > yes. Thanks a lot for the details and patch. > > > The pointer that is used to read from the buffer, 'parsenextc' (cf. > > input.h:66), is also used as the beginning of the next line in > > input.c:296. This fails if the buffer contains less characters > > than originally read into it due to NUL characters. > > > > The proposed patch (attached) keeps track of the number of skipped > > characters and advances 'parsenextc' accordingly before processing > > the next input line. > > Hi Herbert, please see > http://bugs.debian.org/317516 Instead of moving the characters in the loop, we will do memmove every time we see a NUL character. This hurts if there are a lot of NUL characters, but should be a win in normal situations.
* Added eflag fixes for trap and minusc.herbert2005-09-26
| | | | | | Let evaltree handle traps from cmdloop. Reset evalskip after minusc is executed. Stop executing traps once SKIPEVAL is seen.
* Removed unnecessary inclusion of eval.h from parser.c.herbert2005-09-26
|
* Let evaltree handle traps from cmdloop.herbert2005-09-26
|
* Handle SKIPEVAL in read_profile by exiting.herbert2005-09-26
|
* Removed unnecessary inclusion of main.h from eval.c.herbert2005-09-26
|
* Generalise setinputfile for use in read_profile/readcmdfile.herbert2005-09-26
|
* Removed some unnecessary inclusions of input.h.herbert2005-09-26
|
* Turn evalskip into a bit field.herbert2005-09-26
| | | | This allows SKIPEVAL and SKIPFUNC to coexist which is needed for eval return 1.
* Eliminate first null termination in setvar.herbert2005-09-26
|
* Add trailing equal sign in setvar for variables set to null.pape2005-09-26
|
* Get rid of duplicate -g -O2 in CFLAGS.herbert2005-09-26
|
* Cleaned up src/Makefile.am.herbert2005-09-26
|
* Fixed support for cross-compilation.gilles.chanteperdrix2005-09-26
|
* Do not clobber exit status in dotcmd.herbert2005-09-26
|
* Removed redundant setstackmark from dotcmd.herbert2005-09-26
|
* Removed qflag.herbert2005-09-26
|
* Invert return value of test_eaccess and rename it to test_st_mode.herbert2005-09-26
|
* Eliminate duplicate stat in test_eaccess.herbert2005-09-26
|
* Optimised FILGZ test.herbert2005-09-26
|
* Enclose abort insode ifdef DEBUG.herbert2005-09-26
|
* Renamed error to sh_error.herbert2005-09-26
|
* Normalise input in likely/unlikely macros.herbert2005-09-26
|
* Removed expcmd built-in.herbert2005-09-26
|
* Only set skipcount for break and continue.herbert2005-09-26
|
* Update funcnest atomically.herbert2005-09-26
|
* Replaced EXEVAL with SKIPEVAL.herbert2005-09-26
|