changes to allow compilation under Unix and Cygwin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
diff --git a/ChangeLog b/ChangeLog
index 9a9db73..937b2ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@
* CHANGES: added a summary of changes between 2.0.1 and 2.0
+ * builds/unix/ftconfig.in, builds/cygwin/ftconfig.in: changes
+ to allow compilation under Unix with the Unix-specific config
+ files..
+
2000-12-01 Werner Lemberg <wl@gnu.org>
* INSTALL: Revised.
diff --git a/builds/cygwin/devel/freetype/config/ftoption.h b/builds/cygwin/devel/freetype/config/ftoption.h
index 644c143..bfc6ad7 100644
--- a/builds/cygwin/devel/freetype/config/ftoption.h
+++ b/builds/cygwin/devel/freetype/config/ftoption.h
@@ -16,8 +16,8 @@
/***************************************************************************/
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
#ifdef __cplusplus
@@ -394,7 +394,7 @@
#endif
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
/* END */
diff --git a/builds/cygwin/ftconfig.in b/builds/cygwin/ftconfig.in
index f73804a..5071eef 100644
--- a/builds/cygwin/ftconfig.in
+++ b/builds/cygwin/ftconfig.in
@@ -34,17 +34,20 @@
/*************************************************************************/
-#ifndef FTCONFIG_H
-#define FTCONFIG_H
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
+
+#ifndef FT_BUILD_H
+# define FT_BUILD_H <freetype/config/ftbuild.h>
+#endif
/* Include the header file containing all developer build options */
-#include <freetype/config/ftoption.h>
+#include FT_BUILD_H
+#include FT_CONFIG_OPTIONS_H
-#ifdef __cplusplus
- extern "C" {
-#endif
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -145,64 +148,64 @@
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-#define LOCAL_DEF static
-#define LOCAL_FUNC static
+#define FT_LOCAL static
+#define FT_LOCAL_DEF static
#else
#ifdef __cplusplus
-#define LOCAL_DEF extern "C"
-#define LOCAL_FUNC extern "C"
+#define FT_LOCAL extern "C"
+#define FT_LOCAL_DEF extern "C"
#else
-#define LOCAL_DEF extern
-#define LOCAL_FUNC extern
+#define FT_LOCAL extern
+#define FT_LOCAL_DEF extern
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
-#ifndef BASE_DEF
+#ifndef FT_BASE
#ifdef __cplusplus
-#define BASE_DEF( x ) extern "C" x
+#define FT_BASE( x ) extern "C" x
#else
-#define BASE_DEF( x ) extern x
+#define FT_BASE( x ) extern x
#endif
-#endif /* !BASE_DEF */
+#endif /* !FT_BASE */
-#ifndef BASE_FUNC
+#ifndef FT_BASE_DEF
#ifdef __cplusplus
-#define BASE_FUNC( x ) extern "C" x
+#define FT_BASE_DEF( x ) extern "C" x
#else
-#define BASE_FUNC( x ) extern x
+#define FT_BASE_DEF( x ) extern x
#endif
-#endif /* !BASE_FUNC */
+#endif /* !FT_BASE_DEF */
-#ifndef FT_EXPORT_DEF
+#ifndef FT_EXPORT
#ifdef __cplusplus
-#define FT_EXPORT_DEF( x ) extern "C" x
+#define FT_EXPORT( x ) extern "C" x
#else
-#define FT_EXPORT_DEF( x ) extern x
+#define FT_EXPORT( x ) extern x
#endif
-#endif /* !FT_EXPORT_DEF */
+#endif /* !FT_EXPORT */
-#ifndef FT_EXPORT_FUNC
+#ifndef FT_EXPORT_DEF
#ifdef __cplusplus
-#define FT_EXPORT_FUNC( x ) extern "C" x
+#define FT_EXPORT_DEF( x ) extern "C" x
#else
-#define FT_EXPORT_FUNC( x ) extern x
+#define FT_EXPORT_DEF( x ) extern x
#endif
-#endif /* !FT_EXPORT_FUNC */
+#endif /* !FT_EXPORT_DEF */
#ifndef FT_EXPORT_VAR
@@ -215,6 +218,10 @@
#endif /* !FT_EXPORT_VAR */
+ /* The following macros are needed to compile the library with a */
+ /* C++ compiler. Note that we do this for convenience -- please */
+ /* don't ask for more C++ features. */
+ /* */
/* This is special. Within C++, you must specify `extern "C"' for */
/* functions which are used via function pointers, and you also */
@@ -222,27 +229,33 @@
/* assure C linkage -- it's not possible to have (local) anonymous */
/* functions which are accessed by (global) function pointers. */
/* */
+ /* */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function. */
+ /* */
+ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
+ /* contains pointers to callback functions. */
+ /* */
+ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
+ /* that contains pointers to callback functions. */
+ /* */
#ifdef __cplusplus
-#define LOCAL_FUNC_X extern "C"
-
-#define FT_CPLUSPLUS( x ) extern "C" x
+#define FT_CALLBACK_DEF extern "C"
+#define FT_CALLBACK_TABLE extern "C"
+#define FT_CALLBACK_TABLE_DEF extern "C"
#else
-#define LOCAL_FUNC_X static
-
-#define FT_CPLUSPLUS( x ) x
+#define FT_CALLBACK_DEF static
+#define FT_CALLBACK_TABLE extern
+#define FT_CALLBACK_TABLE_DEF
#endif /* __cplusplus */
-#ifdef __cplusplus
- }
-#endif
-
+FT_END_HEADER
-#endif /* FTCONFIG_H */
+#endif /* __FTCONFIG_H__ */
/* END */
diff --git a/builds/unix/devel/freetype/config/ftoption.h b/builds/unix/devel/freetype/config/ftoption.h
index 644c143..bfc6ad7 100644
--- a/builds/unix/devel/freetype/config/ftoption.h
+++ b/builds/unix/devel/freetype/config/ftoption.h
@@ -16,8 +16,8 @@
/***************************************************************************/
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
#ifdef __cplusplus
@@ -394,7 +394,7 @@
#endif
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
/* END */
diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in
index e5c5087..5071eef 100644
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -34,17 +34,20 @@
/*************************************************************************/
-#ifndef FTCONFIG_H
-#define FTCONFIG_H
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
+
+#ifndef FT_BUILD_H
+# define FT_BUILD_H <freetype/config/ftbuild.h>
+#endif
/* Include the header file containing all developer build options */
-#include <freetype/config/ftoption.h>
+#include FT_BUILD_H
+#include FT_CONFIG_OPTIONS_H
-#ifdef __cplusplus
- extern "C" {
-#endif
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -250,12 +253,9 @@
#endif /* __cplusplus */
-#ifdef __cplusplus
- }
-#endif
-
+FT_END_HEADER
-#endif /* FTCONFIG_H */
+#endif /* __FTCONFIG_H__ */
/* END */
diff --git a/builds/win32/devel/freetype/config/ftoption.h b/builds/win32/devel/freetype/config/ftoption.h
index 8a967ae..bfc6ad7 100644
--- a/builds/win32/devel/freetype/config/ftoption.h
+++ b/builds/win32/devel/freetype/config/ftoption.h
@@ -16,8 +16,8 @@
/***************************************************************************/
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
#ifdef __cplusplus
@@ -359,7 +359,7 @@
/* */
/* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
/* */
-#define T1_MAX_CHARSTRINGS_OPERANDS 64
+#define T1_MAX_CHARSTRINGS_OPERANDS 256
/*************************************************************************/
@@ -394,7 +394,7 @@
#endif
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
/* END */
diff --git a/include/freetype/config/ftbuild.h b/include/freetype/config/ftbuild.h
index 9d50162..50bfb6e 100644
--- a/include/freetype/config/ftbuild.h
+++ b/include/freetype/config/ftbuild.h
@@ -163,9 +163,17 @@
/* don't add spaces around arguments to FT_CONFIG_FILE! */
/* configuration files */
-#define FT_CONFIG_CONFIG_H FT_CONFIG_FILE(ftconfig.h)
-#define FT_CONFIG_OPTIONS_H FT_CONFIG_FILE(ftoption.h)
-#define FT_CONFIG_MODULES_H FT_CONFIG_FILE(ftmodule.h)
+#ifndef FT_CONFIG_CONFIG_H
+# define FT_CONFIG_CONFIG_H FT_CONFIG_FILE(ftconfig.h)
+#endif
+
+#ifndef FT_CONFIG_OPTIONS_H
+# define FT_CONFIG_OPTIONS_H FT_CONFIG_FILE(ftoption.h)
+#endif
+
+#ifndef FT_CONFIG_MODULES_H
+# define FT_CONFIG_MODULES_H FT_CONFIG_FILE(ftmodule.h)
+#endif
/* public headers */
#define FT_ERRORS_H FT_PUBLIC_FILE(fterrors.h)