diff options
author | Paul Smith <psmith@gnu.org> | 2003-01-30 05:22:52 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2003-01-30 05:22:52 +0000 |
commit | d33ff301454fa1db9919674dbc2a37309bbd529f (patch) | |
tree | b843b352a445c03c8d1f4c2265334ea0e83de046 /glob | |
parent | d15a484098a52e0784933ba03a98445fdc86ea3f (diff) | |
download | gunmake-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')
-rw-r--r-- | glob/ChangeLog | 6 | ||||
-rw-r--r-- | glob/glob.h | 12 |
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 |