[osx/ios] remove unused function
[vuplus_xbmc] / xbmc / win32 / PlatformDefs.h
1 #ifndef __PLATFORM_DEFS_H__
2 #define __PLATFORM_DEFS_H__
3
4 /*
5  *      Copyright (C) 2005-2008 Team XBMC
6  *      http://www.xbmc.org
7  *
8  *  This Program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2, or (at your option)
11  *  any later version.
12  *
13  *  This Program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with XBMC; see the file COPYING.  If not, write to
20  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21  *  http://www.gnu.org/copyleft/gpl.html
22  *
23  */
24
25 #ifdef _WIN32
26
27 #define LINE_ENDING "\r\n"
28
29 #define __STDC_FORMAT_MACROS
30 #include "inttypes.h"
31
32 typedef __int64       off64_t;
33 typedef __int64       fpos64_t;
34 typedef __int64       __off64_t;
35 typedef long          __off_t;
36 typedef unsigned long ThreadIdentifier;
37
38 #define ssize_t int
39
40 #define snprintf _snprintf
41 #define ftello64 _ftelli64
42 #define fseeko64 _fseeki64
43 #ifndef strcasecmp
44 #define strcasecmp strcmpi
45 #endif
46 #ifndef strncasecmp
47 #define strncasecmp strnicmp
48 #endif
49
50 #ifndef PRIdS
51 #define PRIdS "Id"
52 #endif
53
54 #define popen   _popen
55 #define pclose  _pclose 
56
57 #ifdef HAS_SDL
58 #include <SDL/SDL_endian.h>
59
60 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
61 #define PIXEL_ASHIFT 0
62 #define PIXEL_RSHIFT 8
63 #define PIXEL_GSHIFT 16
64 #define PIXEL_BSHIFT 24
65 #define AMASK 0x000000ff
66 #define RMASK 0x0000ff00
67 #define GMASK 0x00ff0000
68 #define BMASK 0xff000000
69
70 #else
71 #define PIXEL_ASHIFT 24
72 #define PIXEL_RSHIFT 16
73 #define PIXEL_GSHIFT 8
74 #define PIXEL_BSHIFT 0
75 #define AMASK 0xff000000
76 #define RMASK 0x00ff0000
77 #define GMASK 0x0000ff00
78 #define BMASK 0x000000ff
79 #endif
80 #endif
81
82 #ifndef va_copy
83 #define va_copy(dst, src) ((dst) = (src))
84 #endif
85
86 #define lrint(x) ((x) >= 0 ? ((int)((x) + 0.5)) : ((int)((x) - 0.5)))
87 #define llrint(x) ((x) >= 0 ? ((__int64)((x) + 0.5)) : ((__int64)((x) - 0.5)))
88
89 #define strtoll(p, e, b) _strtoi64(p, e, b)
90
91 extern "C" char * strptime(const char *buf, const char *fmt, struct tm *tm);
92 extern "C" int strverscmp (const char *s1, const char *s2);
93 extern "C" char * strcasestr(const char* haystack, const char* needle);
94
95 #endif // _WIN32
96
97 #endif //__PLATFORM_DEFS_H__
98