+2003-10-16 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/i386/cygming.h (ASM_OUTPUT_DEF_FROM_DECLS): Define.
+
+ * config/i386/winnt.c (gen_stdcall_suffix): Make static
+ (gen_fastcall_suffix): Likewise.
+ (i386_pe_dllexport_p): Likewise.
+ (i386_pe_dllimport_p): Likewise.
+ (i386_pe_mark_dllexport): Likewise.
+ (i386_pe_mark_dllimport): Likewise.
+ (i386_pe_asm_named_section): Fix formatting.
+
2003-10-16 Zack Weinberg <zack@codesourcery.com>
* configure.in: Add snprintf to gcc_AC_CHECK_DECLS list.
#ifndef SET_ASM_OP
#define SET_ASM_OP "\t.set\t"
#endif
+/* This implements the `alias' attribute, keeping any stdcall or
+ fastcall decoration. */
+#undef ASM_OUTPUT_DEF_FROM_DECLS
+#define ASM_OUTPUT_DEF_FROM_DECLS(STREAM, DECL, TARGET) \
+ do \
+ { \
+ const char *alias; \
+ rtx rtlname = XEXP (DECL_RTL (DECL), 0); \
+ if (GET_CODE (rtlname) == SYMBOL_REF) \
+ alias = XSTR (rtlname, 0); \
+ else \
+ abort (); \
+ ASM_OUTPUT_DEF (STREAM, alias, IDENTIFIER_POINTER (TARGET)); \
+ } while (0)
#undef TREE
#ifndef BUFSIZ
# undef FILE
#endif
+
*/
static tree associated_type (tree);
-const char * gen_stdcall_suffix (tree);
-const char * gen_fastcall_suffix (tree);
-int i386_pe_dllexport_p (tree);
-int i386_pe_dllimport_p (tree);
-void i386_pe_mark_dllexport (tree);
-void i386_pe_mark_dllimport (tree);
+static const char * gen_stdcall_suffix (tree);
+static const char * gen_fastcall_suffix (tree);
+static int i386_pe_dllexport_p (tree);
+static int i386_pe_dllimport_p (tree);
+static void i386_pe_mark_dllexport (tree);
+static void i386_pe_mark_dllimport (tree);
/* This is we how mark internal identifiers with dllimport or dllexport
attributes. */
/* Return nonzero if DECL is a dllexport'd object. */
-int
+static int
i386_pe_dllexport_p (tree decl)
{
tree exp;
/* Return nonzero if DECL is a dllimport'd object. */
-int
+static int
i386_pe_dllimport_p (tree decl)
{
tree imp;
/* Mark a DECL as being dllexport'd.
Note that we override the previous setting (eg: dllimport). */
-void
+static void
i386_pe_mark_dllexport (tree decl)
{
const char *oldname;
/* Mark a DECL as being dllimport'd. */
-void
+static void
i386_pe_mark_dllimport (tree decl)
{
const char *oldname;
prefix consisting of FASTCALL_PREFIX and a suffix consisting of an
atsign (@) followed by the number of bytes of arguments. */
-const char *
+static const char *
gen_fastcall_suffix (tree decl)
{
int total = 0;
-
const char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
char *newsym;
suffix consisting of an atsign (@) followed by the number of bytes of
arguments */
-const char *
+static const char *
gen_stdcall_suffix (tree decl)
{
int total = 0;
*f++ ='r';
}
else
- {
- if (flags & SECTION_CODE)
- *f++ = 'x';
- if (flags & SECTION_WRITE)
- *f++ = 'w';
- if (flags & SECTION_PE_SHARED)
- *f++ = 's';
- }
+ {
+ if (flags & SECTION_CODE)
+ *f++ = 'x';
+ if (flags & SECTION_WRITE)
+ *f++ = 'w';
+ if (flags & SECTION_PE_SHARED)
+ *f++ = 's';
+ }
*f = '\0';