Exercises

team bbl


2.1

We mentioned in Section 2.8 that some of the primitive system data types are defined in more than one header. For example, on FreeBSD 5.2.1, size_t is defined in 26 different headers. Because all 26 headers could be included in a program and because ISO C does not allow multiple typedefs for 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 Figure 2.16 to avoid the needless processing that occurs when sysconf returns LONG_MAX as the limit for OPEN_MAX.

    team bbl



    Advanced Programming in the UNIX Environment
    Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
    ISBN: 0321525949
    EAN: 2147483647
    Year: 2005
    Pages: 370

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net