Commit Graph

5 Commits

Author SHA1 Message Date
Stephen Heumann 432950e315 In glob, factor out "stat" call and structure to a separate function. This reduces stack usage in the recursive glob function. 2014-11-20 21:08:21 -06:00
Stephen Heumann 9320c1e704 Set things up so hush can be build with debug code turned on.
This involved breaking things up into more segments in debug mode, since the code is larger. I also had to remove some unused extern definitions, which were causing link errors when debug code was enabled.

To enable debug code, pass "DEBUG=1" to make or build.gs.
2014-11-06 11:42:17 -06:00
Stephen Heumann 42c6e9e095 Replace alloca usages with malloc in shell/glob.c. 2014-11-04 11:46:36 -06:00
Stephen Heumann 036b92595c Address some link errors with various small changes.
The most significant change is to at use malloc instead of alloca in the code to evaluate shell arithmetic expressions in shell/math.c.
2014-11-03 23:29:34 -06:00
Stephen Heumann 2b0d727f39 Include glob implementation from dietlibc.
GNO doesn't actually implement glob, although it has a header for it. The GNO header is from an old BSD version and is missing some constants we need, so don't use it.
2014-11-01 14:27:52 -05:00