10l for me
[mplayer/greg.git] / libmpdvdkit2 / common.h
blob959d4a806270178e8d8535d25af85a07294cd2c7
1 /*****************************************************************************
2 * common.h: common definitions
3 * Collection of useful common types and macros definitions
4 *****************************************************************************
5 * Copyright (C) 1998, 1999, 2000 VideoLAN
7 * Modified for use with MPlayer, changes contained in libdvdcss_changes.diff.
8 * detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
9 * $Id$
11 * Authors: Samuel Hocevar <sam@via.ecp.fr>
12 * Vincent Seguin <seguin@via.ecp.fr>
13 * Gildas Bazin <gbazin@netcourrier.com>
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
28 *****************************************************************************/
30 /*****************************************************************************
31 * Basic types definitions
32 *****************************************************************************/
33 #include <inttypes.h>
35 #ifdef __CYGWIN__
36 #define SYS_CYGWIN
37 #endif
39 #if defined( WIN32 )
41 #ifndef PATH_MAX
42 # define PATH_MAX MAX_PATH
43 #endif
45 /* several type definitions */
46 # if defined( __MINGW32__ )
47 # if !defined( _OFF_T_ )
48 typedef long long _off_t;
49 typedef _off_t off_t;
50 # define _OFF_T_
51 # else
52 # define off_t long long
53 # endif
54 # endif
56 # if defined( _MSC_VER )
57 # if !defined( _OFF_T_DEFINED )
58 typedef __int64 off_t;
59 # define _OFF_T_DEFINED
60 # else
61 # define off_t __int64
62 # endif
63 # define stat _stati64
64 # endif
66 # ifndef snprintf
67 # define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */
68 # endif
70 #endif