sysstdio.h 1.23 KB
Newer Older
1 2
/* Standard I/O for Emacs.

3
Copyright 2013-2020 Free Software Foundation, Inc.
4 5 6 7 8

This file is part of GNU Emacs.

GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
9 10
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
11 12 13 14 15 16 17

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
18
along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
19

20 21 22
#ifndef EMACS_SYSSTDIO_H
#define EMACS_SYSSTDIO_H

Eli Zaretskii's avatar
Eli Zaretskii committed
23
#include <stdarg.h>
24
#include <fcntl.h>
25
#include <limits.h>
26
#include <stdio.h>
27
#include "unlocked-io.h"
28

29
extern FILE *emacs_fopen (char const *, char const *);
30 31
extern void errputc (int);
extern void errwrite (void const *, ptrdiff_t);
32
extern void close_output_streams (void);
33 34 35 36 37 38 39 40

#if O_BINARY
# define FOPEN_BINARY "b"
# define FOPEN_TEXT "t"
#else
# define FOPEN_BINARY ""
# define FOPEN_TEXT ""
#endif
41

42 43 44 45
#ifndef PIPE_BUF
 #define PIPE_BUF MAX_ALLOCA
#endif

46
#endif /* EMACS_SYSSTDIO_H */