]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/stdio.3.patch
Libc-594.1.4.tar.gz
[apple/libc.git] / stdio / FreeBSD / stdio.3.patch
1 --- stdio.3 2004-11-25 11:38:35.000000000 -0800
2 +++ stdio.3.edit 2006-09-06 16:18:21.000000000 -0700
3 @@ -45,6 +45,20 @@
4 .Vt FILE *stdin ;
5 .Vt FILE *stdout ;
6 .Vt FILE *stderr ;
7 +.Pp
8 +Note:
9 +The current implementation does not allow these variables
10 +to be evaluated at C compile/link time.
11 +That is, a runtime calculation must be performed, such as:
12 +.Bd -literal -offset indent
13 +#include <stdio.h>
14 +
15 +static FILE *var;
16 +
17 +int main() {
18 + var = stdout;
19 +}
20 +.Ed
21 .Sh DESCRIPTION
22 The standard
23 .Tn I/O
24 @@ -232,11 +246,21 @@
25 .Dv putchar_unlocked
26 exist and will be used if the macro
27 definitions are explicitly removed.
28 +.Sh LEGACY SYNOPSIS
29 +The -D_NONSTD_SOURCE flag can be used
30 +to allow stdin, stdout, and/or stderr
31 +to be evaluated at compile/link time, as:
32 +.Bd -literal -offset indent
33 +#include <stdio.h>
34 +
35 +static FILE *var = stdout;
36 +.Ed
37 .Sh SEE ALSO
38 .Xr close 2 ,
39 .Xr open 2 ,
40 .Xr read 2 ,
41 -.Xr write 2
42 +.Xr write 2 ,
43 +.Xr compat 5
44 .Sh BUGS
45 The standard buffered functions do not interact well with certain other
46 library and system functions, especially
47 @@ -250,7 +274,9 @@
48 .Bl -column "Description"
49 .It Sy "Function Description"
50 .It "asprintf formatted output conversion"
51 +.It ""
52 .It "clearerr check and reset stream status"
53 +.It ""
54 .It "fclose close a stream"
55 .It "fdopen stream open functions"
56 .It "feof check and reset stream status"
57 @@ -282,15 +308,18 @@
58 .It "fwopen open a stream"
59 .It "fwprintf formatted wide character output conversion"
60 .It "fwrite binary stream input/output"
61 +.It ""
62 .It "getc get next character or word from input stream"
63 .It "getchar get next character or word from input stream"
64 .It "gets get a line from a stream"
65 .It "getw get next character or word from input stream"
66 .It "getwc get next wide character from input stream"
67 .It "getwchar get next wide character from input stream"
68 +.It ""
69 .It "mkdtemp create unique temporary directory"
70 .It "mkstemp create unique temporary file"
71 .It "mktemp create unique temporary file"
72 +.It ""
73 .It "perror system error messages"
74 .It "printf formatted output conversion"
75 .It "putc output a character or word to a stream"
76 @@ -299,8 +328,10 @@
77 .It "putw output a character or word to a stream"
78 .It "putwc output a wide character to a stream"
79 .It "putwchar output a wide character to a stream"
80 +.It ""
81 .It "remove remove directory entry"
82 .It "rewind reposition a stream"
83 +.It ""
84 .It "scanf input format conversion"
85 .It "setbuf stream buffering operations"
86 .It "setbuffer stream buffering operations"
87 @@ -313,11 +344,14 @@
88 .It "swprintf formatted wide character output conversion"
89 .It "sys_errlist system error messages"
90 .It "sys_nerr system error messages"
91 +.It ""
92 .It "tempnam temporary file routines"
93 .It "tmpfile temporary file routines"
94 .It "tmpnam temporary file routines"
95 +.It ""
96 .It "ungetc un-get character from input stream"
97 .It "ungetwc un-get wide character from input stream"
98 +.It ""
99 .It "vasprintf formatted output conversion"
100 .It "vfprintf formatted output conversion"
101 .It "vfscanf input format conversion"
102 @@ -329,5 +363,6 @@
103 .It "vsscanf input format conversion"
104 .It "vswprintf formatted wide character output conversion"
105 .It "vwprintf formatted wide character output conversion"
106 +.It ""
107 .It "wprintf formatted wide character output conversion"
108 .El