Errata

POSIX Programmers Guide

Errata for POSIX Programmers Guide

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page page
The wording involving "shift state" is very obscure. It leaves unclear

exactly how many shift states there are, one per routine, or one global shift
state shared by all. My understanding is that mbxxx() share one shift state
and that xxxtomb() share another. In any case this should be clarified if the
book is updated.

Anonymous   
Printed Page 38
Paragraph titled "109"

The text reads "anything that may have been types before the new line."

The word "types" should be I think "typed".

Easily done d and s are next to each other.

Anonymous   
Printed Page 41
table, last row

% Outputs a %.

should be

%% Outputs a %.

Anonymous   
Printed Page 41
paragraph 1 (below table):

The third line of the paragraph, "The %E, %F, and %G, directives..." refers to
a %F directive that is not mentioned in the preceding table. I believe that
sentence should begin "The %E and %G directives...". Notice also that the
"%G" in the original sentence is mistakenly followed by a comma.

Anonymous   
Printed Page 41
sample output at the bottom of the page:

The example output for the "%-20e" directive doesn't contain a closing quote.
Notice that there should be seven trailing spaces before the close quote.

Anonymous   
Printed Page 42
last bullet item

On some systems, printf() is limited to producing 509
characters on a single call. On other systems, the call
is much larger.

Does the portably safe limit of 509 characters also apply to fprintf(),
sprintf(), vprintf(), vfprintf(), and vsprintf()?


Anonymous   
Printed Page 67
2nd code sample, line 9

if (pid == 0) execl("/bin/mkdir", dirname);

should be

if (pid == 0) execl("/bin/mkdir", "mkdir", dirname, 0);

The return status of execl() should really be checked too.

Anonymous   
Printed Page 72
top of table, second column

The text states that the st_mode member of the stat structure defined in the
header file <sys/stat.h> has type mod_t. The book also lists mod_t in the index
on page 596 with a separate index entry appearing for mode_t.

However, as also pointed out on a UNIX newsgroup there is no such type as
mod_t in the POSIX.1 standard. This agrees with the many compilers I have
used, all of which recognize mode_t but not mod_t.

On pages 72 and 596, as well as anywere else throughout the text, mod_t should
be changed to mode_t. The st_mode field is of type mode_t.

Anonymous   
Printed Page 94
last line of Courier type:

The line reads "fcntl(fildes,F_GETLKW,flock_ptr);". The "F_GETLKW" macro
should be replaced with "F_GETLK".

Anonymous   
Printed Page 94
the line reads "Instead of waiting, F_SETLK returns -1 and sets errno to EAGAIN."

As also correctly mentioned on page 272 POSIX systems may also return EACCES instead, so the line should read like:

Instead of waiting, F_SETLK returns -1 and sets errno to EAGAIN or EACCES.

Markus Winand  May 03, 2009 
Printed Page 114
about one third of the way down the page:

The sentence "The func argument is a pointer to a signal-catching function or
to one of the following macros:" is in error. The func argument cannot be a
pointer to a macro but it can BE a macro. Therefore, remove the second "to"
producing the sentence "The func argument is a pointer to a signal-catching
function or one of the following macros:".

Anonymous   
Printed Page 136
second table on the page:

The very first table entry specifies the Format "%A, %B, %d, %Y" which doesn't
match the Result "Saturday April 13, 1991". The Format entry should be "%A %B
%d %Y".

Anonymous   
Printed Page 176
bottom half

On page 176 C library functions are listed.
On page 174 names reserved by the C language are listed.
In both places assert is absent.
On page 219 is described and a reference is made to
the ANSI standard as if assert was part of Standard C.
This appears to be contradictory.

Anonymous   
Printed Page 189
5th paragraph (middle of page)

The number 600 is used TWICE on this page but the corresponding binary value
is only 300. The *first* one (6th line) was listed as being corrected on your
web page:

<http://www.oreilly.com/catalog/9780937175736/errata/posix.1100>

However there is still one more occurrence of this in the middle of the page
under the union foo.

Anonymous   
Printed Page 209...
in the section, "Library Functions," "truncate() and ftruncate() are

not listed.

Anonymous   
Printed Page 289
fprintf returns an "int" not an "inf".

Anonymous   
Printed Page 289-290
fprintf()


- "width": ANSI C specifies that a width of "*" means get
the width value from the argument list.

- "prec": same as above ("*" => get precision value from arglist)

- "prec": precision may also be used with "%s" conversion.

- The table describing the "%s" conversion:
- The meaning of "width" is the MINIMUM ... (reversed in text)
- The meaning of "prec" is the MAXIMUM ... (missing in text)

Anonymous   
Printed Page 342
middle of page:

In the third section (Returns:), "x^exp" is specified ("exp" is
superscripted). That should be "x2^exp" to indicate "x times the quantity (2
raised to the power exp)". Or maybe "x times 2^exp". Whatever fits your
style.

Anonymous   
Printed Page 342
middle of page: In the third section (Returns:), "x^exp" is

specified (the "exp" is superscripted). That should be "x2^exp" to
indicate "x times the quantity (2 raised to the power exp)". Or maybe
"x times 2^exp".

Anonymous   
Printed Page 352
mblen()

The manual says that this does not change the shift state of mbtowc(), which
differs from all other references I have found.

Anonymous   
Printed Page 356
memchr():

The text says to #include <stdlib.h>, but it should be <string.h>.

Anonymous   
Printed Page 360
memset()

The text says to #include <stdlib.h>, but it should be <string.h>.

Anonymous   
Printed Page 374-375
printf()

- "width": ANSI C specifies that a width of "*" means get
the width value from the argument list.

- "prec": same as above ("*" => get precision value from arglist)

- "prec": precision may also be used with "%s" conversion.

- The table describing the "%s" conversion:
- The meaning of "width" is the MINIMUM ... (reversed in text)
- The meaning of "prec" is the MAXIMUM ... (missing in text)

Anonymous   
Printed Page 431-432
sprintf()

- "width": ANSI C specifies that a width of "*" means get
the width value from the argument list.

- "prec": same as above ("*" => get precision value from arglist)

- "prec": precision may also be used with "%s" conversion.

- The table describing the "%s" conversion:
- The meaning of "width" is the MINIMUM ... (reversed in text)
- The meaning of "prec" is the MAXIMUM ... (missing in text)

Anonymous   
Printed Page 438
10th and 21st lines

The first error is "... sequence of the digits 0 through 7." This should be
"... sequence of the digits 0 through 9," since it refers to a decimal number.

The second error is "... or more of the digits 0 through 9." This should be
"... or more of the digits 0 through 7," since in this case it refers to an
octal number.

Anonymous   
Printed Page 573
Appendix F:

This appendix includes the Federal Information Processing Standard (FIPS)
151-1. However, I found FIPS 151-2 (at http://www.itl.nist.gov/div897/pubs/)
which has been released since this book was published. It supercedes FIPS
151-1.

Anonymous