Bug 12631 - wcp[n]cpy are required by POSIX 2008
Summary: wcp[n]cpy are required by POSIX 2008
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.13
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-01 21:42 UTC by Eric Blake
Modified: 2014-06-27 13:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Blake 2011-04-01 21:42:51 UTC
$ printf '#include <wchar.h>\n' | gcc -D_POSIX_C_SOURCE=200809L -E -\
  | grep 'wcpn\?cpy'
$ printf '#include <wchar.h>\n' | gcc -D_GNU_SOURCE=1 -E -\
  | grep 'wcpn\?cpy'
extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
$

Oops - POSIX 2008 requires these declarations:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcpcpy.html
  
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=dbb0472f removed them in error.  Yes, they should _not_ be visible when going for strict ANSI compliance, but that's the point of _POSIX_C_SOURCE - to request POSIX extensions to ANSI C.
Comment 1 Ulrich Drepper 2011-04-01 22:37:03 UTC
Changed in git.