Index: include/stdio.h =================================================================== --- include/stdio.h +++ include/stdio.h @@ -352,44 +352,8 @@ FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); int vdprintf(int, const char * __restrict, __va_list); - -/* - * Every programmer and his dog wrote functions called getline() and dprintf() - * before POSIX.1-2008 came along and decided to usurp the names, so we - * don't prototype them by default unless one of the following is true: - * a) the app has requested them specifically by defining _WITH_GETLINE or - * _WITH_DPRINTF, respectively - * b) the app has requested a POSIX.1-2008 environment via _POSIX_C_SOURCE - * c) the app defines a GNUism such as _BSD_SOURCE or _GNU_SOURCE - */ -#ifndef _WITH_GETLINE -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define _WITH_GETLINE -#elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE >= 200809 -#define _WITH_GETLINE -#endif -#endif -#endif - -#ifdef _WITH_GETLINE ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); -#endif - -#ifndef _WITH_DPRINTF -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define _WITH_DPRINTF -#elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE >= 200809 -#define _WITH_DPRINTF -#endif -#endif -#endif - -#ifdef _WITH_DPRINTF int (dprintf)(int, const char * __restrict, ...); -#endif - #endif /* __POSIX_VISIBLE >= 200809 */ /* Index: lib/libc/stdio/getline.3 =================================================================== --- lib/libc/stdio/getline.3 +++ lib/libc/stdio/getline.3 @@ -34,7 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.Fd "#define _WITH_GETLINE" .In stdio.h .Ft ssize_t .Fn getdelim "char ** restrict linep" "size_t * restrict linecapp" "int delimiter" " FILE * restrict stream" @@ -97,34 +96,6 @@ fwrite(line, linelen, 1, stdout); free(line); .Ed -.Sh COMPATIBILITY -Many application writers used the name -.Va getline -before the -.Fn getline -function was introduced in -.St -p1003.1 , -so a prototype is not provided by default in order to avoid -compatibility problems. -Applications that wish to use the -.Fn getline -function described herein should either request a strict -.St -p1003.1-2008 -environment by defining the macro -.Dv _POSIX_C_SOURCE -to the value 200809 or greater, or by defining the macro -.Dv _WITH_GETLINE , -prior to the inclusion of -.In stdio.h . -For compatibility with GNU libc, defining either -.Dv _BSD_SOURCE -or -.Dv _GNU_SOURCE -prior to the inclusion of -.In stdio.h -will also make -.Fn getline -available. .Sh ERRORS These functions may fail if: .Bl -tag -width Er Index: lib/libc/stdio/printf.3 =================================================================== --- lib/libc/stdio/printf.3 +++ lib/libc/stdio/printf.3 @@ -42,7 +42,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.Fd "#define _WITH_DPRINTF" .In stdio.h .Ft int .Fn printf "const char * restrict format" ... @@ -715,34 +714,6 @@ } .Ed .Sh COMPATIBILITY -Many application writers used the name -.Va dprintf -before the -.Fn dprintf -function was introduced in -.St -p1003.1 , -so a prototype is not provided by default in order to avoid -compatibility problems. -Applications that wish to use the -.Fn dprintf -function described herein should either request a strict -.St -p1003.1-2008 -environment by defining the macro -.Dv _POSIX_C_SOURCE -to the value 200809 or greater, or by defining the macro -.Dv _WITH_DPRINTF , -prior to the inclusion of -.In stdio.h . -For compatibility with GNU libc, defining either -.Dv _BSD_SOURCE -or -.Dv _GNU_SOURCE -prior to the inclusion of -.In stdio.h -will also make -.Fn dprintf -available. -.Pp The conversion formats .Cm \&%D , \&%O , and