Corrigendum:    U055

Date:           June 2001

Document:       C606
                System Interfaces and Headers, Issue 5

Code:           27383  06/01  C606/U055

Contents:       This corrigendum incorporates:
                U047 (July 2000)
                U042 (December 1999)
                U040 (March 1999)
                U035 (September 1998)
                U033 (March 1998)
                U030 (December 1997)
                U028 (September 1997)
                U026 (July 1997)
                U021 (May 1997)

----------------------------------------------------------------------------

Change Number:  U055/1

On the catgets() manual page (Page 110, Volume 1):

Add the following new error to the ERRORS section for the catgets()
function between the entries for [EBADF] and [EINTR]:

  [EBADMSG]  The message identified by set_id and msg_id in the
             specified message catalog did not satisfy
             implementation-dependent security criteria.

On Page 112, add the following new sentence in the first paragraph of
the DESCRIPTION of catopen() following the sentence starting with "If
NLSPATH does not exist".

  If NLSPATH exists in the environment when the process starts, then
  if the process has appropriate privileges, the behavior of
  catopen() is undefined.

----------------------------------------------------------------------------

Change Number:  U055/2

On the hcreate() manual page (Page 390, Volume 1) add to the
end of the DESCRIPTION:

  The hcreate() and hsearch() functions need not be reentrant.

Rationale:

The revision states that these functions are not reentrant .

----------------------------------------------------------------------------

Change Number:  U055/3

On the poll() manual page (Page 587, Volume 1):

Change the DESCRIPTION of POLLWRBAND from:

  This event only examines bands that have been written to at
  least once.

to:

  If any priority band has been written to on this STREAM, this
  event only examines bands that have been written to at least once.

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U047 (July 2000).

----------------------------------------------------------------------------

Change Number:  U047/1

On the pthread_getschedparam() manual page (Page 626, Volume 1):

Change the second paragraph of the DESCRIPTION from:

  "The priority returned from pthread_getschedparam() is the value
   specified by the most recent pthread_setparam() or
   pthread_create() call affecting the target thread, and reflects
   any temporary adjustments to its priority as a result of any
   priority inheritance or ceiling functions."

to:

  "The priority value returned from pthread_getschedparam() shall be
   the value specified by the most recent pthread_setschedparam() or
   pthread_create() call affecting the target thread. It shall not
   reflect any temporary adjustments to its priority as a result of
   any priority inheritance or ceiling functions."

----------------------------------------------------------------------------

Change Number:  U047/2

On the strptime() manual page (Page 891, Volume 2):

Add to the APPLICATION USAGE:

  "It is unspecified whether multiple calls to strptime() using the
   same tm structure will update the current contents of the structure
   or overwrite all contents of the structure. Portable applications
   should make a single call to strptime() with a format and all data
   needed to completely specify the date and time being converted."

----------------------------------------------------------------------------

Change Number:  U047/3

On the dirent.h manual page (Page 1069, Volume 2):

Add the prototype for opendir() as follows:

  DIR *opendir(const char *);

----------------------------------------------------------------------------

Change Number:  U047/4

On the tcsetpgrp() manual page (Page 936, Volume 2):

Add a new paragraph to the end of the DESCRIPTION:

  "Attempts to use tcsetpgrp() from a process which is a member of a
   background process group on a fildes associated with its controlling
   terminal will cause the process group to be sent a SIGTTOU signal.
   If the calling process is blocking or ignoring SIGTTOU signals, the
   process is allowed to perform the operation, and no signal is sent."

(This change is for consistency with POSIX.1, Section 7.2.)

----------------------------------------------------------------------------

Start of Corrigendum U042 (December 1999).

----------------------------------------------------------------------------

Change Number:  U042/1

On the  manual page (Page 1188, Volume 2):

Add after the line containing TCIOFLUSH:

  TCOFLUSH  Flush untransmitted output.

----------------------------------------------------------------------------

Change Number:  U042/2

On the msgrcv() manual page (Page 551, Volume 1):

Change the EINVAL "will fail" error case from:

  [EINVAL]  msqid is not a valid message queue identifier;
            or the value of msgsz is less than 0.

to:

  [EINVAL]  msqid is not a valid message queue identifier.

Rationale:

Since size_t is an unsigned type, msgsz can never be less than zero.

----------------------------------------------------------------------------

Change Number:  U042/3

On the pthread_getschedparam() manual page (Page 626, Volume 1):

Change the following wording in the second paragraph from:

  "... and reflects any temporary adjustments to its priority as
   a result of any priority inheritance or ceiling functions."

to:

  "... and does not reflect any temporary adjustments to its priority
   as a result of any priority inheritance or ceiling functions."

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U040 (March 1999).

----------------------------------------------------------------------------

Change Number:  U040/1

On the fwprintf() manual page (Page 307, Volume 1):

Add to the end of the RETURN VALUE paragraph:

"If n or more wide characters were requested to be written swprintf()
returns a negative value."

Rationale:

Consistency with the ISO C MSE.

----------------------------------------------------------------------------

Change Number:  U040/2

On the wcscat() manual page (Page 708, Volume 2):

In the RETURN VALUE section, change "s1" to "ws1".

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U035 (September 1998).

----------------------------------------------------------------------------

Change Number:  U035/1

On the tcflush() manual page (Page 926, Volume 2), change the text
under ERRORS from:

  "the tcflow() function may fail if"

to:

  "the tcflush() function may fail if"

Also change tcflow() in the Application Usage to tcflush().

----------------------------------------------------------------------------

Change Number:  U035/2

On the  manual page (Page 1131, Volume 2), change:

  "i. Abnormal termination....... except that the status is made..."

to:

  "i. Abnormal termination....... except that the status made..."

----------------------------------------------------------------------------

Change Number:  U035/3

On the sigwaitinfo() manual page (Page 847, Volume 2), SYNOPSIS, change:

  int sigwaitinfo(const sigset_t *set, siginfo *info);

to:

  int sigwaitinfo(const sigset_t *set, siginfo_t *info);

----------------------------------------------------------------------------

Change Number:  U035/4

On the  manual page (Page 1169, Volume 2), DESCRIPTION,
the types blksize_t and blkcnt_t should be added; change:

  "The dev_t, ino_t, mode_t, nlink_t, uid_t, gid_t, off_t and time_t
  types are defined as described in ."

to:

  "The blkcnt_t, blksize_t, dev_t, ino_t, mode_t, nlink_t, uid_t, gid_t,
  off_t and time_t types are defined as described in ."

----------------------------------------------------------------------------

Change Number:  U035/5

On the  manual page (Page 1172, Volume 2), DESCRIPTION,
the types fsblkcnt_t and fsfilcnt_t should be described; add:

  "The fsblkcnt_t and fsfilcnt_t are defined as described in
  ."

----------------------------------------------------------------------------

Change Number:  U035/6

On the  manual page (Page 1190, Volume 2), DESCRIPTION,
the types clockid_t and timer_t should be described; change:

  "The clock_t, size_t and time_t are defined as described in
  "

to:

  "The clock_t, clockid_t, size_t, time_t and timer_t are defined as
  described in "

(clockid_t and timer_t should be RT shaded.)

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U033 (March 1998).

----------------------------------------------------------------------------

Change Number:  U033/1

Section 2.2.1, The X/Open Name Space, Page 18:

Add uc_ to the Prefix column for 
Add ss_ to the Prefix column for 

----------------------------------------------------------------------------

Change Number:  U033/2

On the regexp() manual page (Page 714, Volume 2), SYNOPSIS, change:

  #define PEEK peek code

to:

  #define PEEKC peek code

----------------------------------------------------------------------------

Change Number:  U033/3

On the pthread_mutexattr_settype() manual page, (Page 646, Volume 1),
SYNOPSIS, and on the  manual page (Page 1117, Volume 2),
change:

  int pthread_mutexattr_gettype(pthread_mutexattr_t *attr, int *type);

to:

  int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);

----------------------------------------------------------------------------

Change Number:  U033/4

On the limits.h manual page (Page 1103-1104, Volume 2), CHAR_MIN,
INT_MIN, LONG_MIN, SCHAR_MIN, SHRT_MIN, change:

  Minimum Acceptable Value:

to

  Maximum Acceptable Value:

----------------------------------------------------------------------------

Change Number:  U033/5

On the strptime() manual page (Page 889, Volume 2), change:

  %r is the time as %I:%M:%S %p.

to:

  %r 12-hour clock time using the AM/PM notation if t_fmt_ampm is
  not an empty string in the LC_TIME portion of the current locale;
  in the POSIX locale, this will be equivalent to ``%I:%M:%S %p''.

----------------------------------------------------------------------------

Change Number:  U033/6

Section 2.5, STREAMS, Page 34, in the paragraph entitled "Priority",
change:

  "High-priority messages are always placed at the head of a queue but
  after any other high-priority messages already in the queue."

to:

  "High priority messages are always placed at the head of the queue,
  but will be discarded if there is already a high-priority message in
  the queue."

----------------------------------------------------------------------------

Change Number:  U033/7

On the confstr() manual page, (Page 143, Volume 1), RETURN VALUE,
add to the end of the first sentence :

  "including the terminating null"

----------------------------------------------------------------------------

Change Number:  U033/8

On the strftime() manual page (Page 880, Volume 2), change the last
sentence of the %V conversion specifier from:

  "Otherwise, it is week 53 of the previous year, and the next
  week is week 1."

to:

  "Otherwise, it is the last week of the previous year, and the
  next week is week 1."

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U030 (December 1997).

----------------------------------------------------------------------------

Change Number:  U030/1

On the strcspn() manual page it states:

  "The strcspn() function computes the length of the maximum
  initial segment of the string pointed to by s1 which consists
  entirely of bytes not from the string pointed to by s2.

  The strcspn function returns the length of s1 ..."

The return value should indicate that the computed segment length is
returned, not the s1 length.

Change the text of the RETURN VALUE to:

  "The strcspn() function returns the length of the computed
  segment of the string pointed to by s1; no return value is
  reserved to indicate an error."

----------------------------------------------------------------------------

Change Number:  U030/2

On the getc_unlocked() manual page add the following text
to the Application Usage section:

  "Because they may be implemented as macros, getc_unlocked() and
  putc_unlocked() may treat incorrectly a stream argument with side
  effects. In particular, getc_unlocked(*f++) and putc_unlocked(*f++)
  will not necessarily work as expected. Therefore, use of these
  functions should be preceded by the appropriate
  ``#undef getc_unlocked'' or ``#undef putc_unlocked'' statement in
  such situations.

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U028 (September 1997).

----------------------------------------------------------------------------

Change Number:  U028/1

On the unistd.h manual page the following changes should be made:

1. Page 1195, the second indented paragraph under the heading
   "Version Test Macros" should be shaded with an EX marking.

2. Page 1195, the sixth paragraph under the heading "Version
   Test Macros" should be changed from:

   "_POSIX2_VERSION is defined in the ISO POSIX-2 standard. It
   changes with each new version of the ISO POSIX-2 standard."

   to:

   "_POSIX2_VERSION is defined to have the value of the ISO POSIX-2
   standard's POSIX2_VERSION limit. It changes with each new
   version of the ISO POSIX-2 standard."

3. Page 1197, remove the EX shading from _POSIX2_LOCALEDEF since
   this is specified in POSIX 1003.2 P723, L149.

----------------------------------------------------------------------------

Change Number:  U028/2

On the getpmsg pointer page change the NAME section to:

  getpmsg - receive next message from a STREAMS file

and change the #include in the SYNOPSIS section to:

  #include 

----------------------------------------------------------------------------

Change Number:  U028/3

On the getgrgid() manual page DESCRIPTION, paragraph 3, getgrid_r():

Change:   "... with a matching gid or name. ..."

To:       "... with a matching gid. ..."

On the getpwnam() manual page DESCRIPTION, paragraph 3, getpwnam_r():

Change:   "... with a matching uid or name. ..."

To:       "... with a matching name. ..."

On the getpwuid() manual page DESCRIPTION, paragraph 3, getpwuid_r():

Change:   "... with a matching gid or name. ..."

To:       "... with a matching uid. ..."

Rationale:

This text is taken directly from POSIX which groups getgrgid_r()
and getgrnam_r() on the same page. In XSH5 they are on different
pages, so the generalisation could be misleading.

----------------------------------------------------------------------------

Change Number:  U028/4

On the ioctl() manual page, page 409, I_FDINSERT, [EINVAL] error:

Change:   " ... ctlptr."

To:       " ... ctlbuf."

Rationale:

The text refers to "ctlptr" when there is no such field defined
in a strfdinsert structure.

----------------------------------------------------------------------------

Change Number:  U028/5

On the wchar.h manual page:

Change:   size_t mbsinit (const mbstate_t *)

To:       int mbsinit (const mbstate_t *)

Rationale:

For consistency with ISO C and the mbsinit() manual page.

----------------------------------------------------------------------------

Change Number:  U028/6

On the mmap() manual page, page 527, in the EX shaded section:

Change:   (void *) -1

To:       MAP_FAILED

----------------------------------------------------------------------------

Change Number:  U028/7

On the sigaction manual page, page 814 , in the paragraph titled "Signal
effects on other functions", last sentence:

Change:   "Signals that are ignored..... , except as specified for and
          the sigwait() functions."

To:       "Signals that are ignored..... , except as specified for the
          sigpending() and the sigwait() functions."

----------------------------------------------------------------------------

Change Number:  U028/8

On the signal.h manual page, page 1135:

Change:   void *sigset(int, void (*)(int)))(int);

To:       void (*sigset(int, void (*)(int)))(int);

----------------------------------------------------------------------------

Change Number:  U028/9

On the stdio.h manual page add:

  EX L_cuserid  Maximum size of character array to hold
                cuserid() output (LEGACY)

  EX char *cuserid(char *s); (LEGACY)

----------------------------------------------------------------------------

Change Number:  U028/10

On the fscanf manual page, page 277, 3rd paragraph in the "[" clause:

Change:   "all subsequent characters"

To:       "all subsequent bytes"

Change:   "The characters between"

To:       "The bytes between"

Change:   ", unless the character after"

To:       ", unless the byte after"

Change:   "scanset contains all characters"

To:       "scanset contains all bytes"

----------------------------------------------------------------------------

Change Number:  U028/11

On the gamma() manual page, page 314, RETURN VALUE:

Change:   "Return to lgamma()."

To:       "Refer to lgamma()."

----------------------------------------------------------------------------

Change Number:  U028/12

On the iconv() manual page, page 396, ERRORS, [EBADF] error,
delete "iX EBADF".

----------------------------------------------------------------------------

Change Number:  U028/13

On the stdlib.h manual page, page 1146:

Change:   int       putenv(const char *);

To:       int       putenv(char *);

Rationale:

For consistency with the change on the putenv() manual page.

----------------------------------------------------------------------------

Change Number:  U028/14

On the libgen.h manual page:

Change:   char  *regcmp(const char *, ...);
          char  *regex(const char *, const char *, ...);

To:       char  *regcmp(const char *, ...); (LEGACY)
          char  *regex(const char *, const char *, ...); (LEGACY)

----------------------------------------------------------------------------

Change Number:  U028/15

In Section 2.2.1, The X/Open Name Space, add at the end of the
first paragraph a new paragraph:

  "An implementation conforming to the referenced Networking Services,
  Issue 5 specification will define or declare an additional
  set of identifiers, as shown in Section 1.3.1, Chapter 9 and
  Chapter 11 of XNS.

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U026 (July 1997).

----------------------------------------------------------------------------

Change Number:  U026/1

Change:

The following symbols should be added to unistd.h on page 1203
after _SC_XOPEN_XCU_VERSION:

   _SC_XOPEN_LEGACY
   _SC_XOPEN_REALTIME
   _SC_XOPEN_REALTIME_THREADS

----------------------------------------------------------------------------

Change Number:  U026/2

Change:

The pthread_setschedparam prototype on the pthread_getschedparam
and pthread.h manual pages should have its second argument updated
from "int *policy". to "int policy". The changes are:

pthread_getschedparam page:

   int pthread_setschedparam(pthread_t thread, int policy, const
   struct sched_param *param);

pthread.h page:

   int pthread_setschedparam(pthread_t , int , const struct
   sched_param *);

----------------------------------------------------------------------------

Change Number:  U026/3

Change:

On the signal.h manual page change the sigev_notify_function
member of the sigevent structure from:

   void(*)(unsigned sigval) sigev_notify_function

to:

   void(*)(union sigval) sigev_notify_function

----------------------------------------------------------------------------

Change Number:  U026/4

Change:

On the unistd.h manual page add the following prototype:

   RT int fdatasync(int );

----------------------------------------------------------------------------

Change Number:  U026/5

Change:

In section 2.2.1 add to the table of macros with prefixes, before
the entry " F_ ..."

      Header          Prefix

   EX        RTLD_

----------------------------------------------------------------------------

Change Number:  U026/6

Change:

On the select() manual page, change the occurrences of readfs and
writefs in the select() DESCRIPTION to be readfds and writefds.

----------------------------------------------------------------------------

Change Number:  U026/7

Change:

On the readdir() manual page change the prototype of readdir_r() to:

   int readdir_r (DIR *dirp, struct dirent *entry, struct dirent
   **result);

On the dirent.h manual page change the prototype of readdir_r() to:

   int readdir_r (DIR *, struct dirent *, struct dirent **);

----------------------------------------------------------------------------

Change Number:  U026/8

Change:

On the readdir() manual page, change the description of
readdir_r() from:

   "On successful return, the pointer returned at *result will the
   same value as the argument entry."

to:

   "On successful return, the pointer returned at *result will have
   the same value as the argument entry."

----------------------------------------------------------------------------

Change Number:  U026/9

Change:

In section 1.4.3 "New Interfaces and Headers in Issue 5" change
pthread_addr_setstacksize() to pthread_attr_setstacksize().

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Start of Corrigendum U021 (May 1997).

----------------------------------------------------------------------------

Change Number:  U021/1

Change:

On the stdlib.h page, replace the declarations of realloc() and
realpath() to be consistent with the manual pages:

   char *realpath(const char *, char *);
   void *realloc(void *, size_t );

----------------------------------------------------------------------------

Change Number:  U021/2

Change:

On the strings.h page, replace the declaration of index() to be
consistent with the manual pages:

   char *index(const char *, int );

----------------------------------------------------------------------------

Change Number:  U021/3

Change:

On the semaphore.h page add to the end of the first paragraph of
DESCRIPTION:

  The symbol SEM_FAILED is defined (see sem_open()).

----------------------------------------------------------------------------

Change Number:  U021/4

Change:

On the mq_receive() page, change the DESCRIPTION from:

   "If the value of maxsize is greater than {SSIZE_MAX}, the result
   is implementation-dependent. "

to:

   "If the value of msg_len is greater than {SSIZE_MAX}, the result
   is implementation-dependent."

----------------------------------------------------------------------------

Change Number:  U021/5

Change:

 On the mq_unlink() page, change the RETURN VALUE from:

   "Upon successful completion, the function returns a value of zero.
   Otherwise, the named message queue is changed by this function
   call, and the function returns a value of -1 and sets errno to
   indicate the error. "

to:

   "Upon successful completion, the function returns a value of zero.
   Otherwise, the named message queue is unchanged by this function
                                         ^^^^^^^^^
   call, and the function returns a value of -1 and sets errno to
   indicate the error."

----------------------------------------------------------------------------

Change Number:  U021/6

Change:

On the search.h page, DESCRIPTION, replace the prototypes for
tdelete() and tsearch() with:

   void *tsearch(const void *, void **, int (*)(const void *, const
   void *));
   void *tdelete(const void *, void **, int(*)(const void *, const
   void *));

----------------------------------------------------------------------------

Change Number:  U021/7

Change:

On the fscanf() page, change the first sentence of the '['
description (on page 277) from:

   "Matches a non-empty sequence of characters from a set of expected
   characters (the scanset)."

to:

   "Matches a non-empty sequence of bytes from a set of expected
   bytes (the scanset). "

Similarly, the first sentence of the 'c' description (also on page
277), change from:

   "Matches a sequence of characters of the number specified by the
   field width (1 if no field width is present in the conversion
   specification)."

to:

   "Matches a sequence of bytes of the number specified by the field
   width (1 if no field width is present in the conversion
   specification). "

----------------------------------------------------------------------------

Change Number:  U021/8

Change:

On the signal.h page (page 1135) the line:

   "In addition, the following ..."

should be positioned before the previous table (containing Signal,
Member, Value), and not after it.

----------------------------------------------------------------------------

Change Number:  U021/9

Change:

On the pthread.h and pthread_cond_wait manual pages change the
pthread_cond_wait() prototype from

   int pthread_cond_wait(pthread_cond_t *);

to:

   int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);

----------------------------------------------------------------------------

Change Number:  U021/10

Change:

On the wchar.h manual page the prototypes for wcswidth and wcwidth
should be marked as EX extensions.

----------------------------------------------------------------------------

Change Number:  U021/11

Change:

On the wcswidth manual page the SYNOPSIS should be marked as an EX
extension.

Add to Application usage:

   "This function was removed from the final ISO C Amendment 1, and
   the return value for a non-printable wide character is not
   specified."

----------------------------------------------------------------------------

Change Number:  U021/12

Change:

On the wcwidth manual page the SYNOPSIS should be marked as an EX
extension.

Add to application usage:

   "This function was removed from the final ISO C Amendment 1, and
   the return value for a non-printable wide character is not
   specified."

----------------------------------------------------------------------------

Change Number:  U021/13

Change:

On the shmat() manual page the expression:

   (shmaddr-((ptrdiff_t)shmaddr%SHMLBA))

should be changed to:

   (shmaddr-((uintptr_t)shmaddr%SHMLBA))

----------------------------------------------------------------------------