Make ftraster.c compile in stand-alone mode with MSVC compiler.

* src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
since there is no `inttypes.h' for MSVC.
This commit is contained in:
Ken Sharp 2010-07-09 09:55:29 +02:00 committed by Werner Lemberg
parent 888cd1843e
commit 603d121872
2 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2010-07-09 Ken Sharp <ken.sharp@artifex.com>
Make ftraster.c compile in stand-alone mode with MSVC compiler.
* src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
since there is no `inttypes.h' for MSVC.
2010-07-08 Werner Lemberg <wl@gnu.org> 2010-07-08 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #30361. Fix Savannah bug #30361.

View File

@ -5,7 +5,7 @@
/* Miscellaneous macros for stand-alone rasterizer (specification */ /* Miscellaneous macros for stand-alone rasterizer (specification */
/* only). */ /* only). */
/* */ /* */
/* Copyright 2005, 2009 by */ /* Copyright 2005, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used */ /* This file is part of the FreeType project, and may only be used */
@ -27,6 +27,7 @@
#ifndef __FTMISC_H__ #ifndef __FTMISC_H__
#define __FTMISC_H__ #define __FTMISC_H__
/* memset */ /* memset */
#include FT_CONFIG_STANDARD_LIBRARY_H #include FT_CONFIG_STANDARD_LIBRARY_H
@ -35,6 +36,7 @@
#define FT_LOCAL_DEF( x ) static x #define FT_LOCAL_DEF( x ) static x
/* from include/freetype2/fttypes.h */ /* from include/freetype2/fttypes.h */
typedef unsigned char FT_Byte; typedef unsigned char FT_Byte;
@ -77,12 +79,22 @@
} FT_MemoryRec; } FT_MemoryRec;
/* from src/ftcalc.c */ /* from src/ftcalc.c */
#include <inttypes.h> #if ( defined _WIN32 || defined _WIN64 )
typedef __int64 FT_Int64;
#else
#include "inttypes.h"
typedef int64_t FT_Int64; typedef int64_t FT_Int64;
#endif
static FT_Long static FT_Long
FT_MulDiv( FT_Long a, FT_MulDiv( FT_Long a,
FT_Long b, FT_Long b,