summaryrefslogtreecommitdiff
path: root/glob
diff options
context:
space:
mode:
Diffstat (limited to 'glob')
-rw-r--r--glob/ChangeLog6
-rw-r--r--glob/glob.h12
2 files changed, 14 insertions, 4 deletions
diff --git a/glob/ChangeLog b/glob/ChangeLog
index 1ebf879..75c6888 100644
--- a/glob/ChangeLog
+++ b/glob/ChangeLog
@@ -1,3 +1,9 @@
+2003-01-30 Paul D. Smith <psmith@gnu.org>
+
+ * glob.h: Patch for FreeBSD by Mike Barcroft <mike@freebsd.org>
+ Reported by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>. On
+ FreeBSD, declare __size_t to simply size_t.
+
2002-04-22 Paul D. Smith <psmith@gnu.org>
* Makefile.am: Use automake 1.6.
diff --git a/glob/glob.h b/glob/glob.h
index 9f735fe..ca523f7 100644
--- a/glob/glob.h
+++ b/glob/glob.h
@@ -47,9 +47,12 @@ extern "C" {
/* We need `size_t' for the following definitions. */
#ifndef __size_t
-# if defined __GNUC__ && __GNUC__ >= 2
-typedef __SIZE_TYPE__ __size_t;
+# if defined __FreeBSD__
+# define __size_t size_t
# else
+# if defined __GNUC__ && __GNUC__ >= 2
+typedef __SIZE_TYPE__ __size_t;
+# else
/* This is a guess. */
/*hb
* Conflicts with DECCs aready defined type __size_t.
@@ -57,9 +60,10 @@ typedef __SIZE_TYPE__ __size_t;
* Anyway if DECC is used and __SIZE_T is defined then __size_t is
* already defined (and I hope it's exactly the one we need here).
*/
-#if !(defined __DECC && defined __SIZE_T)
+# if !(defined __DECC && defined __SIZE_T)
typedef unsigned long int __size_t;
-#endif
+# endif
+# endif
# endif
#else
/* The GNU CC stddef.h version defines __size_t as empty. We need a real