This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: glob.h lack of #includes
- To: Roland McGrath <roland@frob.com>
- Subject: Re: glob.h lack of #includes
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 11 Aug 1998 17:49:10 -0700
- Cc: GNU libc hacker <libc-hacker@gnu.org>
- References: <199808120014.UAA27570@baalperazim.frob.com>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Roland McGrath <roland@frob.com> writes:
> glob.h does not do the necessary #include magic to make sure that size_t is
> defined before it uses it. This needs to be fixed (so `#include <glob.h>' at
> the beginning of a source file works), but I don't know that interacts with
> the other GNU packages that use the file.
This is a problem with the standard. POSIX.2 is written that it does
not allow glob.h (and regex.h) to define size_t. It is always
required to include sys/types.h (or another header defining size_t)
before including any of the POSIX.2 headers.
We could change this of course but it only will make writing portable
problems harder.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------