diff --git a/src/xpdev/filewrap.c b/src/xpdev/filewrap.c index fd34ebf6ab88dfb675dc71df5222a9593a4538e7..33a4c602e65c731aa0b957156755d48dd8ac9a40 100644 --- a/src/xpdev/filewrap.c +++ b/src/xpdev/filewrap.c @@ -83,11 +83,7 @@ long DLLCALL filelength(int fd) } /* Sets a lock on a portion of a file */ -#ifdef __QNX__ int DLLCALL lock(int fd, long pos, long len) -#else /* Not QNX */ -int DLLCALL lock(int fd, long pos, int len) -#endif { #if defined(F_SANERDLCKNO) || !defined(BSD) struct flock alock; @@ -122,11 +118,7 @@ int DLLCALL lock(int fd, long pos, int len) } /* Removes a lock from a file record */ -#ifdef __QNX__ int DLLCALL unlock(int fd, long pos, long len) -#else -int DLLCALL unlock(int fd, long pos, int len) -#endif { #if defined(F_SANEUNLCK) || !defined(BSD) @@ -219,7 +211,7 @@ int DLLCALL sopen(const char *fn, int access, int share, ...) #define LK_UNLCK LK_UNLOCK #endif -int DLLCALL lock(int file, long offset, int size) +int DLLCALL lock(int file, long offset, long size) { int i; long pos; @@ -233,7 +225,7 @@ int DLLCALL lock(int file, long offset, int size) return(i); } -int DLLCALL unlock(int file, long offset, int size) +int DLLCALL unlock(int file, long offset, long size) { int i; long pos; diff --git a/src/xpdev/filewrap.h b/src/xpdev/filewrap.h index 61ec9087aa997cc391c324dabae50cb84b52e161..a13a170b08995bc20be3b170d3723894ec4ec9c1 100644 --- a/src/xpdev/filewrap.h +++ b/src/xpdev/filewrap.h @@ -72,7 +72,6 @@ #ifdef __QNX__ #include <share.h> #define L_SET SEEK_SET - #define sopen(x,y,z) qnx_sopen(x,y,z) /* Stupid macro trick */ #else #define O_TEXT 0 /* all files in binary mode on Unix */ #define O_BINARY 0 /* all files in binary mode on Unix */ @@ -113,15 +112,13 @@ extern "C" { #endif -#if !defined(__BORLANDC__) && !defined(__QNX__) - DLLEXPORT int DLLCALL lock(int fd, long pos, int len); - DLLEXPORT int DLLCALL unlock(int fd, long pos, int len); +#if !defined(__BORLANDC__) + DLLEXPORT int DLLCALL lock(int fd, long pos, long len); + DLLEXPORT int DLLCALL unlock(int fd, long pos, long len); #endif #if !defined(__BORLANDC__) && defined(__unix__) -#if !defined(__QNX__) DLLEXPORT int DLLCALL sopen(const char* fn, int access, int share, ...); -#endif DLLEXPORT long DLLCALL filelength(int fd); #endif