mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] add missing confstr constants
@ 2016-09-04 14:42 Daniel Sabogal
  2016-09-04 14:42 ` [PATCH] fix typo in utmpx.h Daniel Sabogal
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Sabogal @ 2016-09-04 14:42 UTC (permalink / raw)
  To: musl

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.
---
 include/unistd.h   | 2 ++
 src/conf/confstr.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/unistd.h b/include/unistd.h
index 760a165..2c35588 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -457,6 +457,8 @@ int eaccess(const char *, int);
 #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS	1145
 #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS	1146
 #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS	1147
+#define _CS_V6_ENV	1148
+#define _CS_V7_ENV	1149
 
 #ifdef __cplusplus
 }
diff --git a/src/conf/confstr.c b/src/conf/confstr.c
index 6e9c23a..02cb1aa 100644
--- a/src/conf/confstr.c
+++ b/src/conf/confstr.c
@@ -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>31U) {
+	} else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>33U) {
 		errno = EINVAL;
 		return 0;
 	}
-- 
2.10.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] fix typo in utmpx.h
  2016-09-04 14:42 [PATCH] add missing confstr constants Daniel Sabogal
@ 2016-09-04 14:42 ` Daniel Sabogal
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Sabogal @ 2016-09-04 14:42 UTC (permalink / raw)
  To: musl

---
 include/utmpx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/utmpx.h b/include/utmpx.h
index 9e5cc95..0429014 100644
--- a/include/utmpx.h
+++ b/include/utmpx.h
@@ -38,7 +38,7 @@ struct utmpx *getutxline(const struct utmpx *);
 struct utmpx *pututxline(const struct utmpx *);
 void          setutxent(void);
 
-#if defined(_BSD_SOURCE) | defined(_GNU_SOURCE)
+#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
 #define e_exit __e_exit
 #define e_termination __e_termination
 void updwtmpx(const char *, const struct utmpx *);
-- 
2.10.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-04 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-04 14:42 [PATCH] add missing confstr constants Daniel Sabogal
2016-09-04 14:42 ` [PATCH] fix typo in utmpx.h Daniel Sabogal

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).