This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ser-pipe.c portability fix


FYI,

I've checked the attached, along with a mod to configure.in that tests
for socketpair(), into GDB.  This means that things should compile on
your host.  I'll next look at libiberty/socketpair.c

	Andrew


Philippe De Muyter wrote:
> 
> 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"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]