#include <fcntl.h>
#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define careful_read ucw_careful_read
+#define careful_write ucw_careful_write
+#define mmap_file ucw_mmap_file
+#define munmap_file ucw_munmap_file
+#define sync_dir ucw_sync_dir
+#endif
-#ifdef CONFIG_LFS
+#ifdef CONFIG_UCW_LARGE_FILES
#define ucw_open open64
#define ucw_seek lseek64
#define ucw_fstat fstat64
typedef struct stat64 ucw_stat_t;
-#else /* !CONFIG_LFS */
+#else /* !CONFIG_UCW_LARGE_FILES */
#define ucw_open open
#define ucw_seek(f,o,w) lseek(f,o,w)
#define ucw_fstat fstat
typedef struct stat ucw_stat_t;
-#endif /* !CONFIG_LFS */
+#endif /* !CONFIG_UCW_LARGE_FILES */
#if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0)
#define ucw_fdatasync fdatasync
/* io-mmap.c */
-void *mmap_file(const char *name, unsigned *len, int writeable);
-void munmap_file(void *start, unsigned len);
+void *mmap_file(const char *name, size_t *len, int writeable);
+void munmap_file(void *start, size_t len);
/* io-careful.c */
-int careful_read(int fd, void *buf, int len);
-int careful_write(int fd, const void *buf, int len);
+int careful_read(int fd, void *buf, size_t len);
+int careful_write(int fd, const void *buf, size_t len);
/* io-sync.c */