1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/tools/toolutil/pkg_genc.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,84 @@ 1.4 +/****************************************************************************** 1.5 + * Copyright (C) 2008-2011, International Business Machines 1.6 + * Corporation and others. All Rights Reserved. 1.7 + ******************************************************************************* 1.8 + */ 1.9 + 1.10 +#ifndef __PKG_GENC_H__ 1.11 +#define __PKG_GENC_H__ 1.12 + 1.13 +#include "unicode/utypes.h" 1.14 +#include "toolutil.h" 1.15 + 1.16 +#include "unicode/putil.h" 1.17 +#include "putilimp.h" 1.18 + 1.19 +/*** Platform #defines move here ***/ 1.20 +#if U_PLATFORM_HAS_WIN32_API 1.21 +#ifdef __GNUC__ 1.22 +#define WINDOWS_WITH_GNUC 1.23 +#else 1.24 +#define WINDOWS_WITH_MSVC 1.25 +#endif 1.26 +#endif 1.27 + 1.28 + 1.29 +#if !defined(WINDOWS_WITH_MSVC) 1.30 +#define BUILD_DATA_WITHOUT_ASSEMBLY 1.31 +#endif 1.32 + 1.33 +#ifndef U_DISABLE_OBJ_CODE /* testing */ 1.34 +#if defined(WINDOWS_WITH_MSVC) || U_PLATFORM_IS_LINUX_BASED 1.35 +#define CAN_WRITE_OBJ_CODE 1.36 +#endif 1.37 +#if U_PLATFORM_HAS_WIN32_API || defined(U_ELF) 1.38 +#define CAN_GENERATE_OBJECTS 1.39 +#endif 1.40 +#endif 1.41 + 1.42 +#if U_PLATFORM == U_PF_CYGWIN || defined(CYGWINMSVC) 1.43 +#define USING_CYGWIN 1.44 +#endif 1.45 + 1.46 +/* 1.47 + * When building the data library without assembly, 1.48 + * some platforms use a single c code file for all of 1.49 + * the data to generate the final data library. This can 1.50 + * increase the performance of the pkdata tool. 1.51 + */ 1.52 +#if U_PLATFORM == U_PF_OS400 1.53 +#define USE_SINGLE_CCODE_FILE 1.54 +#endif 1.55 + 1.56 +/* Need to fix the file seperator character when using MinGW. */ 1.57 +#if defined(WINDOWS_WITH_GNUC) || defined(USING_CYGWIN) 1.58 +#define PKGDATA_FILE_SEP_STRING "/" 1.59 +#else 1.60 +#define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING 1.61 +#endif 1.62 + 1.63 +#define LARGE_BUFFER_MAX_SIZE 2048 1.64 +#define SMALL_BUFFER_MAX_SIZE 512 1.65 +#define SMALL_BUFFER_FLAG_NAMES 32 1.66 +#define BUFFER_PADDING_SIZE 20 1.67 + 1.68 +/** End platform defines **/ 1.69 + 1.70 + 1.71 + 1.72 +U_INTERNAL void U_EXPORT2 1.73 +printAssemblyHeadersToStdErr(void); 1.74 + 1.75 +U_INTERNAL UBool U_EXPORT2 1.76 +checkAssemblyHeaderName(const char* optAssembly); 1.77 + 1.78 +U_INTERNAL void U_EXPORT2 1.79 +writeCCode(const char *filename, const char *destdir, const char *optName, const char *optFilename, char *outFilePath); 1.80 + 1.81 +U_INTERNAL void U_EXPORT2 1.82 +writeAssemblyCode(const char *filename, const char *destdir, const char *optEntryPoint, const char *optFilename, char *outFilePath); 1.83 + 1.84 +U_INTERNAL void U_EXPORT2 1.85 +writeObjectCode(const char *filename, const char *destdir, const char *optEntryPoint, const char *optMatchArch, const char *optFilename, char *outFilePath); 1.86 + 1.87 +#endif