about summary refs log tree commit diff
path: root/posix/fnmatch.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-09-12 19:34:34 +0000
committerUlrich Drepper <drepper@redhat.com>1999-09-12 19:34:34 +0000
commit7814856974388a856a575fa45f88d502c8a1ab29 (patch)
tree7be210e0a4510b891a677995cb0bbf38414ae15e /posix/fnmatch.c
parenta0bf6ac732c7cbe42939782d38a9bb1d7403c86a (diff)
downloadglibc-7814856974388a856a575fa45f88d502c8a1ab29.tar.gz
glibc-7814856974388a856a575fa45f88d502c8a1ab29.tar.xz
glibc-7814856974388a856a575fa45f88d502c8a1ab29.zip
Update.
	* posix/fnmatch.c (internal_fnmatch): Make it compilable outside
	glibc by defining internal_function if it isn't already.
Diffstat (limited to 'posix/fnmatch.c')
-rw-r--r--posix/fnmatch.c48
1 files changed, 26 insertions, 22 deletions
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index b1e1b94afa..1f4ead5f98 100644
--- a/posix/fnmatch.c
+++ b/posix/fnmatch.c
@@ -64,27 +64,27 @@
 #  define ISASCII(c) isascii(c)
 # endif
 
-#ifdef isblank
-# define ISBLANK(c) (ISASCII (c) && isblank (c))
-#else
-# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-#endif
-#ifdef isgraph
-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
-#else
-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
-#endif
+# ifdef isblank
+#  define ISBLANK(c) (ISASCII (c) && isblank (c))
+# else
+#  define ISBLANK(c) ((c) == ' ' || (c) == '\t')
+# endif
+# ifdef isgraph
+#  define ISGRAPH(c) (ISASCII (c) && isgraph (c))
+# else
+#  define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
+# endif
 
-#define ISPRINT(c) (ISASCII (c) && isprint (c))
-#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
-#define ISALNUM(c) (ISASCII (c) && isalnum (c))
-#define ISALPHA(c) (ISASCII (c) && isalpha (c))
-#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
-#define ISLOWER(c) (ISASCII (c) && islower (c))
-#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
-#define ISSPACE(c) (ISASCII (c) && isspace (c))
-#define ISUPPER(c) (ISASCII (c) && isupper (c))
-#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
+# define ISPRINT(c) (ISASCII (c) && isprint (c))
+# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
+# define ISALNUM(c) (ISASCII (c) && isalnum (c))
+# define ISALPHA(c) (ISASCII (c) && isalpha (c))
+# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
+# define ISLOWER(c) (ISASCII (c) && islower (c))
+# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
+# define ISSPACE(c) (ISASCII (c) && isspace (c))
+# define ISUPPER(c) (ISASCII (c) && isupper (c))
+# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
 
 # define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
 
@@ -142,15 +142,19 @@ __strchrnul (s, c)
 }
 # endif
 
+# ifndef internal_function
+/* Inside GNU libc we mark some function in a special way.  In other
+   environments simply ignore the marking.  */
+#  define internal_function
+# endif
+
 /* Match STRING against the filename pattern PATTERN, returning zero if
    it matches, nonzero if not.  */
 static int internal_fnmatch __P ((const char *pattern, const char *string,
 				  int no_leading_period, int flags))
      internal_function;
 static int
-#ifdef _LIBC
 internal_function
-#endif
 internal_fnmatch (pattern, string, no_leading_period, flags)
      const char *pattern;
      const char *string;