xine-lib  1.2.9
compat.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2013 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 __GNUC__
33 #define __XINE_FUNCTION__ __FUNCTION__
34 #else
35 #define __XINE_FUNCTION__ __func__
36 #endif
37 
38 #ifndef NAME_MAX
39 #define XINE_NAME_MAX 256
40 #else
41 #define XINE_NAME_MAX NAME_MAX
42 #endif
43 
44 #ifndef PATH_MAX
45 #define XINE_PATH_MAX 768
46 #else
47 #define XINE_PATH_MAX PATH_MAX
48 #endif
49 
50 #if !defined offsetof && defined __GNUC__
51 #define offsetof(type, member) __builtin_offsetof(type, member)
52 #endif
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif