Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
IccProfLibConf.h
Go to the documentation of this file.
1/** @file
2 File: IccProfLibConf.h
3
4 Contains: Platform Specific Configuration
5
6 Version: V1
7
8 Copyright: � see ICC Software License
9*/
10
11/*
12 * The ICC Software License, Version 0.2
13 *
14 *
15 * Copyright (c) 2003-2012 The International Color Consortium. All rights
16 * reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 *
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 *
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in
27 * the documentation and/or other materials provided with the
28 * distribution.
29 *
30 * 3. In the absence of prior written permission, the names "ICC" and "The
31 * International Color Consortium" must not be used to imply that the
32 * ICC organization endorses or promotes products derived from this
33 * software.
34 *
35 *
36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
40 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 * SUCH DAMAGE.
48 * ====================================================================
49 *
50 * This software consists of voluntary contributions made by many
51 * individuals on behalf of the The International Color Consortium.
52 *
53 *
54 * Membership in the ICC is encouraged when this software is used for
55 * commercial purposes.
56 *
57 *
58 * For more information on The International Color Consortium, please
59 * see <http://www.color.org/>.
60 *
61 *
62 */
63
64/* Header file guard bands */
65#ifndef ICCCONFIG_h
66#define ICCCONFIG_h
67
68//Define the following to use namespace
69//#define USEREFICCMAXNAMESPACE
70
71#ifdef USEREFICCMAXNAMESPACE
72namespace refIccMAX {
73#endif
74
75//PC, visual C++
76#if defined(_MSC_VER) && !defined(__MWERKS__) && (defined(_M_IX86) || defined(_M_X64))
77
78 //Define how 64 bit integers are represented
79 #define ICCUINT64 unsigned __int64
80 #define ICCINT64 __int64
81 #define ICUINT64TYPE unsigned __int64
82 #define ICINT64TYPE __int64
83
84 #define ICCUINT32 unsigned long
85 #define ICCINT32 long
86 #define ICUINT32TYPE unsigned long
87 #define ICINT32TYPE long
88
89 #define ICHALFFLOATTYPE unsigned short
90
91 #define USE_WINDOWS_MB_SUPPORT
92 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
93 //#include <windows.h> //For Multibyte Translation Support
94
95 #define ICC_BYTE_ORDER_LITTLE_ENDIAN
96
97 #if defined(ICCPROFLIBDLL_EXPORTS)
98 #define ICCPROFLIB_API __declspec(dllexport)
99 #define ICCPROFLIB_EXTERN
100 #elif defined(ICCPROFLIBDLL_IMPORTS)
101 #define ICCPROFLIB_API __declspec(dllimport)
102 #define ICCPROFLIB_EXTERN extern
103 #else //just a regular lib
104 #define ICCPROFLIB_API
105 #define ICCPROFLIB_EXTERN extern
106 #endif
107
108 //Since msvc doesn't support cbrtf use pow instead
109 #define ICC_CBRTF(v) pow((double)(v), 1.0/3.0)
110
111 #if (_MSC_VER < 1300)
112 #define ICC_UNSUPPORTED_TAG_DICT
113 #endif
114
115#else // non-PC, perhaps Mac, Linux, or Solaris
116
117 #define ICCUINT64 unsigned long long
118 #define ICCINT64 long long
119 #define ICUINT64TYPE unsigned long long
120 #define ICINT64TYPE long long
121
122 #include <stdint.h>
123
124 //Make sure that 32 bit values are set correctly
125 #define ICCUINT32 uint32_t
126 #define ICCINT32 int32_t
127 #define ICUINT32TYPE uint32_t
128 #define ICINT32TYPE int32_t
129
130 #define ICHALFFLOATTYPE uint16_t
131
132 #if defined(__APPLE__)
133 #if defined(__LITTLE_ENDIAN__)
134 #define ICC_BYTE_ORDER_LITTLE_ENDIAN
135 #else
136 #define ICC_BYTE_ORDER_BIG_ENDIAN
137 #endif
138
139 #else // Sun Solaris or Linux
140 #if defined(__sun__)
141 #define ICC_BYTE_ORDER_BIG_ENDIAN
142 #else
143 #define ICC_BYTE_ORDER_LITTLE_ENDIAN
144 #endif
145 #endif
146
147 #define ICCPROFLIB_API
148 #define ICCPROFLIB_EXTERN
149 #define stricmp strcasecmp
150 #define strnicmp strncasecmp
151
152 //Define ICC_CBRTF as a call to cbrtf (replace with pow if system doesn't support cbrtf)
153 #define ICC_CBRTF(v) cbrtf(v)
154
155#endif
156
157// Add comment below if you do not want LAB to XYZ conversions to clip negative XYZ values
158// (Warning! Commenting this may result in incorrect round ripping for some Lab Values)
159#define REFICCMAX_NOCLIPLABTOXYZ
160
161#ifdef REFICCMAXCMM_EXPORTS
162#define MAKE_A_DLL
163#endif
164
165#ifdef MAKE_A_DLL
166#define REFICCMAXEXPORT __declspec( dllexport)
167#else
168#define REFICCMAXEXPORT __declspec( dllimport)
169#endif
170
171// Uncomment below if you wish to utilize ZLIB for compressed text tag types
172//#define ICC_USE_ZLIB
173
174// Uncomment below if you wish to utilize Eigen library to support matrix solving
175//#define ICC_USE_EIGEN_SOLVER
176
177#ifdef USEREFICCMAXNAMESPACE
178}
179#endif
180
181#endif //ICCCOFIG_h