]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/genccode/genccode.c
ICU-57166.0.1.tar.gz
[apple/icu.git] / icuSources / tools / genccode / genccode.c
index 12520c3dc9791d64e1c693cfecb3defbd9a62479..58f5c2e8e0a7132763459c3e25081a4989c53a99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- *   Copyright (C) 1999-2008, International Business Machines
+ *   Copyright (C) 1999-2016, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *******************************************************************************
  *   file name:  gennames.c
@@ -19,7 +19,7 @@
 
 #include "unicode/utypes.h"
 
-#ifdef U_WINDOWS
+#if U_PLATFORM_HAS_WIN32_API
 #   define VC_EXTRALEAN
 #   define WIN32_LEAN_AND_MEAN
 #   define NOUSER
@@ -30,7 +30,7 @@
 #include <time.h>
 #endif
 
-#ifdef U_LINUX
+#if U_PLATFORM_IS_LINUX_BASED && U_HAVE_ELF_H
 #   define U_ELF
 #endif
 
 #include "uoptions.h"
 #include "pkg_genc.h"
 
-#if defined(U_WINDOWS) || defined(U_ELF)
-#define CAN_GENERATE_OBJECTS
-#endif
-
 enum {
   kOptHelpH = 0,
   kOptHelpQuestionMark,
@@ -102,7 +98,7 @@ main(int argc, char* argv[]) {
     options[kOptDestDir].value = ".";
 
     /* read command line options */
-    argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options);
+    argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options);
 
     /* error handling, printing usage message */
     if(argc<0) {