⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cygwin.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Operating system specific defines to be used when targeting GCC for   hosting on Windows NT 3.x, using a Unix style C library and tools,   as distinct from winnt.h, which is used to build GCC for use with a   windows style library and tool set and uses the Microsoft tools.   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU CC is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU CC; see the file COPYING.  If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330,Boston, MA 02111-1307, USA. */#define YES_UNDERSCORES#define DBX_DEBUGGING_INFO #define SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG#include "i386/gas.h"#include "dbxcoff.h"/* Augment TARGET_SWITCHES with the cygwin/no-cygwin options. */#define MASK_WIN32 0x40000000 /* Use -lming32 interface */#define MASK_CYGWIN  0x20000000 /* Use -lcygwin interface */#define MASK_WINDOWS 0x10000000 /* Use windows interface */#define MASK_DLL     0x08000000 /* Use dll interface    */#define MASK_NOP_FUN_DLLIMPORT 0x20000 /* Ignore dllimport for functions */#define TARGET_WIN32             (target_flags & MASK_WIN32)#define TARGET_CYGWIN            (target_flags & MASK_CYGWIN)#define TARGET_WINDOWS           (target_flags & MASK_WINDOWS)#define TARGET_DLL               (target_flags & MASK_DLL)#define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT)#undef  SUBTARGET_SWITCHES#define SUBTARGET_SWITCHES \{ "cygwin",		  MASK_CYGWIN, "Use the Cygwin interface" },  \{ "no-cygwin",		  MASK_WIN32, "Use the Mingw32 interface" }, \{ "windows",		  MASK_WINDOWS, "Create GUI application" }, \{ "console",		  -MASK_WINDOWS, "Create console application" }, \{ "dll",		  MASK_DLL, "Generate code for a DLL" },     \{ "nop-fun-dllimport",	  MASK_NOP_FUN_DLLIMPORT, "Ignore dllimport for functions" }, \{ "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" },/* Support the __declspec keyword by turning them into attributes.   We currently only support: dllimport and dllexport.   Note that the current way we do this may result in a collision with   predefined attributes later on.  This can be solved by using one attribute,   say __declspec__, and passing args to it.  The problem with that approach   is that args are not accumulated: each new appearance would clobber any   existing args.  */#ifdef CPP_PREDEFINES#undef CPP_PREDEFINES#endif#define CPP_PREDEFINES "-Di386 -D_WIN32 \  -DWINNT  -D_X86_=1 -D__STDC__=1\  -D__stdcall=__attribute__((__stdcall__)) \  -D__cdecl=__attribute__((__cdecl__)) \  -D__declspec(x)=__attribute__((x)) \  -Asystem(winnt) -Acpu(i386) -Amachine(i386)"/* Normally, -lgcc is not needed since everything in it is in the DLL, but we   want to allow things to be added to it when installing new versions of   GCC without making a new CYGWIN.DLL, so we leave it.  Profiling is handled   by calling the init function from the prologue. */#undef STARTFILE_SPEC#define STARTFILE_SPEC "%{mdll: %{mno-cygwin:dllcrt1%O%s}} \                        %{!mdll: %{!mno-cygwin:crt0%O%s} \                                 %{mno-cygwin:crt1%O%s} %{pg:gcrt0%O%s}}"#undef CPP_SPEC#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \  %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__} \  %{mno-cygwin:-iwithprefixbefore \    ../../../../%(mingw_include_path)/include/mingw32 -D__MINGW32__=0.2}"/* This macro defines names of additional specifications to put in the specs   that can be used in various specifications like CC1_SPEC.  Its definition   is an initializer with a subgrouping for each command option.   Each subgrouping contains a string constant, that defines the   specification name, and a string constant that used by the GNU CC driver   program.   Do not define this macro if it does not need to do anything.  */#undef  SUBTARGET_EXTRA_SPECS#define SUBTARGET_EXTRA_SPECS 						\  { "mingw_include_path", DEFAULT_TARGET_MACHINE }/* We have to dynamic link to get to the system DLLs.  All of libc, libm and   the Unix stuff is in cygwin.dll.  The import library is called   'libcygwin.a'.  For Windows applications, include more libraries, but   always include kernel32.  We'd like to specific subsystem windows to   ld, but that doesn't work just yet.  */#undef LIB_SPEC#define LIB_SPEC "%{pg:-lgmon} \                  %{!mno-cygwin:-lcygwin} \                  %{mno-cygwin:-lmingw32 -lmoldname -lcrtdll} \                  %{mwindows:-lgdi32 -lcomdlg32} \		  -luser32 -lkernel32 -ladvapi32 -lshell32"#define LINK_SPEC "%{mwindows:--subsystem windows} \                   %{mconsole:--subsystem console} \                   %{mdll:--dll -e _DllMainCRTStartup@12}"#define SIZE_TYPE "unsigned int"#define PTRDIFF_TYPE "int"#define WCHAR_UNSIGNED 1#define WCHAR_TYPE_SIZE 16#define WCHAR_TYPE "short unsigned int"#define HAVE_ATEXIT 1/* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop).  */#define HANDLE_PRAGMA_PACK_PUSH_POP 1/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS   is a valid machine specific attribute for DECL.   The attributes in ATTRIBUTES have previously been assigned to DECL.  */extern int i386_pe_valid_decl_attribute_p ();#undef VALID_MACHINE_DECL_ATTRIBUTE#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \  i386_pe_valid_decl_attribute_p (DECL, ATTRIBUTES, IDENTIFIER, ARGS)/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS   is a valid machine specific attribute for TYPE.   The attributes in ATTRIBUTES have previously been assigned to TYPE.  */#undef VALID_MACHINE_TYPE_ATTRIBUTE#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \  i386_pe_valid_type_attribute_p (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)extern int i386_pe_valid_type_attribute_p ();extern union tree_node *i386_pe_merge_decl_attributes ();#define MERGE_MACHINE_DECL_ATTRIBUTES(OLD, NEW) \  i386_pe_merge_decl_attributes ((OLD), (NEW))/* Used to implement dllexport overriding dllimport semantics.  It's also used   to handle vtables - the first pass won't do anything because   DECL_CONTEXT (DECL) will be 0 so i386_pe_dll{ex,im}port_p will return 0.   It's also used to handle dllimport override semantics.  */#if 0#define REDO_SECTION_INFO_P(DECL) \  ((DECL_MACHINE_ATTRIBUTES (DECL) != NULL_TREE) \   || (TREE_CODE (DECL) == VAR_DECL && DECL_VIRTUAL_P (DECL)))#else#define REDO_SECTION_INFO_P(DECL) 1#endif#undef EXTRA_SECTIONS#define EXTRA_SECTIONS in_ctor, in_dtor, in_drectve#undef EXTRA_SECTION_FUNCTIONS#define EXTRA_SECTION_FUNCTIONS					\  CTOR_SECTION_FUNCTION						\  DTOR_SECTION_FUNCTION						\  DRECTVE_SECTION_FUNCTION					\  SWITCH_TO_SECTION_FUNCTION#define CTOR_SECTION_FUNCTION					\void								\ctor_section ()							\{								\  if (in_section != in_ctor)					\    {								\      fprintf (asm_out_file, "\t.section .ctor\n");		\      in_section = in_ctor;					\    }								\}#define DTOR_SECTION_FUNCTION					\void								\dtor_section ()							\{								\  if (in_section != in_dtor)					\    {								\      fprintf (asm_out_file, "\t.section .dtor\n");		\      in_section = in_dtor;					\    }								\}#define DRECTVE_SECTION_FUNCTION \void									\drectve_section ()							\{									\  if (in_section != in_drectve)						\    {									\      fprintf (asm_out_file, "%s\n", "\t.section .drectve\n");		\      in_section = in_drectve;						\    }									\}/* Switch to SECTION (an `enum in_section').   ??? This facility should be provided by GCC proper.   The problem is that we want to temporarily switch sections in   ASM_DECLARE_OBJECT_NAME and then switch back to the original section   afterwards.  */#define SWITCH_TO_SECTION_FUNCTION 				\void 								\switch_to_section (section, decl) 				\     enum in_section section; 					\     tree decl; 						\{ 								\  switch (section) 						\    { 								\      case in_text: text_section (); break; 			\      case in_data: data_section (); break; 			\      case in_named: named_section (decl, NULL, 0); break; 	\      case in_ctor: ctor_section (); break; 			\      case in_dtor: dtor_section (); break; 			\      case in_drectve: drectve_section (); break; 		\      default: abort (); break; 				\    } 								\}#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)	\  do {						\    ctor_section ();				\    fprintf (FILE, "%s\t", ASM_LONG);		\    assemble_name (FILE, NAME);			\    fprintf (FILE, "\n");			\  } while (0)#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)       	\  do {						\    dtor_section ();                   		\    fprintf (FILE, "%s\t", ASM_LONG);		\    assemble_name (FILE, NAME);			\    fprintf (FILE, "\n");			\  } while (0)/* Don't allow flag_pic to propagate since gas may produce invalid code   otherwise. */#undef  SUBTARGET_OVERRIDE_OPTIONS#define SUBTARGET_OVERRIDE_OPTIONS					\do {									\  if (flag_pic)								\    {									\      warning ("-f%s ignored for target (all code is position independent)",\	       (flag_pic > 1) ? "PIC" : "pic");				\

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -