From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10427 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Sabogal Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] add missing *_unlocked and wcsftime_l prototypes to wchar.h Date: Tue, 6 Sep 2016 17:09:39 -0400 Message-ID: <20160906210939.32637-2-dsabogalcc@gmail.com> References: <20160906210939.32637-1-dsabogalcc@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473196234 8784 195.159.176.226 (6 Sep 2016 21:10:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2016 21:10:34 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10439-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 06 23:10:31 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 1bhNdL-0000na-Fn for gllmg-musl@m.gmane.org; Tue, 06 Sep 2016 23:10:19 +0200 Original-Received: (qmail 11694 invoked by uid 550); 6 Sep 2016 21:10:16 -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 11646 invoked from network); 6 Sep 2016 21:10:14 -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=X6taJ6oBREavzNmRsFiMU4hRaqtFg6uKDaf3x3B2Ne8=; b=q7EJ6glgskEF69pwfxXLVoOrmdCSUXYouhw7vRvKU3HSHyvGUQciVOVCEz/X5KdNIx qe6OaQs/mjpGjBiokDESz5FKMyBvLr4CAS4/tidZh60aTQ7BeeAfvVZkCiq7eQPUiRvd efTHbEvWwcUVHH03iy0JMmiNhUH5fTY0xM34BIXHhJi+3UoyEfVBWay0Jw1qkb2sDk08 M80+ZqN3DaTQomj6MllVxiJogv2ezbliDp12Vt8hGkALdr9OLZIef6n4ZALTClqCzA+A Vtw1r0O5VIkYmMDtini+NRlKih52t55oJtBrs1y5FzwSCbEytV1UP8HXWAZD4jSP2cMn qKCQ== 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=X6taJ6oBREavzNmRsFiMU4hRaqtFg6uKDaf3x3B2Ne8=; b=DxmuAk/OeWZtW/uFb73OztXQ1F24UYFl+HFuRpu0JzRxGJjrSBEzcaSBY1eW0IY7Rk kYuta6AXFWSjrtAfSAI/cvxuZO6s8xg60PdU/pxsMj0TJYayj3KuLWJag0SIldLyUjIM M+DKFhvMjJ5ktzhM/er8tUYF4JdJjFF+CXjxt2kEI32+fDBYrZZPfI+ROeXj7AuyRRD6 J8PdDUa/+PIPiqBFl9bKGN2JEiHMHHMp1UFcl6alSAIAs7owyOGCkKXTp7kBgRwFX4J6 uhwn0ao0rssuCE5s0QbQGiGm9cne6a+3+XkBd8/bGRWUdoijIjZpg3IxS/bFLxyEbb1H 9eiA== X-Gm-Message-State: AE9vXwORKivQ1eAHqZyds49JuKV78uoXlu7omglOICSkbaOodlzwbWQFJHq/mYyngZXWHw== X-Received: by 10.202.71.199 with SMTP id u190mr9386779oia.35.1473196203049; Tue, 06 Sep 2016 14:10:03 -0700 (PDT) X-Mailer: git-send-email 2.10.0 In-Reply-To: <20160906210939.32637-1-dsabogalcc@gmail.com> Xref: news.gmane.org gmane.linux.lib.musl.general:10427 Archived-At: these functions had been implemented, but prototypes were not made available --- include/wchar.h | 12 ++++++++++++ src/stdio/getwchar.c | 2 -- src/stdio/getwchar_unlocked.c | 8 ++++++++ src/stdio/putwchar.c | 2 -- src/stdio/putwchar_unlocked.c | 8 ++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 src/stdio/getwchar_unlocked.c create mode 100644 src/stdio/putwchar_unlocked.c diff --git a/include/wchar.h b/include/wchar.h index 0167dce..58818f6 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -136,6 +136,18 @@ size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const s #undef iswdigit +#if defined(_GNU_SOURCE) +wint_t fgetwc_unlocked (FILE *); +wint_t getwc_unlocked (FILE *); +wint_t getwchar_unlocked (void); +wint_t fputwc_unlocked (wchar_t, FILE *); +wint_t putwc_unlocked (wchar_t, FILE *); +wint_t putwchar_unlocked (wchar_t); +wchar_t *fgetws_unlocked (wchar_t *__restrict, int, FILE *__restrict); +int fputws_unlocked (const wchar_t *__restrict, FILE *__restrict); +size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict, locale_t); +#endif + #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) FILE *open_wmemstream(wchar_t **, size_t *); diff --git a/src/stdio/getwchar.c b/src/stdio/getwchar.c index bd89e0e..77a9dc1 100644 --- a/src/stdio/getwchar.c +++ b/src/stdio/getwchar.c @@ -5,5 +5,3 @@ wint_t getwchar(void) { return fgetwc(stdin); } - -weak_alias(getwchar, getwchar_unlocked); diff --git a/src/stdio/getwchar_unlocked.c b/src/stdio/getwchar_unlocked.c new file mode 100644 index 0000000..1d00567 --- /dev/null +++ b/src/stdio/getwchar_unlocked.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include "stdio_impl.h" +#include + +wint_t getwchar_unlocked(void) +{ + return fgetwc_unlocked(stdin); +} diff --git a/src/stdio/putwchar.c b/src/stdio/putwchar.c index b249c4a..7575384 100644 --- a/src/stdio/putwchar.c +++ b/src/stdio/putwchar.c @@ -5,5 +5,3 @@ wint_t putwchar(wchar_t c) { return fputwc(c, stdout); } - -weak_alias(putwchar, putwchar_unlocked); diff --git a/src/stdio/putwchar_unlocked.c b/src/stdio/putwchar_unlocked.c new file mode 100644 index 0000000..6817f9e --- /dev/null +++ b/src/stdio/putwchar_unlocked.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include "stdio_impl.h" +#include + +wint_t putwchar_unlocked(wchar_t c) +{ + return fputwc_unlocked(c, stdout); +} -- 2.10.0