xref: /dflybsd-src/contrib/binutils-2.27/include/fopen-same.h (revision e656dc90e3d65d744d534af2f5ea88cf8101ebcf)
1*a9fa9459Szrj /* Macros for the 'type' part of an fopen, freopen or fdopen.
2*a9fa9459Szrj 
3*a9fa9459Szrj 	<Read|Write>[Update]<Binary file|text file>
4*a9fa9459Szrj 
5*a9fa9459Szrj    This version is for "same" systems, where text and binary files are
6*a9fa9459Szrj    the same.  An example is Unix.  Many Unix systems could also add a
7*a9fa9459Szrj    "b" to the string, indicating binary files, but some reject this
8*a9fa9459Szrj    (and thereby don't conform to ANSI C, but what else is new?).
9*a9fa9459Szrj 
10*a9fa9459Szrj    Copyright (C) 1996-2016 Free Software Foundation, Inc.
11*a9fa9459Szrj 
12*a9fa9459Szrj    This program is free software; you can redistribute it and/or modify
13*a9fa9459Szrj    it under the terms of the GNU General Public License as published by
14*a9fa9459Szrj    the Free Software Foundation; either version 2, or (at your option)
15*a9fa9459Szrj    any later version.
16*a9fa9459Szrj 
17*a9fa9459Szrj    This program is distributed in the hope that it will be useful,
18*a9fa9459Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
19*a9fa9459Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20*a9fa9459Szrj    GNU General Public License for more details.
21*a9fa9459Szrj 
22*a9fa9459Szrj    You should have received a copy of the GNU General Public License
23*a9fa9459Szrj    along with this program; if not, write to the Free Software
24*a9fa9459Szrj    Foundation, Inc., 51 Franklin Street - Fifth Floor,
25*a9fa9459Szrj    Boston, MA 02110-1301, USA.  */
26*a9fa9459Szrj 
27*a9fa9459Szrj /* This file is designed for inclusion by host-dependent .h files.  No
28*a9fa9459Szrj    user application should include it directly, since that would make
29*a9fa9459Szrj    the application unable to be configured for both "same" and "binary"
30*a9fa9459Szrj    variant systems.  */
31*a9fa9459Szrj 
32*a9fa9459Szrj #define FOPEN_RB	"r"
33*a9fa9459Szrj #define FOPEN_WB 	"w"
34*a9fa9459Szrj #define FOPEN_AB 	"a"
35*a9fa9459Szrj #define FOPEN_RUB 	"r+"
36*a9fa9459Szrj #define FOPEN_WUB 	"w+"
37*a9fa9459Szrj #define FOPEN_AUB 	"a+"
38*a9fa9459Szrj 
39*a9fa9459Szrj #define FOPEN_RT	"r"
40*a9fa9459Szrj #define FOPEN_WT 	"w"
41*a9fa9459Szrj #define FOPEN_AT 	"a"
42*a9fa9459Szrj #define FOPEN_RUT 	"r+"
43*a9fa9459Szrj #define FOPEN_WUT 	"w+"
44*a9fa9459Szrj #define FOPEN_AUT 	"a+"
45