Commit 672a233f by Ian Lance Taylor Committed by Jeff Law

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
parent b294ca38
...@@ -52,6 +52,16 @@ Mon Jul 6 22:14:31 1998 Richard Henderson (rth@cygnus.com) ...@@ -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> Mon Jul 6 22:09:32 1998 Ian Lance Taylor <ian@cygnus.com>
Jeff Law <law@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, * cpplib.c (cpp_options_init): Initialize cplusplus_comments to 1,
matching July 18, 1995 change to cccp.c. If -traditional then matching July 18, 1995 change to cccp.c. If -traditional then
disable cplusplus_comments. disable cplusplus_comments.
......
...@@ -224,6 +224,36 @@ do { \ ...@@ -224,6 +224,36 @@ do { \
? "discard" : "same_size"); \ ? "discard" : "same_size"); \
} while (0) } 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 #undef ASM_COMMENT_START
#define ASM_COMMENT_START " #" #define ASM_COMMENT_START " #"
...@@ -232,3 +262,23 @@ do { \ ...@@ -232,3 +262,23 @@ do { \
/* Don't assume anything about the header files. */ /* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C #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 *));
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