CVS-19981211: Patch to prevent multiple inclusion if <sys/stat.h>

Dave Brolley brolley@cygnus.com
Fri Dec 11 09:27:00 GMT 1998


Go ahead and fix all instances where system.h and sys/stat.h are both included.

Dave

Manfred Hollstein wrote:

> The include files on my m68k-motorola-sysv system are not protected
> against multiple inclusion. The patch below fixes a problem I got
> today while compiling cccp.c:
>
> In file included from ../../egcs-19981211/gcc/cccp.c:31:
> /u/b60/manfred/gnu/delta/lib/gcc-lib/delta/egcs-2.90.27/include/sys/stat.h:13: redefinition of `struct stat'
>
> manfred
>
> 1998-12-11  Manfred Hollstein  <manfred@s-direktnet.de>
>
>         * cccp.c: Do not #include <sys/stat.h> here; this is already done
>         by "system.h".
>
> diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19981211.orig/gcc/cccp.c egcs-19981211/gcc/cccp.c
> --- egcs-19981211.orig/gcc/cccp.c       Thu Dec 10 10:47:21 1998
> +++ egcs-19981211/gcc/cccp.c    Fri Dec 11 10:56:00 1998
> @@ -28,7 +28,6 @@ Boston, MA 02111-1307, USA. */
>  #define PRINTF_PROTO_4(ARGS) PRINTF_PROTO(ARGS, 4, 5)
>
>  #include "system.h"
> -#include <sys/stat.h>
>  #include <signal.h>
>
>  #ifdef HAVE_SYS_RESOURCE_H






More information about the Gcc-patches mailing list