From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10426 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:38 -0400 Message-ID: <20160906210939.32637-1-dsabogalcc@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473196226 5483 195.159.176.226 (6 Sep 2016 21:10:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2016 21:10:26 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10440-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 06 23:10:23 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 1bhNdO-00012w-6C for gllmg-musl@m.gmane.org; Tue, 06 Sep 2016 23:10:22 +0200 Original-Received: (qmail 11707 invoked by uid 550); 6 Sep 2016 21:10:17 -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 11645 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; bh=TSp7RD5VbhxiGPtGmy72lWWAHEsU5twiKfzPpYYiqL4=; b=aXww/+UYrgYW30bqwfZOvEyZi0Y0JXkLUUWbVB00tfFvj1cC4pbuPwv8DZep89+1ZQ ac4BE9fCaAPvxM5zpbWZn3uoOORFId6hastoFcAuPfH+Nph51M49MspnkHwM8cwwsjPO vudA484C/OQdzVaUWbxvYuoYP7QwTKs+OdwphEB665c0115kqUxQs9W3aRiTtqYAsaps 37Cf/EX7urME6EEIqYCkb4yNhyZ7HCE0OJf2o44ViWIpUHniULwzfgsmS7mGSI0N34Ro y/u/DYgVAj4vMnk/r3Wa13+5w6lquvS0kCI8T+l6aRewR4tXIuVGt2iGAYKqLCBu2ER6 fRYA== 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=TSp7RD5VbhxiGPtGmy72lWWAHEsU5twiKfzPpYYiqL4=; b=lyfRBeuu1APbYQtIyCgcdyQaS70aTvddJFoNKkKNCmVVVL/DLF7CjCaIcgTuyKGSb7 /VTlQrvQH+xdlVf75yRnhjKl9LxnUef1zC2jMJSua3e0UQIBkXyW6/AO232AI/jE3dCF Lc6gltaZ48WAhVpflI7Ivjtk5VCbXe/SKmbzN/MGEMP0e9lJtDSp4DprxyVDlSslvs4t Nvv/sT+9Yge3B6kvxQHXh6SUOeStP/9ARSAlYIJqh6bXVkCt6SctU76lJuRy9mxA9oDT Eqd1i+UIyii+AfBooy5WbgMp9fiKBsoPWX3PxhlcH1gdwVwDmFK3UD6UAjS5GG56WNvA L0Iw== X-Gm-Message-State: AE9vXwOXX28EJ1peS474Hs9Vw4V/TwRX/X4kdjv0ZUzcylMj3427AfgjILQvkeQ6rmGDlg== X-Received: by 10.157.43.109 with SMTP id f42mr5028700otd.77.1473196202519; Tue, 06 Sep 2016 14:10:02 -0700 (PDT) X-Mailer: git-send-email 2.10.0 Xref: news.gmane.org gmane.linux.lib.musl.general:10426 Archived-At: I noticed that musl does not provide prototypes for the unlocked variants of wchar.h file I/O and wcsftime_l in . But musl does define and export these functions: nm -g /usr/lib/libc.so | grep 'lock\|time_l' | grep wc 0000000000057210 T __fgetwc_unlocked 0000000000057c10 T __fputwc_unlocked 000000000006bbf0 T __wcsftime_l 0000000000057210 W fgetwc_unlocked 0000000000057c10 W fputwc_unlocked 0000000000057210 W getwc_unlocked 0000000000058f50 W getwchar_unlocked 0000000000057c10 W putwc_unlocked 0000000000059ca0 W putwchar_unlocked 000000000006bbf0 W wcsftime_l These functions are available in glibc. #define _GNU_SOURCE #include int main(void) { wint_t (*a0)(FILE *) = getwc_unlocked; wint_t (*a1)(void) = getwchar_unlocked; wint_t (*a2)(FILE *) = fgetwc_unlocked; wint_t (*a3)(wchar_t, FILE *) = fputwc_unlocked; wint_t (*a4)(wchar_t, FILE *) = putwc_unlocked; wint_t (*a5)(wchar_t) = putwchar_unlocked; wchar_t *(*a6)(wchar_t *restrict, int, FILE *restrict) = fgetws_unlocked; int (*a7)(const wchar_t *restrict, FILE *restrict) = fputws_unlocked; size_t (*b0)(wchar_t *restrict, size_t, const wchar_t *restrict, const struct tm *restrict, locale_t) = wcsftime_l; } -- 2.10.0