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