add missing POSIX confstr keys for pthread CFLAGS/LDFLAGS
authorRich Felker <dalias@aerifal.cx>
Wed, 20 Apr 2022 13:06:54 +0000 (09:06 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 20 Apr 2022 13:06:54 +0000 (09:06 -0400)
_CS_POSIX_V7_THREADS_CFLAGS and _CS_POSIX_V7_THREADS_LDFLAGS have been
missing for a long time, which is a conformance defect. we were
waiting on glibc to add them or at least agree on the numeric values
they will have so as to keep the numbering aligned. it looks like they
will be added to glibc with these numbers, and in any case, this list
does not have any significant churn that would result in the numbers
getting taken.

include/unistd.h
src/conf/confstr.c

index 212263a..80be3b2 100644 (file)
@@ -467,6 +467,8 @@ pid_t gettid(void);
 #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS    1147
 #define _CS_V6_ENV     1148
 #define _CS_V7_ENV     1149
+#define _CS_POSIX_V7_THREADS_CFLAGS    1150
+#define _CS_POSIX_V7_THREADS_LDFLAGS   1151
 
 #ifdef __cplusplus
 }
index 02cb1aa..3d41728 100644 (file)
@@ -7,7 +7,7 @@ size_t confstr(int name, char *buf, size_t len)
        const char *s = "";
        if (!name) {
                s = "/bin:/usr/bin";
-       } else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>33U) {
+       } else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>35U) {
                errno = EINVAL;
                return 0;
        }