dcarver@hfsi.UUCP (Daryl Carver Pax River Measure) (05/17/91)
Andy recently posted a comment about the POSIX requirement to include <sys/types.h> before <pwd.h>. I am interested in hearing a few more comments on this, although it may be better to move the discussion to comp.std.unix. I guess my question breaks down as follows: Quite a few of the ANSI C standard header files and the POSIX standard header files require multiple definitions of macros and types. The rational seems to be to redifine them in each header rather than having each automagically include one header that has them all (say <stddef.h>). The reasoning seems to be to cut down on namespace pollution. From a developer's point of few this seems a bit silly. The chance of missing one of the definitions bothers me. In addition the purpose of #include is to centralize such defintions. The POSIX and ANSI C standards don't have that many types and macros defined. It would seem to make more sense to reserve these types and definitions and have the developer's create different ones. If I am going over some source at 2 in the morning to make a 5:00 production run I don't want someone playing fast and loose with a standard definition. In addition I don't want to explain to some junior programmer why some section of code uses a POSIX or ANSI C reuses a standard definition in a non standard way. The POSIX standard is pretty minimal already. The C standard is not much more. Small is beautiful, but lets not go nuts... Opinions are welcome. Flames to /dev/null ------------------------------------------------------------------------ Darrel Carver Technical Specialist HFS Inc. dcarver@hfsi.uucp