From 623a18db4b0f46c80c29e93a0ad0a2fcbfec71dc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 4 Sep 1998 00:23:28 +0000 Subject: More 64 bit stuff - now the fcntl locks are 64 bit clean. Nearly at the stage where I can expose the 64-bit-ness to the NT clients.... Jeremy. (This used to be commit 422f1dd45074c0e28203aca5952e57bbe56676b6) --- source3/include/includes.h | 60 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 12 deletions(-) (limited to 'source3/include/includes.h') diff --git a/source3/include/includes.h b/source3/include/includes.h index 41fccce5fe..4086bd53fe 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -330,11 +330,11 @@ #endif #ifndef SMB_OFF_T -#ifdef HAVE_OFF64_T -#define SMB_OFF_T off64_t -#else -#define SMB_OFF_T off_t -#endif +# ifdef HAVE_OFF64_T +# define SMB_OFF_T off64_t +# else +# define SMB_OFF_T off_t +# endif #endif /* @@ -343,9 +343,9 @@ */ #ifndef LARGE_SMB_OFF_T -#if defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) -#define LARGE_SMB_OFF_T 1 -#endif +# if defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) +# define LARGE_SMB_OFF_T 1 +# endif #endif /* @@ -353,11 +353,47 @@ */ #ifndef SMB_STRUCT_STAT -#if defined(HAVE_STAT64) && defined(HAVE_OFF64_T) -#define SMB_STRUCT_STAT struct stat64 -#else -#define SMB_STRUCT_STAT struct stat +# if defined(HAVE_STAT64) && defined(HAVE_OFF64_T) +# define SMB_STRUCT_STAT struct stat64 +# else +# define SMB_STRUCT_STAT struct stat +# endif +#endif + +/* + * Defines for 64 bit fcntl locks. + */ + +#ifndef SMB_STRUCT_FLOCK +# if defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_STRUCT_FLOCK struct flock64 +# else +# define SMB_STRUCT_FLOCK struct flock +# endif +#endif + +#ifndef SMB_F_SETLKW +# if defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_F_SETLKW F_SETLKW64 +# else +# define SMB_F_SETLKW F_SETLKW +# endif #endif + +#ifndef SMB_F_SETLK +# if defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_F_SETLK F_SETLK64 +# else +# define SMB_F_SETLK F_SETLK +# endif +#endif + +#ifndef SMB_F_GETLK +# if defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_F_GETLK F_GETLK64 +# else +# define SMB_F_GETLK F_GETLK +# endif #endif #ifndef MIN -- cgit