2 * compat.h - Tweaks for Windows compatibility.
4 * Copyright (c) 2002 Richard Russon
5 * Copyright (c) 2002-2004 Anton Altaparmakov
6 * Copyright (c) 2008-2009 Szabolcs Szakacsits
8 * This program/include file is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as published
10 * by the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program/include file is distributed in the hope that it will be
14 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 * of 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 this program (in the main directory of the NTFS-3G
20 * distribution in the file COPYING); if not, write to the Free Software
21 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef _NTFS_COMPAT_H
25 #define _NTFS_COMPAT_H
30 #ifdef HAVE_SYS_PARAM_H
31 #include <sys/param.h>
39 extern int ffs(int i
);
43 extern int daemon(int nochdir
, int noclose
);
44 #endif /* HAVE_DAEMON */
47 extern char *strsep(char **stringp
, const char *delim
);
48 #endif /* HAVE_STRSEP */
52 #define HAVE_STDIO_H /* mimic config.h */
56 #define fdatasync commit
57 #define __inline__ inline
58 #define __attribute__(X) /*nothing*/
60 #else /* !defined WINDOWS */
63 #define O_BINARY 0 /* unix is binary by default */
66 #endif /* defined WINDOWS */
68 #endif /* defined _NTFS_COMPAT_H */