]> granicus.if.org Git - icu/commitdiff
ICU-9279 Fix mingw64 build error
authorMichael Ow <mow@svn.icu-project.org>
Wed, 25 Apr 2012 17:18:08 +0000 (17:18 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Wed, 25 Apr 2012 17:18:08 +0000 (17:18 +0000)
X-SVN-Rev: 31770

icu4c/source/tools/toolutil/pkg_genc.c

index 57c6f6192d7a540e86ec2a5c8b8b9fba1427a4bc..e0e91bdefea8394ca328afe16e4ff40529ccd264 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- *   Copyright (C) 2009-2011, International Business Machines
+ *   Copyright (C) 2009-2012, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *******************************************************************************
  */
 #define HEX_0X 0 /*  0x1234 */
 #define HEX_0H 1 /*  01234h */
 
+/*
+ * The following is needed by MinGW64
+ */
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__ _
+#endif
+#define GCC_LABEL_PREFIX_INTERNAL(a) #a
+#define GCC_LABEL_PREFIX(a) GCC_LABEL_PREFIX_INTERNAL(a)
 
 /* prototypes --------------------------------------------------------------- */
 static void
@@ -135,10 +143,10 @@ static const struct AssemblyType {
         ".long ","",HEX_0X
     },
     {"gcc-cygwin",
-        ".globl _%s\n"
+        ".globl "GCC_LABEL_PREFIX(__USER_LABEL_PREFIX__) "%s\n"
         "\t.section .rodata\n"
         "\t.align 8\n" /* Either align 8 bytes or 2^8 (256) bytes. 8 bytes is needed. */
-        "_%s:\n\n",
+        GCC_LABEL_PREFIX(__USER_LABEL_PREFIX__) "%s:\n\n",
 
         ".long ","",HEX_0X
     },