xine-lib  1.2.10
compat.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2018 the xine project
3  *
4  * This file is part of xine, a unix video player.
5  *
6  * xine is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * xine is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  */
20 
21 #ifndef XINE_COMPAT_H
22 #define XINE_COMPAT_H
23 
24 #include <limits.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #if defined _MSC_VER
31 #define __XINE_FUNCTION__ __FILE__
32 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
33 #define __XINE_FUNCTION__ __func__
34 #elif defined __GNUC__
35 #define __XINE_FUNCTION__ __FUNCTION__
36 #else
37 #define __XINE_FUNCTION__ __func__
38 #endif
39 
40 #ifndef NAME_MAX
41 #define XINE_NAME_MAX 256
42 #else
43 #define XINE_NAME_MAX NAME_MAX
44 #endif
45 
46 #ifndef PATH_MAX
47 #define XINE_PATH_MAX 768
48 #else
49 #define XINE_PATH_MAX PATH_MAX
50 #endif
51 
52 #if !defined offsetof && defined __GNUC__
53 #define offsetof(type, member) __builtin_offsetof(type, member)
54 #endif
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif