1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /******************************************************************************
4 * Copyright (C) 2008-2011, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *******************************************************************************
10 #define __PKG_GENC_H__
12 #include "unicode/utypes.h"
15 #include "unicode/putil.h"
18 /*** Platform #defines move here ***/
19 #if U_PLATFORM_HAS_WIN32_API
21 #define WINDOWS_WITH_GNUC
23 #define WINDOWS_WITH_MSVC
28 #if !defined(WINDOWS_WITH_MSVC)
29 #define BUILD_DATA_WITHOUT_ASSEMBLY
32 #ifndef U_DISABLE_OBJ_CODE /* testing */
33 #if defined(WINDOWS_WITH_MSVC) || U_PLATFORM_IS_LINUX_BASED
34 #define CAN_WRITE_OBJ_CODE
36 #if U_PLATFORM_HAS_WIN32_API || defined(U_ELF)
37 #define CAN_GENERATE_OBJECTS
41 #if U_PLATFORM == U_PF_CYGWIN || defined(CYGWINMSVC)
46 * When building the data library without assembly,
47 * some platforms use a single c code file for all of
48 * the data to generate the final data library. This can
49 * increase the performance of the pkdata tool.
51 #if U_PLATFORM == U_PF_OS400
52 #define USE_SINGLE_CCODE_FILE
55 /* Need to fix the file seperator character when using MinGW. */
56 #if defined(WINDOWS_WITH_GNUC) || defined(USING_CYGWIN)
57 #define PKGDATA_FILE_SEP_STRING "/"
59 #define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING
62 #define LARGE_BUFFER_MAX_SIZE 2048
63 #define SMALL_BUFFER_MAX_SIZE 512
64 #define SMALL_BUFFER_FLAG_NAMES 32
65 #define BUFFER_PADDING_SIZE 20
67 /** End platform defines **/
71 U_INTERNAL
void U_EXPORT2
72 printAssemblyHeadersToStdErr(void);
74 U_INTERNAL UBool U_EXPORT2
75 checkAssemblyHeaderName(const char* optAssembly
);
77 U_INTERNAL
void U_EXPORT2
78 writeCCode(const char *filename
, const char *destdir
, const char *optName
, const char *optFilename
, char *outFilePath
);
80 U_INTERNAL
void U_EXPORT2
81 writeAssemblyCode(const char *filename
, const char *destdir
, const char *optEntryPoint
, const char *optFilename
, char *outFilePath
);
83 U_INTERNAL
void U_EXPORT2
84 writeObjectCode(const char *filename
, const char *destdir
, const char *optEntryPoint
, const char *optMatchArch
, const char *optFilename
, char *outFilePath
);