| Summary: | Subject: regex.h should include sys/types.h | ||
|---|---|---|---|
| Product: | Base System | Reporter: | dgilbert <dgilbert> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.2-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
dgilbert
1999-08-08 16:50:00 UTC
<<On Sun, 8 Aug 1999 11:41:43 -0400 (EDT), David Gilbert <dgilbert@velocet.ca> said: > programs that include regex.h without including sys/types.h fail > to compile <sys/types.h> is a documented prerequisite of <regex.h>, sanctioned by P1003.2. -GAWollman In <owner-freebsd-bugsATFreeBSD.ORG--199908081541.LAA61376@strike.velocet.ca>, David Gilbert wrote: > > >Number: 13029 > >Category: bin > >Synopsis: Subject: regex.h should include sys/types.h As stated in the man page, you have to include sys/types by yourself before regex.h A reason why this such things are done is that sys/types narrows down the choice of identifiers you may use in your program. For each header file, there's a list of reserved identifies. If you include sys/types.h by yourself, you will know that you have to avoid them. If some other header file with a different reserved identifier list silently includes a file with other reservations, the user don't recognize. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer <cracauer@bik-gmbh.de> http://www.bik-gmbh.de/~cracauer/ "Where do you want to do today?" Hard to tell running your calendar program on a junk operating system, eh? State Changed From-To: open->closed Good reason why including types.h is a bad thing is given. |