changeset 73:d24aeffde572

GNU shell utilities
author Jim Meyering <jim@meyering.net>
date Mon, 04 Oct 1993 21:07:58 +0000
parents 2323794dc2ce
children 4da3615c731e
files lib/alloca.c lib/getopt.c lib/getopt1.c lib/xmalloc.c
diffstat 4 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/alloca.c
+++ b/lib/alloca.c
@@ -22,8 +22,12 @@
    your main control loop, etc. to force garbage collection.  */
 
 #ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
+#include <config.h>
+#else
 #include "config.h"
 #endif
+#endif
 
 /* If compiling with GCC 2, this file's not needed.  */
 #if !defined (__GNUC__) || __GNUC__ < 2
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -21,10 +21,14 @@
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
 /* We use <config.h> instead of "config.h" so that a compilation
    using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
-   (which it would do because getopt.c was found in $srcdir).  */
+   (which it would do because it found this file in $srcdir).  */
 #include <config.h>
+#else
+#include "config.h"
+#endif
 #endif
 
 #ifndef __STDC__
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -17,10 +17,14 @@
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
 /* We use <config.h> instead of "config.h" so that a compilation
    using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
-   (which it would do because getopt1.c was found in $srcdir).  */
+   (which it would do because it found this file in $srcdir).  */
 #include <config.h>
+#else
+#include "config.h"
+#endif
 #endif
 
 #include "getopt.h"
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -25,10 +25,11 @@
 #define VOID char
 #endif
 
+#include <sys/types.h>
+
 #if STDC_HEADERS
 #include <stdlib.h>
 #else
-#include <sys/types.h>
 VOID *malloc ();
 VOID *realloc ();
 void free ();