Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

60 UNIX Standardization and Implementations Chapter 2


2.10 Summary


Much has happened with the standardization of the UNIX programming environment
over the past two and a half decades.We’ve described the dominant standards — ISO C,
POSIX, and the Single UNIX Specification—and their effect on the four platforms that
we’ll examine in this text—FreeBSD, Linux, Mac OS X, and Solaris. These standards try
to define certain parameters that can change with each implementation, but we’ve seen
that these limits areimperfect. We’ll encounter many of these limits and magic
constants as we proceed through the text.
The bibliography specifies how to obtain copies of the standards discussed in this
chapter.

Exercises


2.1 We mentioned in Section 2.8 that some of the primitive system data types aredefined in
morethan one header.For example, in FreeBSD 8.0,size_tis defined in 29 different
headers. Because all 29 headers could be included in a program and because ISO C does
not allow multipletypedefsfor the same name, how must the headers be written?
2.2 Examine your system’s headers and list the actual data types used to implement the
primitive system data types.
2.3 Update the program in Figure2.17 to avoid the needless processing that occurs when
sysconfreturnsLONG_MAXas the limit forOPEN_MAX.
Free download pdf