MiniDLNA update: 1.0.19.1 to 1.0.20
[tomato.git] / release / src / router / ntfs-3g / include / ntfs-3g / compat.h
blobd66205937cf092aa6b68fad58dcd7b62711bedb1
1 /*
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
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30 #ifdef HAVE_SYS_PARAM_H
31 #include <sys/param.h>
32 #endif
34 #ifndef PATH_MAX
35 #define PATH_MAX 4096
36 #endif
38 #ifndef HAVE_FFS
39 extern int ffs(int i);
40 #endif /* HAVE_FFS */
42 #ifndef HAVE_DAEMON
43 extern int daemon(int nochdir, int noclose);
44 #endif /* HAVE_DAEMON */
46 #ifndef HAVE_STRSEP
47 extern char *strsep(char **stringp, const char *delim);
48 #endif /* HAVE_STRSEP */
50 #ifdef WINDOWS
52 #define HAVE_STDIO_H /* mimic config.h */
53 #define HAVE_STDARG_H
55 #define atoll _atoi64
56 #define fdatasync commit
57 #define __inline__ inline
58 #define __attribute__(X) /*nothing*/
60 #else /* !defined WINDOWS */
62 #ifndef O_BINARY
63 #define O_BINARY 0 /* unix is binary by default */
64 #endif
66 #endif /* defined WINDOWS */
68 #endif /* defined _NTFS_COMPAT_H */