xref: /openbsd-src/gnu/usr.bin/binutils/include/fopen-bin.h (revision 2159047f7a97bd07d66507696a8b038f6aef0509)
1*2159047fSniklas /* Macros for the 'type' part of an fopen, freopen or fdopen.
2*2159047fSniklas 
3*2159047fSniklas 	<Read|Write>[Update]<Binary file|text file>
4*2159047fSniklas 
5*2159047fSniklas    This version is for "binary" systems, where text and binary files are
6*2159047fSniklas    different.  An example is Mess-Dose.  Many Unix systems could also
7*2159047fSniklas    cope with a "b" in the string, indicating binary files, but some reject this
8*2159047fSniklas    (and thereby don't conform to ANSI C, but what else is new?).
9*2159047fSniklas 
10*2159047fSniklas    This file is designed for inclusion by host-dependent .h files.  No
11*2159047fSniklas    user application should include it directly, since that would make
12*2159047fSniklas    the application unable to be configured for both "same" and "binary"
13*2159047fSniklas    variant systems.  */
14*2159047fSniklas 
15*2159047fSniklas #define FOPEN_RB	"rb"
16*2159047fSniklas #define FOPEN_WB 	"wb"
17*2159047fSniklas #define FOPEN_AB 	"ab"
18*2159047fSniklas #define FOPEN_RUB 	"r+b"
19*2159047fSniklas #define FOPEN_WUB 	"w+b"
20*2159047fSniklas #define FOPEN_AUB 	"a+b"
21*2159047fSniklas 
22*2159047fSniklas #define FOPEN_RT	"r"
23*2159047fSniklas #define FOPEN_WT 	"w"
24*2159047fSniklas #define FOPEN_AT 	"a"
25*2159047fSniklas #define FOPEN_RUT 	"r+"
26*2159047fSniklas #define FOPEN_WUT 	"w+"
27*2159047fSniklas #define FOPEN_AUT 	"a+"
28