bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bison/lib/subpipe patches to meet gnulib standards


From: Paul Eggert
Subject: bison/lib/subpipe patches to meet gnulib standards
Date: Tue, 27 Apr 2004 23:32:03 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I installed the following patches so that subpipe.c and subpipe.h are
more suitable as modules for inclusion in gnulib.

2004-04-27  Paul Eggert  <address@hidden>

        * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
        so that this include file can stand alone.
        * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
        does this now.  Include subpipe.h first after config.h, to
        test whether it can stand alone.
        Assume C89 or better, as follows.  Do not declare errno.
        Include <stdlib.h> unconditionally.  Do not define EXIT_FAILURE.

Index: lib/subpipe.c
===================================================================
RCS file: /cvsroot/bison/bison/lib/subpipe.c,v
retrieving revision 1.1
diff -p -u -r1.1 subpipe.c
--- lib/subpipe.c       20 Oct 2002 06:28:23 -0000      1.1
+++ lib/subpipe.c       28 Apr 2004 06:19:59 -0000
@@ -1,6 +1,6 @@
 /* Subprocesses with pipes.
 
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,30 +23,16 @@
 # include <config.h>
 #endif
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include "subpipe.h"
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #include <signal.h>
 #if ! defined SIGCHLD && defined SIGCLD
 # define SIGCHLD SIGCLD
 #endif
 
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-/* The following test is to work around the gross typo in
-   systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE
-   is defined to 0, not 1.  */
-#if ! EXIT_FAILURE
-# undef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
+#include <stdlib.h>
 
 #if HAVE_UNISTD_H
 # include <unistd.h>
@@ -85,8 +71,6 @@ extern int errno;
 
 #include "gettext.h"
 #define _(Msgid)  gettext (Msgid)
-
-#include "subpipe.h"
 
 
 /* Initialize this module.  */
Index: lib/subpipe.h
===================================================================
RCS file: /cvsroot/bison/bison/lib/subpipe.h,v
retrieving revision 1.1
diff -p -u -r1.1 subpipe.h
--- lib/subpipe.h       20 Oct 2002 06:28:10 -0000      1.1
+++ lib/subpipe.h       28 Apr 2004 06:19:59 -0000
@@ -1,5 +1,5 @@
 /* Subprocesses with pipes.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -20,6 +20,10 @@
 
 /* Written by Paul Eggert <address@hidden>
    and Florian Krohm <address@hidden>.  */
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 
 void init_subpipe (void);
 pid_t create_subpipe (char const * const *, int[2]);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]