The following issue has been SUBMITTED. ====================================================================== https://austingroupbugs.net/view.php?id=1673 ====================================================================== Reported By: geoffclare Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1673 Category: Rationale Type: Error Severity: Comment Priority: normal Status: New Name: Geoff Clare Organization: The Open Group User Reference: Section: B.3.1 Page Number: 3803-3806 Line Number: 131760-131838 Final Accepted Text: ====================================================================== Date Submitted: 2023-04-18 15:01 UTC Last Modified: 2023-04-18 15:01 UTC ====================================================================== Summary: Rationale about removed interfaces needs updating Description: XRAT B.3.1 lists the interfaces removed in the revision and gives advice about what to use instead. Updating it is not a purely editorial matter since the advice given needs to be reviewed.
In the proposed changes I did not think it worth listing the functions that were in the STREAMS and Tracing options individually. Desired Action: Replace the entire contents of B.3.1 (and its subsections) with:<blockquote>This section contains a list of options and interfaces removed in POSIX.1-202x, together with advice for application developers on the alternative interfaces that should be used.</blockquote><i>B.3.1.1 STREAMS Option</i><blockquote>Applications are recommended to use UNIX domain sockets as an alternative for much of the functionality provided by this option. For example, file descriptor passing can be performed using <i>sendmsg</i>() and <i>recvmsg</i>() with SCM_RIGHTS on a UNIX domain socket instead of using <i>ioctl</i>() with I_SENDFD and I_RECVFD on a STREAM.</blockquote><i>B.3.1.2 Tracing Option</i><blockquote>Applications are recommended to use implementation-provided extension interfaces instead of the functionality provided by this option. (Such interfaces were in widespread use before the Tracing option was added to POSIX.1 and continued to be used in preference to the Tracing option interfaces.)</blockquote><i>B.3.1.3 _longjmp() and _setjmp()</i><blockquote>Applications are recommended to use <i>siglongjmp</i>() and <i>sigsetjmp</i>() instead of these functions.</blockquote><i>B.3.1.4 _tolower() and _toupper()</i><blockquote>Applications are recommended to use <i>tolower</i>() and <i>toupper</i>() instead of these functions.</blockquote><i>B.3.1.5 ftw()</i><blockquote>Applications are recommended to use <i>nftw</i>() instead of this function.</blockquote><i>B.3.1.6 getitimer() and setitimer()</i><blockquote>Applications are recommended to use <i>timer_gettime</i>() and <i>timer_settime</i>() instead of these functions.</blockquote><i>B.3.1.7 gets()</i><blockquote>Applications are recommended to use <i>fgets</i>() instead of this function.</blockquote><i>B.3.1.8 gettimeofday()</i><blockquote>Applications are recommended to use <i>clock_gettime</i>() instead of this function.</blockquote><i>B.3.1.9 isascii() and toascii()</i><blockquote>Applications are recommended to use macros equivalent to the following instead of these functions:<pre>#define isascii(c) (((c) & ~0177) == 0) #define toascii(c) ((c) & 0177)</pre>An alternative replacement for <i>isascii</i>(), depending on the intended outcome if the code is ported to implementations with different character encodings, might be:<pre>#define isascii(c) (isprint((c)) || iscntrl((c)))</pre>(In the C or POSIX locale, this determines whether <i>c</i> is a character in the portable character set.)</blockquote><i>B.3.1.10 pthread_getconcurrency() and pthread_setconcurrency()</i><blockquote>Applications are recommended to use thread scheduling (on implementations that support the Thread Execution Scheduling option) instead of these functions; see [xref to XSH 2.9.4 Thread Scheduling].</blockquote><i>B.3.1.11 rand_r()</i><blockquote>Applications are recommended to use <i>nrand48</i>() or <i>random</i>() instead of this function.</blockquote><i>B.3.1.12 setpgrp()</i><blockquote>Applications are recommended to use <i>setpgid</i>() or <i>setsid</i>() instead of this function.</blockquote><i>B.3.1.13 sighold(), sigpause(), and sigrelse()</i><blockquote>Applications are recommended to use <i>pthread_sigmask</i>() or <i>sigprocmask</i>() instead of these functions.</blockquote><i>B.3.1.14 sigignore(), siginterrupt(), and sigset()</i><blockquote>Applications are recommended to use <i>sigaction</i>() instead of these functions.</blockquote><i>B.3.1.15 tempnam()</i><blockquote>Applications are recommended to use <i>mkdtemp</i>(), <i>mkstemp</i>(), or <i>tmpfile</i>() instead of this function.</blockquote><i>B.3.1.16 ulimit()</i><blockquote>Applications are recommended to use <i>getrlimit</i>() or <i>setrlimit</i>() instead of this function.</blockquote><i>B.3.1.17 utime()</i><blockquote>Applications are recommended to use <i>futimens</i>() if a file descriptor for the file is open, otherwise <i>utimensat</i>(), instead of this function.</blockquote> ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2023-04-18 15:01 geoffclare New Issue 2023-04-18 15:01 geoffclare Name => Geoff Clare 2023-04-18 15:01 geoffclare Organization => The Open Group 2023-04-18 15:01 geoffclare Section => B.3.1 2023-04-18 15:01 geoffclare Page Number => 3803-3806 2023-04-18 15:01 geoffclare Line Number => 131760-131838 ======================================================================