diff options
author | Ian Lance Taylor <ian@cygnus.com> | 1998-07-06 23:03:02 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-07-06 17:03:02 -0600 |
commit | 672a233f2d8305ec123f5bcce4d67936077a7ae1 (patch) | |
tree | d3755821a0532ed7e3136fb96afb4d7b56f8fdcb | |
parent | b294ca3876dd7469827b0fcf4b542c79565c3cee (diff) | |
download | gcc-672a233f2d8305ec123f5bcce4d67936077a7ae1.zip gcc-672a233f2d8305ec123f5bcce4d67936077a7ae1.tar.gz gcc-672a233f2d8305ec123f5bcce4d67936077a7ae1.tar.bz2 |
cygwin32.h: Add some declaration of external functions.
�
* i386/cygwin32.h: Add some declaration of external functions.
(ASM_DECLARE_FUNCTION_NAME): Define.
(ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL): Define.
(ASM_FILE_END): Define.
* i386/winnt.c (i386_pe_declare_function_type): New function.
(struct extern_list, extern_head): Define.
(i386_pe_record_external_function): New function.
(i386_pe_asm_file_end): New function.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r20976
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/i386/cygwin32.h | 50 |
2 files changed, 60 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc81171..73f5917 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -52,6 +52,16 @@ Mon Jul 6 22:14:31 1998 Richard Henderson (rth@cygnus.com) Mon Jul 6 22:09:32 1998 Ian Lance Taylor <ian@cygnus.com> Jeff Law <law@cygnus.com> + + * i386/cygwin32.h: Add some declaration of external functions. + (ASM_DECLARE_FUNCTION_NAME): Define. + (ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL): Define. + (ASM_FILE_END): Define. + * i386/winnt.c (i386_pe_declare_function_type): New function. + (struct extern_list, extern_head): Define. + (i386_pe_record_external_function): New function. + (i386_pe_asm_file_end): New function. + * cpplib.c (cpp_options_init): Initialize cplusplus_comments to 1, matching July 18, 1995 change to cccp.c. If -traditional then disable cplusplus_comments. diff --git a/gcc/config/i386/cygwin32.h b/gcc/config/i386/cygwin32.h index 15963bd..1677422 100644 --- a/gcc/config/i386/cygwin32.h +++ b/gcc/config/i386/cygwin32.h @@ -224,6 +224,36 @@ do { \ ? "discard" : "same_size"); \ } while (0) +/* Write the extra assembler code needed to declare a function + properly. If we are generating SDB debugging information, this + will happen automatically, so we only need to handle other cases. */ +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + do \ + { \ + if (write_symbols != SDB_DEBUG) \ + i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \ + ASM_OUTPUT_LABEL (FILE, NAME); \ + } \ + while (0) + +/* Add an external function to the list of functions to be declared at + the end of the file. */ +#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ + do \ + { \ + if (TREE_CODE (DECL) == FUNCTION_DECL) \ + i386_pe_record_external_function (NAME); \ + } \ + while (0) + +/* Declare the type properly for any external libcall. */ +#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ + i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1) + +/* Output function declarations at the end of the file. */ +#define ASM_FILE_END(FILE) \ + i386_pe_asm_file_end (FILE) + #undef ASM_COMMENT_START #define ASM_COMMENT_START " #" @@ -232,3 +262,23 @@ do { \ /* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C + +/* External function declarations. */ + +#ifndef PROTO +#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) +#define PROTO(ARGS) ARGS +#else +#define PROTO(ARGS) () +#endif +#endif + +#ifdef BUFSIZE /* stdio.h has been included, ok to use FILE * */ +#define STDIO_PROTO(ARGS) PROTO(ARGS) +#else +#define STDIO_PROTO(ARGS) () +#endif + +extern void i386_pe_record_external_function PROTO((char *)); +extern void i386_pe_declare_function_type STDIO_PROTO((FILE *, char *, int)); +extern void i386_pe_asm_file_end STDIO_PROTO((FILE *)); |