diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-09-13 22:08:39 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-09-13 22:08:39 -0700 |
commit | a50de0ea62a1d47f48d022028e4034f0af5d3088 (patch) | |
tree | 860f807e0a458c8707c116ee2981830def34980b /glob.c | |
parent | 12c6430f8d93a934a66d2f359cf9f624dc5bad24 (diff) | |
download | txr-a50de0ea62a1d47f48d022028e4034f0af5d3088.tar.gz txr-a50de0ea62a1d47f48d022028e4034f0af5d3088.tar.bz2 txr-a50de0ea62a1d47f48d022028e4034f0af5d3088.zip |
glob*: Solaris fixes.
* glob.c (glob_wrap): #ifdef GLOB_BRACE around code that removes
the flag.
(super_glob_find_inner): Initialize pst. The older compiler I'm
using on Solaris 10. isn't smart enough to figure out that it
is not used uninitialized.
* tests/018/glob.t: Skip the ...\/** test on Solaris. It
takes a long time, and produces nil in the end. We don't
care how it behaves, only that we pass through that
pattern to glob without interpreting it as a double star.
Diffstat (limited to 'glob.c')
-rw-r--r-- | glob.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -91,8 +91,10 @@ val glob_wrap(val pattern, val flags, val errfun) c_flags &= ~(GLOB_APPEND | GLOB_XSTAR | GLOB_XNOBRACE); +#ifdef GLOB_BRACE if (globfn == super_glob) c_flags &= ~GLOB_BRACE; +#endif if (stringp(pattern)) { char *pat_u8 = utf8_dup_to(c_str(pattern, self)); @@ -136,7 +138,7 @@ val glob_wrap(val pattern, val flags, val errfun) static const char *super_glob_find_inner(const char *pattern) { - enum state { init, bsl, cls } st = init, pst; + enum state { init, bsl, cls } st = init, pst = init; int ch; for (; (ch = *pattern) != 0; pattern++) { |