1 #ifndef __PLATFORM_DEFS_H__
2 #define __PLATFORM_DEFS_H__
5 * Copyright (C) 2005-2013 Team XBMC
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)
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.
18 * You should have received a copy of the GNU General Public License
19 * along with XBMC; see the file COPYING. If not, see
20 * <http://www.gnu.org/licenses/>.
26 #define LINE_ENDING "\r\n"
28 #define __STDC_FORMAT_MACROS
31 typedef __int64 off64_t;
32 typedef __int64 fpos64_t;
33 typedef __int64 __off64_t;
38 #define snprintf _snprintf
39 #define ftello64 _ftelli64
40 #define fseeko64 _fseeki64
42 #define strcasecmp strcmpi
45 #define strncasecmp strnicmp
49 #define pclose _pclose
53 #define PIXEL_ASHIFT 0
54 #define PIXEL_RSHIFT 8
55 #define PIXEL_GSHIFT 16
56 #define PIXEL_BSHIFT 24
57 #define AMASK 0x000000ff
58 #define RMASK 0x0000ff00
59 #define GMASK 0x00ff0000
60 #define BMASK 0xff000000
63 #define PIXEL_ASHIFT 24
64 #define PIXEL_RSHIFT 16
65 #define PIXEL_GSHIFT 8
66 #define PIXEL_BSHIFT 0
67 #define AMASK 0xff000000
68 #define RMASK 0x00ff0000
69 #define GMASK 0x0000ff00
70 #define BMASK 0x000000ff
74 #define va_copy(dst, src) ((dst) = (src))
77 #define lrint(x) ((x) >= 0 ? ((int)((x) + 0.5)) : ((int)((x) - 0.5)))
78 #define llrint(x) ((x) >= 0 ? ((__int64)((x) + 0.5)) : ((__int64)((x) - 0.5)))
80 #define strtoll(p, e, b) _strtoi64(p, e, b)
82 extern "C" char * strptime(const char *buf, const char *fmt, struct tm *tm);
83 extern "C" int strverscmp (const char *s1, const char *s2);
84 extern "C" char * strcasestr(const char* haystack, const char* needle);
86 #endif // TARGET_WINDOWS
88 #endif //__PLATFORM_DEFS_H__