summaryrefslogtreecommitdiff
path: root/glob/glob.h
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2003-01-30 05:22:52 +0000
committerPaul Smith <psmith@gnu.org>2003-01-30 05:22:52 +0000
commitd33ff301454fa1db9919674dbc2a37309bbd529f (patch)
treeb843b352a445c03c8d1f4c2265334ea0e83de046 /glob/glob.h
parentd15a484098a52e0784933ba03a98445fdc86ea3f (diff)
downloadgunmake-d33ff301454fa1db9919674dbc2a37309bbd529f.tar.gz
Portability fix for glob.h building in FreeBSD ports system.
Implement a fix for bug # 2169: too many OSs, even major OSs like Solaris, don't properly implement SA_RESTART: important system calls like stat() can still fail when SA_RESTART is set. So, forget the BROKEN_RESTART config check and get rid of atomic_stat() and atomic_readdir(), and implement permanent wrappers for EINTR checking on various system calls (stat(), fstat(), opendir(), and readdir() so far).
Diffstat (limited to 'glob/glob.h')
-rw-r--r--glob/glob.h12
1 files changed, 8 insertions, 4 deletions
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