diff options
author | 2015-02-09 23:02:25 +0000 | |
---|---|---|
committer | 2015-02-09 23:02:25 +0000 | |
commit | 3a41feed0274f7540de8d5b897387976c38c9da4 (patch) | |
tree | 5aaff7ec7b9681c52a85f8f94174c266ae8fc236 | |
parent | clean up flags++ instances around getopt() (diff) | |
download | wireguard-openbsd-3a41feed0274f7540de8d5b897387976c38c9da4.tar.xz wireguard-openbsd-3a41feed0274f7540de8d5b897387976c38c9da4.zip |
Protect fgetwln(), wcslcat() and wcslcpy() with __BSD_VISIBLE
OK tedu@ kettenis@
-rw-r--r-- | include/wchar.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/wchar.h b/include/wchar.h index b2513e7e432..54e21bc4b47 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wchar.h,v 1.27 2015/01/12 20:58:07 millert Exp $ */ +/* $OpenBSD: wchar.h,v 1.28 2015/02/09 23:02:25 millert Exp $ */ /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /*- @@ -152,10 +152,6 @@ wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t) wchar_t *wmemset(wchar_t *, wchar_t, size_t) __attribute__ ((__bounded__(__wcstring__,1,3))); -size_t wcslcat(wchar_t *, const wchar_t *, size_t) - __attribute__ ((__bounded__(__wcstring__,1,3))); -size_t wcslcpy(wchar_t *, const wchar_t *, size_t) - __attribute__ ((__bounded__(__wcstring__,1,3))); int wcswidth(const wchar_t *, size_t); int wctob(wint_t); int wcwidth(wchar_t); @@ -201,7 +197,6 @@ unsigned long long int wcstoull(const wchar_t * __restrict, wint_t ungetwc(wint_t, FILE *); wint_t fgetwc(FILE *); -wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); wchar_t *fgetws(wchar_t * __restrict, int, FILE * __restrict) __attribute__ ((__bounded__(__wcstring__,1,2))); wint_t getwc(FILE *); @@ -228,6 +223,14 @@ int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, __va_list); int vwscanf(const wchar_t * __restrict, __va_list); int wscanf(const wchar_t * __restrict, ...); +#if __BSD_VISIBLE +wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); +size_t wcslcat(wchar_t *, const wchar_t *, size_t) + __attribute__ ((__bounded__(__wcstring__,1,3))); +size_t wcslcpy(wchar_t *, const wchar_t *, size_t) + __attribute__ ((__bounded__(__wcstring__,1,3))); +#endif + #define getwc(f) fgetwc(f) #define getwchar() getwc(stdin) #define putwc(wc, f) fputwc((wc), (f)) |