aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysstdio.h
diff options
context:
space:
mode:
authorPaul Eggert2019-07-13 12:31:41 -0700
committerPaul Eggert2019-07-13 16:53:21 -0700
commit9a34591ddd5ef481af5bad1fd0b76c39fce4e8e3 (patch)
treec5f2b9c885ab9ee375dea5f980bd7bccb388a2ee /src/sysstdio.h
parent1178f98f2c0973dd1f8a66cbb4de20c0d7af3271 (diff)
downloademacs-9a34591ddd5ef481af5bad1fd0b76c39fce4e8e3.tar.gz
emacs-9a34591ddd5ef481af5bad1fd0b76c39fce4e8e3.zip
Use a better buffer size in emacs_perror
* src/sysdep.c (emacs_perror): Since the buffer is for avoiding interleaving, size it via PIPE_BUF not BUFSIZ. * src/sysstdio.h (PIPE_BUF): Provide a default.
Diffstat (limited to 'src/sysstdio.h')
-rw-r--r--src/sysstdio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sysstdio.h b/src/sysstdio.h
index 5303e8a15b2..637f5fdfa6d 100644
--- a/src/sysstdio.h
+++ b/src/sysstdio.h
@@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
21#define EMACS_SYSSTDIO_H 21#define EMACS_SYSSTDIO_H
22 22
23#include <fcntl.h> 23#include <fcntl.h>
24#include <limits.h>
24#include <stdio.h> 25#include <stdio.h>
25#include "unlocked-io.h" 26#include "unlocked-io.h"
26 27
@@ -38,4 +39,8 @@ extern void close_output_streams (void);
38# define FOPEN_TEXT "" 39# define FOPEN_TEXT ""
39#endif 40#endif
40 41
42#ifndef PIPE_BUF
43 #define PIPE_BUF MAX_ALLOCA
44#endif
45
41#endif /* EMACS_SYSSTDIO_H */ 46#endif /* EMACS_SYSSTDIO_H */