From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10489 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Sabogal Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] move wcswcs prototype under feature test Date: Sat, 17 Sep 2016 10:36:44 -0400 Message-ID: <20160917143644.3654-2-dsabogalcc@gmail.com> References: <20160917143644.3654-1-dsabogalcc@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1474123045 8627 195.159.176.226 (17 Sep 2016 14:37:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Sep 2016 14:37:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10502-gllmg-musl=m.gmane.org@lists.openwall.com Sat Sep 17 16:37:22 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 1blGk1-0001S5-Rz for gllmg-musl@m.gmane.org; Sat, 17 Sep 2016 16:37:17 +0200 Original-Received: (qmail 9843 invoked by uid 550); 17 Sep 2016 14:37:13 -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 9754 invoked from network); 17 Sep 2016 14:37:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=dv9LDcTSQYCBRVWq36JN3xZ9Mtq6DDtYDD3GfOUZpnI=; b=P+QlBnZEEE0CbYeNeHHnb9mR1W1tJmwcVPtnrdS1BfVMnqdlfLd1feessKVW9oOvNG TuyTpQ/IpkKD0PB2OhD/+lS+MZGiZvuQ0/GBE1eUHKRwm5VX4yG5w3EWuArqguElttrj lapiz9G5udT1wJNiEwIcDkJl19xfkaAPW7DrsQ+SIhfJofCShg5qw332nSjZS9mIVtbo DJYcTsEQm92lNoA8EXOE/ki/7fWGpvJIlxppww4fdJBxn6B+U1fpd3ZTogCQzYfzbD/Y I+uPHPKmLp+BY00VdY2SGPJO+lVsY9DRwwnToeRPVXhHA0CfwCrHidymrMp215vYm59a yT0g== 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:in-reply-to :references; bh=dv9LDcTSQYCBRVWq36JN3xZ9Mtq6DDtYDD3GfOUZpnI=; b=RzQd7Ut3r3Io//pVcaHTURoTz2gfx879dn3GNXVsmWoMjp/J0jIUgOp7FtodgaMkG2 3xXaZ0eVPueaJgxdcmFQNrb7GtA4fVNpj0+onGo2eZsKaS38z39Valp5EcKap+niz4ho t0hP7i4DGqjs2CoupKzsN9JHxIF6Cq7Ikvc1+kVQ1NM8GgVy/QM+djy9IE9KhsWrBTls j4KdErKhNELzk0LP+8QDuVpGk4qkeFZgbxAJQnternehqjkePC/JA/cq7Q3t1Wc2SBdo NNfTilUDxwXYAjiaX9eg+itfleBJfAsoJvR7p54Ai8otwpt9TSBPXyPpt30i+ipjRVxm 9WGQ== X-Gm-Message-State: AE9vXwM4QOx3+7cXIbLZQ9zFvo0GSR1n7IQywDtO6847+qju4AgLH1dKih6m44TpHuIo+w== X-Received: by 10.202.224.215 with SMTP id x206mr19905887oig.188.1474123017592; Sat, 17 Sep 2016 07:36:57 -0700 (PDT) X-Mailer: git-send-email 2.10.0 In-Reply-To: <20160917143644.3654-1-dsabogalcc@gmail.com> Xref: news.gmane.org gmane.linux.lib.musl.general:10489 Archived-At: wcswcs was an xsi extension removed in issue 7 of posix. openbsd and netbsd also provide this prototype so we expose it under _BSD_SOURCE as well. --- include/wchar.h | 6 +++++- src/string/wcswcs.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/wchar.h b/include/wchar.h index 3e6db5f..7503daf 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -67,7 +67,6 @@ wchar_t *wcstok (wchar_t *__restrict, const wchar_t *__restrict, wchar_t **__res size_t wcslen (const wchar_t *); wchar_t *wcsstr (const wchar_t *__restrict, const wchar_t *__restrict); -wchar_t *wcswcs (const wchar_t *, const wchar_t *); wchar_t *wmemchr (const wchar_t *, wchar_t, size_t); int wmemcmp (const wchar_t *, const wchar_t *, size_t); @@ -168,6 +167,11 @@ int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); size_t wcsxfrm_l(wchar_t *__restrict, const wchar_t *__restrict, size_t n, locale_t); #endif +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \ + || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 700) +wchar_t *wcswcs (const wchar_t *, const wchar_t *); +#endif + #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) int wcwidth (wchar_t); int wcswidth (const wchar_t *, size_t); diff --git a/src/string/wcswcs.c b/src/string/wcswcs.c index 9cfe4ac..9246733 100644 --- a/src/string/wcswcs.c +++ b/src/string/wcswcs.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include wchar_t *wcswcs(const wchar_t *haystack, const wchar_t *needle) -- 2.10.0