xref: /netbsd-src/external/gpl3/gdb/dist/include/fopen-bin.h (revision e663ba6e3a60083e70de702e9d54bf486a57b6a7)
198b9484cSchristos /* Macros for the 'type' part of an fopen, freopen or fdopen.
298b9484cSchristos 
398b9484cSchristos 	<Read|Write>[Update]<Binary file|text file>
498b9484cSchristos 
598b9484cSchristos    This version is for "binary" systems, where text and binary files are
698b9484cSchristos    different.  An example is Mess-Dose.  Many Unix systems could also
798b9484cSchristos    cope with a "b" in the string, indicating binary files, but some reject this
898b9484cSchristos    (and thereby don't conform to ANSI C, but what else is new?).
998b9484cSchristos 
10*e663ba6eSchristos    Copyright (C) 1996-2024 Free Software Foundation, Inc.
11a2e2270fSchristos 
12a2e2270fSchristos    This program is free software; you can redistribute it and/or modify
13a2e2270fSchristos    it under the terms of the GNU General Public License as published by
14a2e2270fSchristos    the Free Software Foundation; either version 2, or (at your option)
15a2e2270fSchristos    any later version.
16a2e2270fSchristos 
17a2e2270fSchristos    This program is distributed in the hope that it will be useful,
18a2e2270fSchristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
19a2e2270fSchristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20a2e2270fSchristos    GNU General Public License for more details.
21a2e2270fSchristos 
22a2e2270fSchristos    You should have received a copy of the GNU General Public License
23a2e2270fSchristos    along with this program; if not, write to the Free Software
24a2e2270fSchristos    Foundation, Inc., 51 Franklin Street - Fifth Floor,
25a2e2270fSchristos    Boston, MA 02110-1301, USA.  */
26a2e2270fSchristos 
27a2e2270fSchristos /* This file is designed for inclusion by host-dependent .h files.  No
2898b9484cSchristos    user application should include it directly, since that would make
2998b9484cSchristos    the application unable to be configured for both "same" and "binary"
3098b9484cSchristos    variant systems.  */
3198b9484cSchristos 
3298b9484cSchristos #define FOPEN_RB	"rb"
3398b9484cSchristos #define FOPEN_WB 	"wb"
3498b9484cSchristos #define FOPEN_AB 	"ab"
3598b9484cSchristos #define FOPEN_RUB 	"r+b"
3698b9484cSchristos #define FOPEN_WUB 	"w+b"
3798b9484cSchristos #define FOPEN_AUB 	"a+b"
3898b9484cSchristos 
3998b9484cSchristos #define FOPEN_RT	"r"
4098b9484cSchristos #define FOPEN_WT 	"w"
4198b9484cSchristos #define FOPEN_AT 	"a"
4298b9484cSchristos #define FOPEN_RUT 	"r+"
4398b9484cSchristos #define FOPEN_WUT 	"w+"
4498b9484cSchristos #define FOPEN_AUT 	"a+"
45