summaryrefslogtreecommitdiff
path: root/source3/include/includes.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r--source3/include/includes.h60
1 files changed, 48 insertions, 12 deletions
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