#ifndef __FLOCK_HXX #define __FLOCK_HXX #include #include extern void ShowReadOnlyCacheDialog(char* pszHostName); #include #include #include #include #include #include #include #include #include #include #include #if defined(UNIX) && defined(ux10) #undef M #include #define M * 1048576 #else #include #endif #include #include #define LF "lf" #define LOCKDBF "lockdbf" #define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) #define read_lock(fd, offset, whence, len) \ lock_reg(fd, F_SETLK, F_RDLCK, offset, whence, len) #define readw_lock(fd, offset, whence, len) \ lock_reg(fd, F_SETLKW, F_RDLCK, offset, whence, len) #define write_lock(fd, offset, whence, len) \ lock_reg(fd, F_SETLK, F_WRLCK, offset, whence, len) #define writew_lock(fd, offset, whence, len) \ lock_reg(fd, F_SETLKW, F_WRLCK, offset, whence, len) #define un_lock(fd, offset, whence, len) \ lock_reg(fd, F_SETLK, F_UNLCK, offset, whence, len) #define can_readlock(fd, offset, whence, len) \ lock_test(fd, F_RDLCK, offset, whence, len) #define can_writelock(fd, offset, whence, len) \ lock_test(fd, F_WRLCK, offset, whence, len) #endif /* __FLOCK_HXX */