Graphiteng
|
00001 /* GRAPHITE2 LICENSING 00002 00003 Copyright 2010, SIL International 00004 All rights reserved. 00005 00006 This library is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU Lesser General Public License as published 00008 by the Free Software Foundation; either version 2.1 of License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Lesser General Public License for more details. 00015 00016 You should also have received a copy of the GNU Lesser General Public 00017 License along with this library in the file named "LICENSE". 00018 If not, write to the Free Software Foundation, 51 Franklin Street, 00019 Suite 500, Boston, MA 02110-1335, USA or visit their web page on the 00020 internet at http://www.fsf.org/licenses/lgpl.html. 00021 00022 Alternatively, the contents of this file may be used under the terms 00023 of the Mozilla Public License (http://mozilla.org/MPL) or the GNU 00024 General Public License, as published by the Free Software Foundation, 00025 either version 2 of the License or (at your option) any later version. 00026 */ 00027 #pragma once 00028 00029 #include <stddef.h> 00030 00031 typedef unsigned char gr_uint8; 00032 typedef gr_uint8 gr_byte; 00033 typedef signed char gr_int8; 00034 typedef unsigned short gr_uint16; 00035 typedef short gr_int16; 00036 typedef unsigned int gr_uint32; 00037 typedef int gr_int32; 00038 00039 enum gr_encform { 00040 gr_utf8 = 1/*sizeof(uint8)*/, gr_utf16 = 2/*sizeof(uint16)*/, gr_utf32 = 4/*sizeof(uint32)*/ 00041 }; 00042 00043 // Definitions for library publicly exported symbols 00044 #if defined _WIN32 || defined __CYGWIN__ 00045 #if defined GRAPHITE2_STATIC 00046 #define GR2_API 00047 #elif defined GRAPHITE2_EXPORTING 00048 #if defined __GNUC__ 00049 #define GR2_API __attribute__((dllexport)) 00050 #else 00051 #define GR2_API __declspec(dllexport) 00052 #endif 00053 #else 00054 #if defined __GNUC__ 00055 #define GR2_API __attribute__((dllimport)) 00056 #else 00057 #define GR2_API __declspec(dllimport) 00058 #endif 00059 #endif 00060 #define GR2_LOCAL 00061 #else 00062 #if __GNUC__ >= 4 00063 #define GR2_API __attribute__ ((visibility("default"))) 00064 #define GR2_LOCAL __attribute__ ((visibility("hidden"))) 00065 #else 00066 #define GR2_API 00067 #define GR2_LOCAL 00068 #endif 00069 #endif