From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10422 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Sabogal Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] add missing confstr constants Date: Sun, 4 Sep 2016 10:42:47 -0400 Message-ID: <20160904144248.9208-1-dsabogalcc@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473000208 14442 195.159.176.226 (4 Sep 2016 14:43:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Sep 2016 14:43:28 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10435-gllmg-musl=m.gmane.org@lists.openwall.com Sun Sep 04 16:43:24 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1bgYdn-0003Jf-Rj for gllmg-musl@m.gmane.org; Sun, 04 Sep 2016 16:43:23 +0200 Original-Received: (qmail 17834 invoked by uid 550); 4 Sep 2016 14:43:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17772 invoked from network); 4 Sep 2016 14:43:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=MJNL4TTM896W1EheJ5NpjAzG3ORkz154+8H3U4yelrw=; b=CY6xM65yfd+bmc2W62AVk/KZBVZhc2h0I76tRZwcmuP6vwlK1Yct7W9HxDF0ubYTjo ZtAUpITFsMgPlSYU2rqX/s96nLo/1XJsA7i/HFpk+/SLzUvgKbkZOemJHNiVDrQdVez1 mbQ4/684G2VrEjrha6R/dJjvifseFvf/2Ewv1PYNVOU0PYVSD3Cox60R8CW8S9m91Yej O32yROjZq8z/b5ebjbnW8IDPVyiHAs6f3w7ecR0h3tgpct3hHv+JCn39faL1UkB7remM aKgggT0YkXTwK/ZIBw6KnnajudiAOoXEqZ87OqSeBMemhIJEi8T9Kp1pFdVNMqLqRL+/ 2etA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=MJNL4TTM896W1EheJ5NpjAzG3ORkz154+8H3U4yelrw=; b=WqDoImr3zgjVgQjh98OgbDEJP5w/VPb4/qinxnTXIMN7D46ke3/AXmqrpDM4u5qN0e Yt/mCbwCrkxdx4a6xJ3cJbqcDnjJYHZXHGw8KC3+/KoWW/t4Bkg254c1XzGIAxBDB7/Q ezJlppz7RuXVyQgVU+eWcaf9lbzji4ZweEkMGfmUzNgadsi4ENIBMzHqpRJ+xW0Zs3wE d2KYXpVs6cAV3GX7TlmqigMSqRlV6C/Eqt6EX4+iKzto4fTUfAM+FxXheSubRbe0QwAF WkEEVbfSQT9eq+sUxRiEpwWhlUHGL9lYIk3Z2BbO0o0bHiHIg5oMKZGvmroooXIi1iJ3 kutA== X-Gm-Message-State: AE9vXwMX9HkN3y12tBPTXVlkXJA322oWlvRUU+VI0o08XzBUYxEDKtmy489y8fGkHXALFg== X-Received: by 10.157.45.101 with SMTP id v92mr27044923ota.192.1473000182557; Sun, 04 Sep 2016 07:43:02 -0700 (PDT) X-Mailer: git-send-email 2.10.0 Xref: news.gmane.org gmane.linux.lib.musl.general:10422 Archived-At: 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