This is the mail archive of the bfd@sourceware.cygnus.com mailing list for the bfd project.


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

Patch for gas-980119 on m68k-motorola-sysv


The   include files on  this system  aren't protected against multiple
inclusion; especially  <sys/stat.h> causes much grief. Another problem
is that gcc's fixed <stdlib.h> doesn't define  the `size_t' type where
-  at least - dwarf2.c  expects it to  be defined; anyway, IMHO and as
far  as I understood the  ANSI-C definition, it   should be defined in
<stddef.h> or, as a last resort, in <sys/types.h>.

This patch fixes these problems:

in bfd/:
Tue Jan 20 17:13:50 1998  Manfred Hollstein  <manfred@s-direktnet.de>

	* dwarf2.c: Include config.h to get the proper HAVE_..._H macros
	defined; then include stddef.h or sys/types.h to get size_t defined.

in ld/:
Wed Jan 21 17:49:29 1998  Manfred Hollstein  <manfred@s-direktnet.de>

	* emultempl/sunos.em: Don't include sys/types.h and sys/stat.h here;
	they are included already via sysdep.h.

diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gas-980119.orig/bfd/dwarf2.c gas-980119/bfd/dwarf2.c
*** gas-980119.orig/bfd/dwarf2.c	Mon Jan 19 10:12:36 1998
--- gas-980119/bfd/dwarf2.c	Tue Jan 20 16:21:06 1998
*************** You should have received a copy of the G
*** 28,35 ****
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
  
  #include <stdlib.h>
! 
  #include <stdio.h>
  #include "bfd.h"
  #include "libbfd.h"
--- 28,42 ----
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
  
+ #include "config.h"
+ #ifdef HAVE_STDDEF_H
+ #include <stddef.h>
+ #else
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_STDLIB_H
  #include <stdlib.h>
! #endif
  #include <stdio.h>
  #include "bfd.h"
  #include "libbfd.h"
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gas-980119.orig/ld/emultempl/sunos.em gas-980119/ld/emultempl/sunos.em
*** gas-980119.orig/ld/emultempl/sunos.em	Mon Jan 19 10:15:07 1998
--- gas-980119/ld/emultempl/sunos.em	Wed Jan 21 08:18:24 1998
*************** Foundation, Inc., 59 Temple Place - Suit
*** 27,34 ****
  #define TARGET_IS_${EMULATION_NAME}
  
  #include <ctype.h>
- #include <sys/types.h>
- #include <sys/stat.h>
  
  #include "bfd.h"
  #include "sysdep.h"
--- 27,32 ----