2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
11 /* We have the VFS library. Include the header file if possible, or define
12 * stuff ourselves if not.
15 # define VFS_STANDALONE 1
19 # include <sys/stat.h>
21 # include <sys/types.h>
23 void mc_vfs_init(void);
24 DIR *mc_opendir (char *dirname
);
25 struct dirent
*mc_readdir(DIR *dirp
);
26 int mc_closedir (DIR *dir
);
27 int mc_telldir (DIR *dir
);
28 void mc_seekdir (DIR *dir
, int offset
);
30 int mc_open (const char *filename
, int flags
, ...);
31 int mc_close (int handle
);
32 int mc_read (int handle
, char *buffer
, int count
);
33 int mc_write (int hanlde
, char *buffer
, int count
);
35 int mc_stat (char *path
, struct stat
*buf
);
36 int mc_lstat (char *path
, struct stat
*buf
);
37 int mc_fstat (int fd
, struct stat
*buf
);
40 #else /* HAVE_LIBVFS */
42 /* We don't have VFS installed. Just use the normal functions instead. */
44 /* Include these here so that we don't get code that compiles with
45 * VFS but not without.
47 # include <sys/stat.h>
49 # include <sys/types.h>
53 # define mc_close close
55 # define mc_write write
57 # define mc_stat(x, y) stat(x, y)
58 # define mc_lstat(x, y) lstat(x, y)
59 # define mc_fstat(x, y) fstat(x, y)
60 # define mc_opendir(x) opendir(x)
61 # define mc_closedir(x) closedir(x)
62 # define mc_readdir(x) readdir(x)
63 # define mc_seekdir(x, o) seekdir(x, o)
64 # define mc_telldir(x) telldir(x)
68 #endif /* _MY_VFS_H */