Commit 79f96374 by David Billinghurst Committed by Christopher Faylor

cygwin.h: Declare ctor_section, dtor_section drectve_section, switch_to_section.

* config/i386/cygwin.h: Declare ctor_section, dtor_section drectve_section,
switch_to_section.
* winnt.c: Declare functions associated_type, gen_stdcall_suffix,
i386_pe_dllexport_p, i386_pe_dllimport_p, i386_pe_mark_dllexport,
i386_pe_mark_dllimport.
* config/i386/cygwin.h: Include <stdio.h> Declare and constify functions
i386_pe_*.
* config/i386/winnt.c: Include "tm_p.h" and "toplev.h" Constify i386_pe_*
functions with char * arguments.

From-SVN: r40661
parent f8c02bc5
2001-03-20 David Billinghurst <David.Billinghurst@riotinto.com>
* config/i386/cygwin.h: Declare ctor_section, dtor_section
drectve_section, switch_to_section.
* winnt.c: Declare functions associated_type, gen_stdcall_suffix,
i386_pe_dllexport_p, i386_pe_dllimport_p, i386_pe_mark_dllexport,
i386_pe_mark_dllimport.
2001-03-20 David Billinghurst <David.Billinghurst@riotinto.com>
* config/i386/cygwin.h: Include <stdio.h> Declare and constify
functions i386_pe_*.
* config/i386/winnt.c: Include "tm_p.h" and "toplev.h" Constify
i386_pe_* functions with char * arguments.
2001-03-20 Alexandre Oliva <aoliva@redhat.com> 2001-03-20 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movsf_ie): Fix output patterns for fpul load * config/sh/sh.md (movsf_ie): Fix output patterns for fpul load
......
...@@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */
#define SDB_DEBUGGING_INFO #define SDB_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#include <stdio.h>
#include "i386/gas.h" #include "i386/gas.h"
#include "dbxcoff.h" #include "dbxcoff.h"
...@@ -227,6 +228,7 @@ ctor_section () \ ...@@ -227,6 +228,7 @@ ctor_section () \
in_section = in_ctor; \ in_section = in_ctor; \
} \ } \
} }
void ctor_section PARAMS ((void));
#define DTOR_SECTION_FUNCTION \ #define DTOR_SECTION_FUNCTION \
void \ void \
...@@ -238,6 +240,7 @@ dtor_section () \ ...@@ -238,6 +240,7 @@ dtor_section () \
in_section = in_dtor; \ in_section = in_dtor; \
} \ } \
} }
void dtor_section PARAMS ((void));
#define DRECTVE_SECTION_FUNCTION \ #define DRECTVE_SECTION_FUNCTION \
void \ void \
...@@ -249,6 +252,7 @@ drectve_section () \ ...@@ -249,6 +252,7 @@ drectve_section () \
in_section = in_drectve; \ in_section = in_drectve; \
} \ } \
} }
void drectve_section PARAMS ((void));
/* Switch to SECTION (an `enum in_section'). /* Switch to SECTION (an `enum in_section').
...@@ -257,6 +261,7 @@ drectve_section () \ ...@@ -257,6 +261,7 @@ drectve_section () \
ASM_DECLARE_OBJECT_NAME and then switch back to the original section ASM_DECLARE_OBJECT_NAME and then switch back to the original section
afterwards. */ afterwards. */
#define SWITCH_TO_SECTION_FUNCTION \ #define SWITCH_TO_SECTION_FUNCTION \
void switch_to_section PARAMS ((enum in_section, tree)); \
void \ void \
switch_to_section (section, decl) \ switch_to_section (section, decl) \
enum in_section section; \ enum in_section section; \
...@@ -536,10 +541,12 @@ do { \ ...@@ -536,10 +541,12 @@ do { \
/* External function declarations. */ /* External function declarations. */
extern void i386_pe_record_external_function PARAMS ((char *)); extern void i386_pe_record_external_function PARAMS ((const char *));
/* extern void i386_pe_declare_function_type PARAMS ((FILE *, char *, int)); */ extern void i386_pe_declare_function_type PARAMS ((FILE *, const char *, int));
extern void i386_pe_record_exported_symbol PARAMS ((char *, int)); extern void i386_pe_record_exported_symbol PARAMS ((const char *, int));
/* extern void i386_pe_asm_file_end PARAMS ((FILE *)); */ extern void i386_pe_asm_file_end PARAMS ((FILE *));
extern int i386_pe_dllexport_name_p PARAMS ((const char *));
extern int i386_pe_dllimport_name_p PARAMS ((const char *));
/* For Win32 ABI compatibility */ /* For Win32 ABI compatibility */
#undef DEFAULT_PCC_STRUCT_RETURN #undef DEFAULT_PCC_STRUCT_RETURN
......
...@@ -27,6 +27,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,6 +27,8 @@ Boston, MA 02111-1307, USA. */
#include "output.h" #include "output.h"
#include "tree.h" #include "tree.h"
#include "flags.h" #include "flags.h"
#include "tm_p.h"
#include "toplev.h"
/* i386/PE specific attribute support. /* i386/PE specific attribute support.
...@@ -39,6 +41,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -39,6 +41,13 @@ Boston, MA 02111-1307, USA. */
multiple times. multiple times.
*/ */
static tree associated_type PARAMS ((tree));
const char * gen_stdcall_suffix PARAMS ((tree));
int i386_pe_dllexport_p PARAMS ((tree));
int i386_pe_dllimport_p PARAMS ((tree));
void i386_pe_mark_dllexport PARAMS ((tree));
void i386_pe_mark_dllimport PARAMS ((tree));
/* Return nonzero if ATTR is a valid attribute for DECL. /* Return nonzero if ATTR is a valid attribute for DECL.
ATTRIBUTES are any existing attributes and ARGS are the arguments ATTRIBUTES are any existing attributes and ARGS are the arguments
supplied with ATTR. */ supplied with ATTR. */
...@@ -226,7 +235,7 @@ i386_pe_dllimport_p (decl) ...@@ -226,7 +235,7 @@ i386_pe_dllimport_p (decl)
int int
i386_pe_dllexport_name_p (symbol) i386_pe_dllexport_name_p (symbol)
char *symbol; const char *symbol;
{ {
return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.'; return symbol[0] == '@' && symbol[1] == 'e' && symbol[2] == '.';
} }
...@@ -235,7 +244,7 @@ i386_pe_dllexport_name_p (symbol) ...@@ -235,7 +244,7 @@ i386_pe_dllexport_name_p (symbol)
int int
i386_pe_dllimport_name_p (symbol) i386_pe_dllimport_name_p (symbol)
char *symbol; const char *symbol;
{ {
return symbol[0] == '@' && symbol[1] == 'i' && symbol[2] == '.'; return symbol[0] == '@' && symbol[1] == 'i' && symbol[2] == '.';
} }
...@@ -247,7 +256,8 @@ void ...@@ -247,7 +256,8 @@ void
i386_pe_mark_dllexport (decl) i386_pe_mark_dllexport (decl)
tree decl; tree decl;
{ {
char *oldname, *newname; const char *oldname;
char *newname;
rtx rtlname; rtx rtlname;
tree idp; tree idp;
...@@ -283,7 +293,8 @@ void ...@@ -283,7 +293,8 @@ void
i386_pe_mark_dllimport (decl) i386_pe_mark_dllimport (decl)
tree decl; tree decl;
{ {
char *oldname, *newname; const char *oldname;
char *newname;
tree idp; tree idp;
rtx rtlname, newrtl; rtx rtlname, newrtl;
...@@ -370,14 +381,14 @@ i386_pe_mark_dllimport (decl) ...@@ -370,14 +381,14 @@ i386_pe_mark_dllimport (decl)
suffix consisting of an atsign (@) followed by the number of bytes of suffix consisting of an atsign (@) followed by the number of bytes of
arguments */ arguments */
char * const char *
gen_stdcall_suffix (decl) gen_stdcall_suffix (decl)
tree decl; tree decl;
{ {
int total = 0; int total = 0;
/* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead /* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead
of DECL_ASSEMBLER_NAME. */ of DECL_ASSEMBLER_NAME. */
char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); const char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
char *newsym; char *newsym;
if (TYPE_ARG_TYPES (TREE_TYPE (decl))) if (TYPE_ARG_TYPES (TREE_TYPE (decl)))
...@@ -444,7 +455,7 @@ i386_pe_encode_section_info (decl) ...@@ -444,7 +455,7 @@ i386_pe_encode_section_info (decl)
&& GET_CODE (XEXP (XEXP (DECL_RTL (decl), 0), 0)) == SYMBOL_REF && GET_CODE (XEXP (XEXP (DECL_RTL (decl), 0), 0)) == SYMBOL_REF
&& i386_pe_dllimport_name_p (XSTR (XEXP (XEXP (DECL_RTL (decl), 0), 0), 0))) && i386_pe_dllimport_name_p (XSTR (XEXP (XEXP (DECL_RTL (decl), 0), 0), 0)))
{ {
char *oldname = XSTR (XEXP (XEXP (DECL_RTL (decl), 0), 0), 0); const char *oldname = XSTR (XEXP (XEXP (DECL_RTL (decl), 0), 0), 0);
tree idp = get_identifier (oldname + 9); tree idp = get_identifier (oldname + 9);
rtx newrtl = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp)); rtx newrtl = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp));
...@@ -465,8 +476,8 @@ i386_pe_unique_section (decl, reloc) ...@@ -465,8 +476,8 @@ i386_pe_unique_section (decl, reloc)
int reloc; int reloc;
{ {
int len; int len;
const char *name; const char *name, *prefix;
char *string,*prefix; char *string;
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* Strip off any encoding in fnname. */ /* Strip off any encoding in fnname. */
...@@ -513,7 +524,7 @@ i386_pe_unique_section (decl, reloc) ...@@ -513,7 +524,7 @@ i386_pe_unique_section (decl, reloc)
void void
i386_pe_declare_function_type (file, name, public) i386_pe_declare_function_type (file, name, public)
FILE *file; FILE *file;
char *name; const char *name;
int public; int public;
{ {
fprintf (file, "\t.def\t"); fprintf (file, "\t.def\t");
...@@ -528,7 +539,7 @@ i386_pe_declare_function_type (file, name, public) ...@@ -528,7 +539,7 @@ i386_pe_declare_function_type (file, name, public)
struct extern_list struct extern_list
{ {
struct extern_list *next; struct extern_list *next;
char *name; const char *name;
}; };
static struct extern_list *extern_head; static struct extern_list *extern_head;
...@@ -541,7 +552,7 @@ static struct extern_list *extern_head; ...@@ -541,7 +552,7 @@ static struct extern_list *extern_head;
void void
i386_pe_record_external_function (name) i386_pe_record_external_function (name)
char *name; const char *name;
{ {
struct extern_list *p; struct extern_list *p;
...@@ -556,7 +567,7 @@ i386_pe_record_external_function (name) ...@@ -556,7 +567,7 @@ i386_pe_record_external_function (name)
struct export_list struct export_list
{ {
struct export_list *next; struct export_list *next;
char *name; const char *name;
int is_data; /* used to type tag exported symbols. */ int is_data; /* used to type tag exported symbols. */
}; };
...@@ -570,7 +581,7 @@ static struct export_list *export_head; ...@@ -570,7 +581,7 @@ static struct export_list *export_head;
void void
i386_pe_record_exported_symbol (name, is_data) i386_pe_record_exported_symbol (name, is_data)
char *name; const char *name;
int is_data; int is_data;
{ {
struct export_list *p; struct export_list *p;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment