diff options
Diffstat (limited to 'openbsd-compat/glob.c')
-rw-r--r-- | openbsd-compat/glob.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index b3dd2b171..74b506403 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: glob.c,v 1.25 2005/08/08 08:05:34 espie Exp $ */ | 1 | /* $OpenBSD: glob.c,v 1.26 2005/11/28 17:50:12 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1989, 1993 | 3 | * Copyright (c) 1989, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -48,7 +48,8 @@ | |||
48 | 48 | ||
49 | #if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \ | 49 | #if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \ |
50 | !defined(GLOB_HAS_GL_MATCHC) || \ | 50 | !defined(GLOB_HAS_GL_MATCHC) || \ |
51 | !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 | 51 | !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 || \ |
52 | defined(BROKEN_GLOB) | ||
52 | 53 | ||
53 | static long | 54 | static long |
54 | get_arg_max(void) | 55 | get_arg_max(void) |
@@ -149,7 +150,7 @@ static int glob0(const Char *, glob_t *); | |||
149 | static int glob1(Char *, Char *, glob_t *, size_t *); | 150 | static int glob1(Char *, Char *, glob_t *, size_t *); |
150 | static int glob2(Char *, Char *, Char *, Char *, Char *, Char *, | 151 | static int glob2(Char *, Char *, Char *, Char *, Char *, Char *, |
151 | glob_t *, size_t *); | 152 | glob_t *, size_t *); |
152 | static int glob3(Char *, Char *, Char *, Char *, Char *, Char *, | 153 | static int glob3(Char *, Char *, Char *, Char *, Char *, |
153 | Char *, Char *, glob_t *, size_t *); | 154 | Char *, Char *, glob_t *, size_t *); |
154 | static int globextend(const Char *, glob_t *, size_t *); | 155 | static int globextend(const Char *, glob_t *, size_t *); |
155 | static const Char * | 156 | static const Char * |
@@ -571,16 +572,16 @@ glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, | |||
571 | } else | 572 | } else |
572 | /* Need expansion, recurse. */ | 573 | /* Need expansion, recurse. */ |
573 | return(glob3(pathbuf, pathbuf_last, pathend, | 574 | return(glob3(pathbuf, pathbuf_last, pathend, |
574 | pathend_last, pattern, pattern_last, | 575 | pathend_last, pattern, p, pattern_last, |
575 | p, pattern_last, pglob, limitp)); | 576 | pglob, limitp)); |
576 | } | 577 | } |
577 | /* NOTREACHED */ | 578 | /* NOTREACHED */ |
578 | } | 579 | } |
579 | 580 | ||
580 | static int | 581 | static int |
581 | glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, | 582 | glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, |
582 | Char *pattern, Char *pattern_last, Char *restpattern, | 583 | Char *pattern, Char *restpattern, Char *restpattern_last, glob_t *pglob, |
583 | Char *restpattern_last, glob_t *pglob, size_t *limitp) | 584 | size_t *limitp) |
584 | { | 585 | { |
585 | struct dirent *dp; | 586 | struct dirent *dp; |
586 | DIR *dirp; | 587 | DIR *dirp; |