0
|
1 /* ============================================================================
|
|
2 * Freetype GL - A C OpenGL Freetype engine
|
|
3 * Platform: Any
|
|
4 * WWW: http://code.google.com/p/freetype-gl/
|
|
5 * ----------------------------------------------------------------------------
|
|
6 * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.
|
|
7 *
|
|
8 * Redistribution and use in source and binary forms, with or without
|
|
9 * modification, are permitted provided that the following conditions are met:
|
|
10 *
|
|
11 * 1. Redistributions of source code must retain the above copyright notice,
|
|
12 * this list of conditions and the following disclaimer.
|
|
13 *
|
|
14 * 2. Redistributions in binary form must reproduce the above copyright
|
|
15 * notice, this list of conditions and the following disclaimer in the
|
|
16 * documentation and/or other materials provided with the distribution.
|
|
17 *
|
|
18 * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''AS IS'' AND ANY EXPRESS OR
|
|
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
21 * EVENT SHALL NICOLAS P. ROUGIER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
22 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28 *
|
|
29 * The views and conclusions contained in the software and documentation are
|
|
30 * those of the authors and should not be interpreted as representing official
|
|
31 * policies, either expressed or implied, of Nicolas P. Rougier.
|
|
32 * ============================================================================
|
|
33 */
|
|
34 #ifndef __PLATFORM_H__
|
|
35 #define __PLATFORM_H__
|
|
36
|
|
37 #include <stdlib.h>
|
|
38
|
|
39 //-------------------------------------------------
|
|
40 // stdint.h is not available on VS2008 or lower
|
|
41 //-------------------------------------------------
|
|
42 #ifdef _MSC_VER
|
|
43 typedef __int32 int32_t;
|
|
44 typedef unsigned __int32 uint32_t;
|
|
45 typedef __int64 int64_t;
|
|
46 typedef unsigned __int64 uint64_t;
|
|
47 #else
|
|
48 #include <stdint.h>
|
|
49 #endif // _MSC_VER
|
|
50
|
|
51 #ifdef __cplusplus
|
|
52 extern "C" {
|
|
53 #endif
|
|
54
|
|
55 #ifdef __APPLE__
|
|
56 /* strndup() was only added in OSX lion */
|
|
57 char * strndup( const char *s1, size_t n);
|
|
58 #elif defined(_WIN32) || defined(_WIN64)
|
|
59 /* does not exist on windows */
|
|
60 char * strndup( const char *s1, size_t n);
|
|
61 // double round (float v);
|
|
62 # pragma warning (disable: 4244) // suspend warnings
|
|
63 #endif // _WIN32 || _WIN64
|
|
64
|
|
65 #ifdef __cplusplus
|
|
66 }
|
|
67 #endif // __cplusplus
|
|
68
|
|
69 #endif /* __PLATFORM_H__ */
|