summary refs log tree commit diff
path: root/src/mkbuiltins (follow)
Commit message (Collapse)AuthorAge
* [BUILTIN] Use TMPDIR in mkbuiltinsmaximilian attems2010-04-02
| | | | | | | | while merging upstream dash in klibc, noticed that klibc dash had grown that useful feature. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [BUILTIN] Add another missing LC_COLLATE to mkbuiltinsMatthew Burgess2009-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Sat, Aug 15, 2009 at 06:07:16PM +0000, Matthew Burgess wrote: > > My system has Coreutils-7.4 compiled with the i18n patch from > http://cvs.fedoraproject.org/viewvc/devel/coreutils/coreutils-i18n.patch. > > Using this to compile dash, when in an en_GB.UTF-8 locale, I get the following error: > > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -include ../config.h -DBSD=1 -DSHELL -DIFS_BROKEN -Wall -g -O2 -MT eval.o -MD -MP -MF ".deps/eval.Tpo" -c -o eval.o eval.c; \ > then mv -f ".deps/eval.Tpo" ".deps/eval.Po"; else rm -f ".deps/eval.Tpo"; exit 1; fi > eval.c: In function ‘evalcommand’: > eval.c:810: error: ‘EXECCMD’ undeclared (first use in this function) > eval.c:810: error: (Each undeclared identifier is reported only once > eval.c:810: error: for each function it appears in.) > eval.c:812: error: ‘COMMANDCMD’ undeclared (first use in this function) > make[3]: *** [eval.o] Error 1 > > This is because the src/mkbuiltins script ends up generating an incomplete > src/builtins.h file. This, in turn, is caused by 'sort -u -k 3,3' not > working correctly. > > The attached patch fixes/works around things by setting LC_CTYPE=C, thus > overriding the build environment (in a similar manner to the earlier call to > 'sort' in that same script). I've changed it to use LC_COLLATE. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [EVAL] Pass EV_TESTED into evalcmdHerbert Xu2009-08-11
| | | | | | | | | | | | | | | | | | This patch fixes the case where the eval command is used with set -e and as part of a construct that should not cause the shell to abort, e.g., as part of the condition of an if statement. This is achieved by propagating the EV_TESTED flag into the evalstring function through evalcmd. As this alters the prototype of evalcmd it is now invoked explicitly by evalbltin. The built-in infrastructure has been changed to accomodate this special case. In order to ensure that the EXIT trap is properly executed this patch clears evalskip in exitshell. This wasn't needed before because of the broken way evalstring worked where it always clears evalskip when called by minusc. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [BUILD] Fixed build on NetBSDAleksey Cheusov2009-01-13
| | | | | | | | | | Hi, I propose to apply the following patch for dash. The problem is alloca.h is absent on many platforms including NetBSD I'm running. Also, NetBSD's version of mktemp doesn't work without temporary filename pattern. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [BUILTIN] Fix mkbuiltin sort orderHerbert Xu2007-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Fri, Feb 16, 2007 at 04:24:55PM -0800, Dan Nicholson wrote: > I was having a problem building dash where `:' wasn't being recognized > as a builtin command. I won't bore you with the details of the > debugging, but it came down to the fact that the generated struct in > builtins.c wasn't being sorted correctly. The ":" name was coming > before the "." name and then was never able to be found by bsearch(). > > The issue turned out to be that I was building with a UTF-8 charset, > causing the `sort' to come out differently from the mkbuiltins script. > When I finally set LANG=C, it came out correct. Here's an example of > the difference. > > $ LANG=C sort << "EOF" > : > . > EOF > . > : > $ LANG=en_US.ISO-8859-1 sort << "EOF" > : > . > EOF > : > . > > My system has glibc-2.3.6, but I also tested it on an RHEL3 server at > work. My solution was just to add LC_ALL=C to the mkbuiltins script. > Maybe it's overkill to use LC_ALL. Patch against HEAD attached. I've changed this patch so that we just set LC_COLLATE for the sort command.
* [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.
* [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.
* 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.
* Initial import.Herbert Xu2005-09-26