K&R fixes for HPUX

Alan Modra amodra@bigpond.net.au
Tue Aug 20 16:51:00 GMT 2002


On Tue, Aug 20, 2002 at 02:27:16PM -0400, John David Anglin wrote:
> 	* readelf.c (parse_args): Change debug_dump_opt to static.
> 
> 	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
> 	argument declaration.
> 
> 	* gmon_io.c (gmon_io_read_64, gmon_io_write_64): Define only if
> 	BFD_HOST_U_64_BIT is defined.
> 	(gmon_io_read_vma, gmon_io_write_vma): Add ifdefs.
> 
> 	* ldlang.c (offsetof): Define if not defined.

Committed.

> 	* config/tc-hppa.c (pa_dwarf2_directive_file): Add wrapper for function
> 	dwarf2_directive_file.

I applied this alternative instead.

gas/ChangeLog
	* config/tc-arc.c (md_pseudo_table <dwarf2_directive_file>): Cast. 
	* config/tc-frv.c: Likewise.
	* config/tc-hppa.c: Likewise.
	* config/tc-ia64.c: Likewise.
	* config/tc-ip2k.c: Likewise.
	* config/tc-m68hc11.c: Likewise.
	* config/tc-m68k.c: Likewise.
	* config/tc-mmix.c: Likewise.
	* config/tc-mn10300.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-v850.c: Likewise.

Index: gas/config/tc-arc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arc.c,v
retrieving revision 1.19
diff -u -p -r1.19 tc-arc.c
--- gas/config/tc-arc.c	15 Nov 2001 21:28:54 -0000	1.19
+++ gas/config/tc-arc.c	20 Aug 2002 23:25:54 -0000
@@ -1,5 +1,5 @@
 /* tc-arc.c -- Assembler for the ARC
-   Copyright 1994, 1995, 1997, 1999, 2000, 2001
+   Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
 
@@ -93,7 +93,7 @@ const pseudo_typeS md_pseudo_table[] = {
   { "option", arc_option, 0 },
   { "cpu", arc_option, 0 },
   { "block", s_space, 0 },
-  { "file", dwarf2_directive_file, 0 },
+  { "file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
   { "loc", dwarf2_directive_loc, 0 },
   { "extcondcode", arc_extoper, 0 },
   { "extcoreregister", arc_extoper, 1 },
Index: gas/config/tc-frv.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-frv.c,v
retrieving revision 1.1
diff -u -p -r1.1 tc-frv.c
--- gas/config/tc-frv.c	18 Jun 2002 21:15:19 -0000	1.1
+++ gas/config/tc-frv.c	20 Aug 2002 23:26:09 -0000
@@ -185,7 +185,7 @@ const pseudo_typeS md_pseudo_table[] =
   { "eflags",	frv_set_flags,		0 },
   { "word",	cons,			4 },
   { "picptr",	frv_pic_ptr,		4 },
-  { "file",	dwarf2_directive_file,	0 },
+  { "file",	(void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
   { "loc",	dwarf2_directive_loc,	0 },
   { NULL, 	NULL,			0 }
 };
Index: gas/config/tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.97
diff -u -p -r1.97 tc-hppa.c
--- gas/config/tc-hppa.c	6 Jun 2002 06:50:12 -0000	1.97
+++ gas/config/tc-hppa.c	20 Aug 2002 23:26:15 -0000
@@ -668,7 +668,7 @@ const pseudo_typeS md_pseudo_table[] =
   {"exit", pa_exit, 0},
   {"export", pa_export, 0},
 #ifdef OBJ_ELF
-  {"file", dwarf2_directive_file, 0 },
+  {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
 #endif
   {"fill", pa_fill, 0},
   {"float", pa_float_cons, 'f'},
Index: gas/config/tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.69
diff -u -p -r1.69 tc-ia64.c
--- gas/config/tc-ia64.c	23 May 2002 13:12:47 -0000	1.69
+++ gas/config/tc-ia64.c	20 Aug 2002 23:26:33 -0000
@@ -4827,7 +4827,7 @@ const pseudo_typeS md_pseudo_table[] =
     { "body", dot_body, 0 },
     { "prologue", dot_prologue, 0 },
     { "endp", dot_endp, 0 },
-    { "file", dwarf2_directive_file, 0 },
+    { "file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
     { "loc", dwarf2_directive_loc, 0 },
 
     { "fframe", dot_fframe, 0 },
Index: gas/config/tc-ip2k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ip2k.c,v
retrieving revision 1.1
diff -u -p -r1.1 tc-ip2k.c
--- gas/config/tc-ip2k.c	19 Jul 2002 07:52:39 -0000	1.1
+++ gas/config/tc-ip2k.c	20 Aug 2002 23:26:34 -0000
@@ -66,7 +66,7 @@ static void ip2k_elf_section_rtn (int);
 /* The target specific pseudo-ops which we support.  */
 const pseudo_typeS md_pseudo_table[] =
 {
-    { "file",	dwarf2_directive_file,	0 },
+    { "file",	(void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
     { "loc",	dwarf2_directive_loc,	0 },
     { "text",   ip2k_elf_section_text,  0 },
     { "sect",   ip2k_elf_section_rtn,   0 },
Index: gas/config/tc-m68hc11.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68hc11.c,v
retrieving revision 1.27
diff -u -p -r1.27 tc-m68hc11.c
--- gas/config/tc-m68hc11.c	13 Aug 2002 22:20:50 -0000	1.27
+++ gas/config/tc-m68hc11.c	20 Aug 2002 23:26:38 -0000
@@ -261,7 +261,7 @@ const pseudo_typeS md_pseudo_table[] = {
   {"rmb", s_space, 0},
 
   /* Dwarf2 support for Gcc.  */
-  {"file", dwarf2_directive_file, 0},
+  {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
   {"loc", dwarf2_directive_loc, 0},
 
   /* Motorola ALIS.  */
Index: gas/config/tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.39
diff -u -p -r1.39 tc-m68k.c
--- gas/config/tc-m68k.c	8 Jun 2002 07:37:15 -0000	1.39
+++ gas/config/tc-m68k.c	20 Aug 2002 23:26:42 -0000
@@ -556,7 +556,7 @@ const pseudo_typeS md_pseudo_table[] =
 
 #ifdef OBJ_ELF
   /* Dwarf2 support for Gcc.  */
-  {"file", dwarf2_directive_file, 0},
+  {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
   {"loc", dwarf2_directive_loc, 0},
 #endif
 
Index: gas/config/tc-mmix.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mmix.c,v
retrieving revision 1.7
diff -u -p -r1.7 tc-mmix.c
--- gas/config/tc-mmix.c	9 May 2002 00:33:09 -0000	1.7
+++ gas/config/tc-mmix.c	20 Aug 2002 23:26:56 -0000
@@ -345,7 +345,7 @@ const pseudo_typeS md_pseudo_table[] =
    {"local", mmix_s_local, 1},
 
    /* Support DWARF2 debugging info.  */
-   {"file", dwarf2_directive_file, 0},
+   {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
    {"loc", dwarf2_directive_loc, 0},
 
    {NULL, 0, 0}
Index: gas/config/tc-mn10300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mn10300.c,v
retrieving revision 1.36
diff -u -p -r1.36 tc-mn10300.c
--- gas/config/tc-mn10300.c	11 May 2002 09:53:49 -0000	1.36
+++ gas/config/tc-mn10300.c	20 Aug 2002 23:26:58 -0000
@@ -123,7 +123,7 @@ size_t md_longopts_size = sizeof (md_lon
 /* The target specific pseudo-ops which we support.  */
 const pseudo_typeS md_pseudo_table[] =
 {
-  { "file",     dwarf2_directive_file,  0 },
+  { "file",     (void (*) PARAMS ((int))) dwarf2_directive_file,  0 },
   { "loc",      dwarf2_directive_loc,   0 },
   { "am30",	set_arch_mach,		AM30 },
   { "am33",	set_arch_mach,		AM33 },
Index: gas/config/tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.68
diff -u -p -r1.68 tc-sh.c
--- gas/config/tc-sh.c	19 Jun 2002 14:31:07 -0000	1.68
+++ gas/config/tc-sh.c	20 Aug 2002 23:27:09 -0000
@@ -136,7 +136,7 @@ const pseudo_typeS md_pseudo_table[] =
   {"4byte", s_uacons, 4},
   {"8byte", s_uacons, 8},
 #ifdef BFD_ASSEMBLER
-  {"file", dwarf2_directive_file, 0 },
+  {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
   {"loc", dwarf2_directive_loc, 0 },
 #endif
 #ifdef HAVE_SH64
Index: gas/config/tc-sparc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sparc.c,v
retrieving revision 1.41
diff -u -p -r1.41 tc-sparc.c
--- gas/config/tc-sparc.c	8 Jun 2002 07:37:15 -0000	1.41
+++ gas/config/tc-sparc.c	20 Aug 2002 23:27:12 -0000
@@ -159,7 +159,7 @@ const pseudo_typeS md_pseudo_table[] =
   {"uaword", s_uacons, 4},
   {"uaxword", s_uacons, 8},
 #ifdef OBJ_ELF
-  {"file", dwarf2_directive_file, 0},
+  {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
   {"loc", dwarf2_directive_loc, 0},
   /* These are specific to sparc/svr4.  */
   {"2byte", s_uacons, 2},
Index: gas/config/tc-v850.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-v850.c,v
retrieving revision 1.23
diff -u -p -r1.23 tc-v850.c
--- gas/config/tc-v850.c	16 Aug 2002 07:01:47 -0000	1.23
+++ gas/config/tc-v850.c	20 Aug 2002 23:27:15 -0000
@@ -493,7 +493,7 @@ const pseudo_typeS md_pseudo_table[] = {
   { "call_table_text",	v850_seg,		CALL_TABLE_TEXT_SECTION	},
   { "v850e",		set_machine,		bfd_mach_v850e		},
   { "v850ea",		set_machine,		bfd_mach_v850ea 	},
-  { "file",		dwarf2_directive_file,	0			},
+  { "file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
   { "loc",		dwarf2_directive_loc,	0			},
   { NULL,		NULL,			0			}
 };


-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list