about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/glob.c6
-rw-r--r--posix/glob.h8
-rw-r--r--posix/unistd.h2
3 files changed, 11 insertions, 5 deletions
diff --git a/posix/glob.c b/posix/glob.c
index 44e548493c..6d9af102f8 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -307,7 +307,7 @@ next_brace_sub (const char *begin)
    If a directory cannot be opened or read and ERRFUNC is not nil,
    it is called with the pathname that caused the error, and the
    `errno' value from the failing call; if it returns non-zero
-   `glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
+   `glob' returns GLOB_ABORTED; if it returns zero, the error is ignored.
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    Otherwise, `glob' returns zero.  */
 int
@@ -647,7 +647,7 @@ glob (pattern, flags, errfunc, pglob)
 	      {
 		globfree (&dirs);
 		globfree (&files);
-		return GLOB_ABEND;
+		return GLOB_ABORTED;
 	      }
 	  }
 #endif /* SHELL.  */
@@ -918,7 +918,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
 	{
 	  if ((errfunc != NULL && (*errfunc) (directory, errno)) ||
 	      (flags & GLOB_ERR))
-	    return GLOB_ABEND;
+	    return GLOB_ABORTED;
 	}
       else
 	while (1)
diff --git a/posix/glob.h b/posix/glob.h
index 49a7b7cfe6..bfe1c9cd01 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -65,9 +65,15 @@ extern "C"
 
 /* Error returns from `glob'.  */
 #define	GLOB_NOSPACE	1	/* Ran out of memory.  */
-#define	GLOB_ABEND	2	/* Read error.  */
+#define	GLOB_ABORTED	2	/* Read error.  */
 #define	GLOB_NOMATCH	3	/* No matches found.  */
 
+#ifdef _GNU_SOURCE
+/* Previous versions of this file defined GLOB_ABEND instead of
+   GLOB_ABORTED.  Provide a compatibility definition here.  */
+# define GLOB_ABEND GLOB_ABORTED
+#endif
+
 /* Structure describing a globbing run.  */
 #if !defined (_AMIGA) && !defined (VMS) /* Buggy compiler.   */
 struct stat;
diff --git a/posix/unistd.h b/posix/unistd.h
index b550d2c6f4..8f1dd35ce1 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -297,7 +297,7 @@ extern int fchdir __P ((int __fd));
    directory couldn't be determined or SIZE was too small.
    If successful, returns BUF.  In GNU, if BUF is NULL,
    an array is allocated with `malloc'; the array is SIZE
-   bytes long, unless SIZE <= 0, in which case it is as
+   bytes long, unless SIZE == 0, in which case it is as
    big as necessary.  */
 extern char *__getcwd __P ((char *__buf, size_t __size));
 extern char *getcwd __P ((char *__buf, size_t __size));