[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-patches
Subject: ser-pipe.c portability fix
From: phdm () macqel ! be (Philippe De Muyter)
Date: 1999-07-19 1:48:00
Message-ID: 199907190848.KAA21870 () mail ! macqel ! be
[Download RAW message or body]
ser-pipe.c fails to compile on sysV68. Here is a fix.
Mon Jul 19 10:46:18 1999 Philippe De Muyter <phdm@macqel.be>
* ser-pipe.c (sys/wait.h): Include this file only #if HAVE_SYS_WAIT_H.
(STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Macros defined if needed.
--- ./gdb/ser-pipe.c Mon Jul 19 10:25:13 1999
+++ ./gdb/ser-pipe.c Thu Jul 15 13:25:51 1999
@@ -23,12 +23,25 @@
#include "defs.h"
#include "serial.h"
#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#include <sys/socket.h>
#include <sys/time.h>
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+
+/* Define well known filenos if the system does not define them. */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
#endif
#include "signals.h"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic