From 5a57ced09ea6d8e944c5417258cc80503d8e5aa0 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 2 Apr 1995 07:54:18 -0400 Subject: [PATCH] (RETURN_POPS_ARGS, ENCODE_SECTION_INFO): Call chain_member_purpose, not chain_member_value. (RETURN_POPS_ARGS, ENCODE_SECTION_INFO): Call chain_member_purpose, not chain_member_value. (ASM_FILE_START, LIB_SPEC): Move to here. From-SVN: r9290 --- gcc/config/i386/win-nt.h | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/gcc/config/i386/win-nt.h b/gcc/config/i386/win-nt.h index e44a501d3d8..3b2d8c3c30d 100644 --- a/gcc/config/i386/win-nt.h +++ b/gcc/config/i386/win-nt.h @@ -42,9 +42,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ : \ ( \ ((FUNDECL && (TREE_CODE_CLASS (TREE_CODE (FUNDECL)) == 'd') ? \ - chain_member_value (get_identifier ("stdcall"), \ - DECL_MACHINE_ATTRIBUTES (FUNDECL) \ - ) : 0 \ + chain_member_purpose (get_identifier ("stdcall"), \ + DECL_MACHINE_ATTRIBUTES (FUNDECL) \ + ) : 0 \ ) \ ) \ && \ @@ -154,8 +154,8 @@ do \ || ! TREE_PUBLIC (DECL)); \ } \ if (TREE_CODE (DECL) == FUNCTION_DECL) \ - if (chain_member_value (get_identifier ("stdcall"), \ - DECL_MACHINE_ATTRIBUTES (DECL))) \ + if (chain_member_purpose (get_identifier ("stdcall"), \ + DECL_MACHINE_ATTRIBUTES (DECL))) \ XEXP (DECL_RTL (DECL), 0) = \ gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \ } \ @@ -172,5 +172,31 @@ while (0) && ((get_identifier("stdcall") == name) \ || (get_identifier("cdecl") == name)) +/* The global __fltused is necessary to cause the printf/scanf routines + for outputting/inputting floating point numbers to be loaded. Since this + is kind of hard to detect, we just do it all the time. */ + +#ifdef ASM_FILE_START +#undef ASM_FILE_START +#endif +#define ASM_FILE_START(FILE) \ + do { fprintf (FILE, "\t.file\t"); \ + output_quoted_string (FILE, dump_base_name); \ + fprintf (FILE, "\n"); \ + fprintf (FILE, ".global\t__fltused\n"); \ + } while (0) + +/* if the switch "-mwindows" is passed to ld, then specify to the Microsoft + linker the proper switches and libraries to build a graphical program */ + +#undef LIB_SPEC +#define LIB_SPEC "%{mwindows:-subsystem:windows -entry:WinMainCRTStartup \ + USER32.LIB GDI32.LIB COMDLG32.LIB WINSPOOL.LIB} \ + %{!mwindows:-subsystem:console -entry:mainCRTStartup} \ + %{mcrtmt:OLDNAMES.LIB LIBCMT.LIB KERNEL32.LIB ADVAPI32.LIB} \ + %{!mcrtmt:OLDNAMES.LIB LIBC.LIB KERNEL32.LIB ADVAPI32.LIB} \ + %{g:-debugtype:coff -debug:full} \ + %{v}" + #include "winnt/winnt.h"