diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-09 02:00:22 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-09 02:00:22 +0000 |
commit | fe92db2c0e3ae41fb2ec70fd1dc74c1d06109f6f (patch) | |
tree | 0630542638dccd4aa97cc334b7f2f77ea7bc26e7 | |
parent | 248922712ec202dc51b83c4adbc483b565d3b869 (diff) |
Add 'extern "C" {' to avoid link error
git-svn-id: svn://tug.org/texlive/trunk@27349 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 14 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.h | 6 |
4 files changed, 28 insertions, 7 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index 49cfa8c0952..ef95fb7c230 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,10 @@ +2012-08-09 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * XeTeXFontMgr.cpp: Add 'extern "C" {' to avoid link error in MSVC. + * XeTeX_ext.c: Change order of inlusion of headers to be able to + compile by using MSVC. + * XeTeX_ext.h: Add 'extern "C" {' to avoid link error in MSVC. + 2012-08-02 Peter Breitenlohner <peb@mppmu.mpg.de> * am/xetex.am: Clarify *tex_version.h dependencies. diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp b/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp index e02fafe41d5..188fc01f73b 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp +++ b/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp @@ -45,7 +45,9 @@ authorization from the copyright holders. #include <math.h> +extern "C" { extern Fixed loadedfontdesignsize; +} // functions from the Pascal/WEB side extern "C" { @@ -545,6 +547,12 @@ XeTeXFontMgr::getDesignSize(XeTeXFont font) return 10.0; } +#ifdef WIN32 +#ifndef M_PI +#define M_PI 3.14159265358979323846264 +#endif +#endif + void XeTeXFontMgr::getOpSizeRecAndStyleFlags(Font* theFont) { diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index 74821d63204..f0d0023222a 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -45,6 +45,13 @@ authorization from the copyright holders. #include "zlib.h" +#include <time.h> /* For `struct tm'. */ +#if defined (HAVE_SYS_TIME_H) +#include <sys/time.h> +#elif defined (HAVE_SYS_TIMEB_H) +#include <sys/timeb.h> +#endif + #define EXTERN extern #include "xetexd.h" @@ -66,13 +73,6 @@ authorization from the copyright holders. #include <math.h> /* for fabs() */ -#include <time.h> /* For `struct tm'. */ -#if defined (HAVE_SYS_TIME_H) -#include <sys/time.h> -#elif defined (HAVE_SYS_TIMEB_H) -#include <sys/timeb.h> -#endif - #if defined(__STDC__) #include <locale.h> #endif diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h index d3bd8db7582..630a3f63711 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h @@ -216,7 +216,13 @@ extern const char *outputdriver; * also used in XeTeXFontMgr_FC.cpp and XeTeX_ext.c. */ #include <ft2build.h> #include FT_FREETYPE_H +#ifdef __cplusplus +extern "C" { +#endif extern FT_Library gFreeTypeLibrary; +#ifdef __cplusplus +} +#endif #include <stdio.h> /* for FILE */ |