Partial fix for problem reported by Don Bowman.
authorJim Wilson <wilson@cygnus.com>
Thu, 23 Apr 1998 19:57:57 +0000 (19:57 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 23 Apr 1998 19:57:57 +0000 (12:57 -0700)
* frame.c, libgcc2.c (stdlib.h, unistd.h): Don't include when
inhibit_libc is defined.

From-SVN: r19390

gcc/ChangeLog
gcc/frame.c
gcc/libgcc2.c

index d94a40f13caf171ee150d59fa47248d830bbe828..dfb02184b090f1c14b784262586ff8ce9afdf381 100644 (file)
@@ -1,5 +1,8 @@
 1998-04-23  Jim Wilson  <wilson@cygnus.com>
 
+       * frame.c, libgcc2.c (stdlib.h, unistd.h): Don't include when
+       inhibit_libc is defined.
+
        * c-aux-info.c (gen_type): Use DECL_NAME only for TYPE_DECL.
 
 Thu Apr 23 19:09:33 1998  Jim Wilson  <wilson@cygnus.com>
index 4bd1fee66485c97708cfe1f0488fc973d1cadcb9..bde83d276f65ab8f579e8cc87078b521fd7527d6 100644 (file)
@@ -33,9 +33,15 @@ Boston, MA 02111-1307, USA.  */
 
 #include "tconfig.h"
 
+/* We disable this when inhibit_libc, so that gcc can still be built without
+   needing header files first.  */
+/* ??? This is not a good solution, since prototypes may be required in
+   some cases for correct code.  See also libgcc2.c.  */
+#ifndef inhibit_libc
 /* fixproto guarantees these system headers exist. */
 #include <stdlib.h>
 #include <unistd.h>
+#endif
 
 #include "defaults.h"
 
index ffbd1590192eea9d92e0b9ddf162703e724c6032..a1525baf26bb47e9949cabf070cdefb763f01605 100644 (file)
@@ -32,9 +32,15 @@ Boston, MA 02111-1307, USA.  */
 
 #include "tconfig.h"
 
+/* We disable this when inhibit_libc, so that gcc can still be built without
+   needing header files first.  */
+/* ??? This is not a good solution, since prototypes may be required in
+   some cases for correct code.  See also frame.c.  */
+#ifndef inhibit_libc
 /* fixproto guarantees these system headers exist. */
 #include <stdlib.h>
 #include <unistd.h>
+#endif
 
 #include "machmode.h"
 #include "defaults.h"