summaryrefslogtreecommitdiff
path: root/glob/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'glob/glob.c')
-rw-r--r--glob/glob.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/glob/glob.c b/glob/glob.c
index 954960c..c8f2eab 100644
--- a/glob/glob.c
+++ b/glob/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -24,6 +24,11 @@ Cambridge, MA 02139, USA. */
#include <config.h>
#endif
+/* Enable GNU extensions in glob.h. */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -290,7 +295,7 @@ glob (pattern, flags, errfunc, pglob)
memcpy (buf, pattern, begin - pattern);
memcpy (buf + (begin - pattern), p, comma - p);
memcpy (buf + (begin - pattern) + (comma - p), end, restlen);
- result = glob (buf, (flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC) |
+ result = glob (buf, ((flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC)) |
GLOB_APPEND), errfunc, pglob);
if (result && result != GLOB_NOMATCH)
return result;
@@ -353,7 +358,7 @@ glob (pattern, flags, errfunc, pglob)
dirname = getenv ("HOME");
if (dirname == NULL || dirname[0] == '\0')
{
- extern char *getlogin ();
+ extern char *getlogin __P ((void));
char *name = getlogin ();
if (name != NULL)
{