xref: /haiku/src/add-ons/kernel/file_systems/ntfs/libntfs/compat.h (revision 1acbe440b8dd798953bec31d18ee589aa3f71b73)
1 /*
2  * compat.h - Tweaks for Windows compatibility.
3  *
4  * Copyright (c) 2002 Richard Russon
5  * Copyright (c) 2002-2004 Anton Altaparmakov
6  *
7  * This program/include file is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as published
9  * by the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program/include file is distributed in the hope that it will be
13  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program (in the main directory of the NTFS-3G
19  * distribution in the file COPYING); if not, write to the Free Software
20  * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22 
23 #ifndef _NTFS_COMPAT_H
24 #define _NTFS_COMPAT_H
25 
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29 
30 #ifdef WINDOWS
31 
32 #ifndef HAVE_FFS
33 #define HAVE_FFS
34 extern int ffs(int i);
35 #endif /* HAVE_FFS */
36 
37 #define HAVE_STDIO_H		/* mimic config.h */
38 #define HAVE_STDARG_H
39 
40 #define atoll			_atoi64
41 #define fdatasync		commit
42 #define __inline__		inline
43 #define __attribute__(X)	/*nothing*/
44 
45 #else /* !defined WINDOWS */
46 
47 #ifndef O_BINARY
48 #define O_BINARY		0		/* unix is binary by default */
49 #endif
50 
51 #endif /* defined WINDOWS */
52 
53 #endif /* defined _NTFS_COMPAT_H */
54 
55