shithub: freetype+ttf2subf

Download patch

ref: 4b92cf80c7d99fb86454ea989ccf9ff9d379180c
parent: 0634cedb62912ea9657af787d026ad1310e76efc
author: Werner Lemberg <[email protected]>
date: Mon Oct 9 23:58:32 EDT 2000

provide `export "C"' guard only for default fterror handling.

git/fs: mount .git/fs: mount/attach disallowed
--- a/builds/toplevel.mk
+++ b/builds/toplevel.mk
@@ -29,7 +29,7 @@
 .PHONY: setup
 
 ifndef CONFIG_MK
-CONFIG_MK := config.mk
+  CONFIG_MK := config.mk
 endif
 
 # If no configuration sub-makefile is present, or if `setup' is the target
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -37,6 +37,9 @@
   /*     #include <freetype/fterrors.h>                                    */
   /*   }                                                                   */
   /*                                                                       */
+  /* For C++ it might be necessary to use `extern "C" {' and to define     */
+  /* FT_NEED_EXTERN_C also.                                                */
+  /*                                                                       */
   /*************************************************************************/
 
 
@@ -44,11 +47,8 @@
 #define FTERRORS_H
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+#undef FT_NEED_EXTERN_C
 
-
 #ifndef FT_ERRORDEF
 
 #define FT_ERRORDEF( e, v, s )  e = v,
@@ -55,6 +55,12 @@
 #define FT_ERROR_START_LIST     enum {
 #define FT_ERROR_END_LIST       FT_Err_Max };
 
+
+#ifdef __cplusplus
+#define FT_NEED_EXTERN_C
+  extern "C" {
+#endif
+
 #endif /* !FT_ERRORDEF */
 
 
@@ -186,7 +192,7 @@
 #undef FT_ERRORDEF
 
 
-#ifdef __cplusplus
+#ifdef FT_NEED_EXTERN_C
   }
 #endif