summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/config.h.in1
-rw-r--r--source3/include/includes.h60
-rw-r--r--source3/include/proto.h8
3 files changed, 53 insertions, 16 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 71304c86b4..80160fb4b4 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -81,6 +81,7 @@
#undef HAVE_SHARED_MMAP
#undef HAVE_SYSV_IPC
#undef HAVE_FCNTL_LOCK
+#undef HAVE_STRUCT_FLOCK64
#undef HAVE_FTRUNCATE_EXTEND
#undef HAVE_TRAPDOOR_UID
#undef HAVE_ROOT
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
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0e6dc54d34..7313fef8f8 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -337,7 +337,7 @@ char *readdirname(void *p);
BOOL is_in_path(char *name, name_compare_entry *namelist);
void set_namearray(name_compare_entry **ppname_array, char *namelist);
void free_namearray(name_compare_entry *name_array);
-BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type);
+BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int file_lock(char *name,int timeout);
void file_unlock(int fd);
BOOL is_myname(char *s);
@@ -493,12 +493,12 @@ char *smb_errstr(char *inbuf);
/*The following definitions come from locking/locking.c */
BOOL is_locked(files_struct *fsp,connection_struct *conn,
- uint32 count,uint32 offset, int lock_type);
+ SMB_OFF_T count,SMB_OFF_T offset, int lock_type);
BOOL do_lock(files_struct *fsp,connection_struct *conn,
- uint32 count,uint32 offset,int lock_type,
+ SMB_OFF_T count,SMB_OFF_T offset,int lock_type,
int *eclass,uint32 *ecode);
BOOL do_unlock(files_struct *fsp,connection_struct *conn,
- uint32 count,uint32 offset,int *eclass,uint32 *ecode);
+ SMB_OFF_T count,SMB_OFF_T offset,int *eclass,uint32 *ecode);
BOOL locking_init(int read_only);
BOOL locking_end(void);
BOOL lock_share_entry(connection_struct *conn,