mirror of git://git.musl-libc.org/musl
add missing confstr constants
the _CS_V6_ENV and _CS_V7_ENV constants are required to be available for use with confstr. glibc defines these constants with values 1148 and 1149, respectively. the only missing (and required) confstr constants are _CS_POSIX_V7_THREADS_CFLAGS and _CS_POSIX_V7_THREADS_LDFLAGS which remain unavailable in glibc.
This commit is contained in:
parent
e314258e2f
commit
104e8a0e3b
|
@ -457,6 +457,8 @@ int eaccess(const char *, int);
|
||||||
#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 1145
|
#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 1145
|
||||||
#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 1146
|
#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 1146
|
||||||
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147
|
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147
|
||||||
|
#define _CS_V6_ENV 1148
|
||||||
|
#define _CS_V7_ENV 1149
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ size_t confstr(int name, char *buf, size_t len)
|
||||||
const char *s = "";
|
const char *s = "";
|
||||||
if (!name) {
|
if (!name) {
|
||||||
s = "/bin:/usr/bin";
|
s = "/bin:/usr/bin";
|
||||||
} else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>31U) {
|
} else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>33U) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue