[Patches] Patch to Modules/pcre.h
Greg Stein
gstein@lyra.org
Fri, 2 Jun 2000 15:46:56 -0700 (PDT)
On Fri, 2 Jun 2000, Jack Jansen wrote:
> Don't include sys/types.h or sys/stat.h if the platform doesn't have it (eg.
> Carbon, the MacOS9/MacOSX
> combined development layer).
Hmm...
The standard way to do this is to use autoconf to create a
HAVE_SYS_TYPES_H define and use that:
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
In other words, this logic is reversed.
Specifically, around line 358 of configure.in, "sys/types.h" should be
added. This will result in the HAVE_SYS_TYPES_H define (see config.h).
[ this also means that Python's config.h should be included before testing
for HAVE_SYS_TYPES_H... :-) ]
This recommendation applies to the other patches that are monkeying with
conditional header usage.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/