Displaying 9 results from an estimated 9 matches for "flock64".
2019 Jan 21
0
[klibc:master] fcntl: Fix struct flock for 32-bit architectures
...define HAVE_ARCH_STRUCT_FLOCK
#endif
#include <linux/fcntl.h>
#include <bitsize.h>
-#if _BITSIZE == 32
+#if !defined(__mips__) && _BITSIZE == 32
-/* This is ugly, but "struct flock" has actually been defined with
- a long off_t, so it's really "struct flock64". It just happens
- to work. Gag. Barf.
+/*
+ * <linux/fcntl.h> defines struct flock with offsets of type
+ * __kernel_off_t (= long) and struct flock64 with offsets of
+ * type __kernel_loff_t (= long long). We want struct flock
+ * to have 64-bit offsets, so we define it here.
+...
2019 Jan 18
0
[klibc:master] fcntl: Fix file locking numbers for 64-bit architectures
...++ b/usr/include/fcntl.h
@@ -13,6 +13,9 @@
# include <klibc/archfcntl.h>
#endif
#include <linux/fcntl.h>
+#include <bitsize.h>
+
+#if _BITSIZE == 32
/* This is ugly, but "struct flock" has actually been defined with
a long off_t, so it's really "struct flock64". It just happens
@@ -35,6 +38,8 @@
# define F_SETLKW F_SETLKW64
#endif
+#endif /* _BITSIZE == 32 */
+
/* This is defined here as well as in <unistd.h> */
#ifndef _KLIBC_IN_OPEN_C
__extern int open(const char *, int, ...);
2010 Apr 16
0
[PATCH] add minimal faccessat()
...b/usr/include/fcntl.h
@@ -13,6 +13,11 @@
#endif
#include <linux/fcntl.h>
+/* missing in linux/fcntl.h */
+#ifndef AT_EACCESS
+# define AT_EACCESS 0x200
+#endif
+
/* This is ugly, but "struct flock" has actually been defined with
a long off_t, so it's really "struct flock64". It just happens
to work. Gag. Barf.
diff --git a/usr/include/unistd.h b/usr/include/unistd.h
index 547e717..8cb2877 100644
--- a/usr/include/unistd.h
+++ b/usr/include/unistd.h
@@ -58,7 +58,7 @@ __extern int setfsuid(uid_t);
#define F_OK 0 /* Existence */
__extern int access(cons...
2006 Jun 26
2
[klibc 28/43] mips support for klibc
The parts of klibc specific to the mips architecture.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
commit 8dc79563c06020d8844b9e9b821741828039b59e
tree b957c8fb1fddf486f5c26b1880726051d4f6aaad
parent bc9b363b31d301ab94c115cccc2e079c0d318498
author H. Peter Anvin <hpa at zytor.com> Sun, 25 Jun 2006 16:58:31 -0700
committer H. Peter Anvin <hpa at zytor.com> Sun, 25 Jun
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...e5c94 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -1,5 +1,5 @@
-#ifndef _ASM_GENERIC_FCNTL_H
-#define _ASM_GENERIC_FCNTL_H
+#ifndef _UAPI_ASM_GENERIC_FCNTL_H
+#define _UAPI_ASM_GENERIC_FCNTL_H
#include <linux/types.h>
@@ -204,4 +204,4 @@ struct flock64 {
#endif
#endif /* !CONFIG_64BIT */
-#endif /* _ASM_GENERIC_FCNTL_H */
+#endif /* _UAPI_ASM_GENERIC_FCNTL_H */
diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
index 143dacb..ed09d14 100644
--- a/include/uapi/asm-generic/ioctls.h
+++ b/include/uapi/asm-generic/...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...e5c94 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -1,5 +1,5 @@
-#ifndef _ASM_GENERIC_FCNTL_H
-#define _ASM_GENERIC_FCNTL_H
+#ifndef _UAPI_ASM_GENERIC_FCNTL_H
+#define _UAPI_ASM_GENERIC_FCNTL_H
#include <linux/types.h>
@@ -204,4 +204,4 @@ struct flock64 {
#endif
#endif /* !CONFIG_64BIT */
-#endif /* _ASM_GENERIC_FCNTL_H */
+#endif /* _UAPI_ASM_GENERIC_FCNTL_H */
diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
index 143dacb..ed09d14 100644
--- a/include/uapi/asm-generic/ioctls.h
+++ b/include/uapi/asm-generic/...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...e5c94 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -1,5 +1,5 @@
-#ifndef _ASM_GENERIC_FCNTL_H
-#define _ASM_GENERIC_FCNTL_H
+#ifndef _UAPI_ASM_GENERIC_FCNTL_H
+#define _UAPI_ASM_GENERIC_FCNTL_H
#include <linux/types.h>
@@ -204,4 +204,4 @@ struct flock64 {
#endif
#endif /* !CONFIG_64BIT */
-#endif /* _ASM_GENERIC_FCNTL_H */
+#endif /* _UAPI_ASM_GENERIC_FCNTL_H */
diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
index 143dacb..ed09d14 100644
--- a/include/uapi/asm-generic/ioctls.h
+++ b/include/uapi/asm-generic/...
2013 Apr 19
8
[PATCH 0 of 8] blktap3/libvhd: Introduce VHD library.
This patch series introduces the VHD library. It is based on the blktap2 one,
with changes coming from the blktap2.5 one.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
2003 Dec 01
0
No subject
...program is as follows:
#include <stdio.h>
#include <errno.h>
#include <sys/fcntl.h>
#define BUFSIZE 512
#define PMODE 0644
main(argc,argv)
int argc;
char *argv[];
{
int f1, f2, f3, n, i, count;
char buf[BUFSIZE];
char a;
char temp;
struct flock64 lock;
if ((f2 = open("/borsdumps/BWserver2.txt",O_RDWR|O_CREAT,0666)) ==
-1)
printf("display: can't create file BWServer2.txt,errno =
%d\n",e
rrno);
lock.l_type = F_WRLCK;
lock.l_whence = SEEK_SET;
loc...