summaryrefslogtreecommitdiff
path: root/src/sysstdio.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-07-13 12:31:41 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-07-13 16:53:21 -0700
commit9a34591ddd5ef481af5bad1fd0b76c39fce4e8e3 (patch)
treec5f2b9c885ab9ee375dea5f980bd7bccb388a2ee /src/sysstdio.h
parent1178f98f2c0973dd1f8a66cbb4de20c0d7af3271 (diff)
downloademacs-9a34591ddd5ef481af5bad1fd0b76c39fce4e8e3.tar.gz
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/>. */
#define EMACS_SYSSTDIO_H
#include <fcntl.h>
+#include <limits.h>
#include <stdio.h>
#include "unlocked-io.h"
@@ -38,4 +39,8 @@ extern void close_output_streams (void);
# define FOPEN_TEXT ""
#endif
+#ifndef PIPE_BUF
+ #define PIPE_BUF MAX_ALLOCA
+#endif
+
#endif /* EMACS_SYSSTDIO_H */