File: fcntl.h

package info (click to toggle)
klibc 2.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-backports, jessie-kfreebsd
  • size: 5,376 kB
  • ctags: 7,412
  • sloc: ansic: 48,256; asm: 2,532; perl: 781; makefile: 197; sh: 152
file content (47 lines) | stat: -rw-r--r-- 982 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * fcntl.h
 */

#ifndef _FCNTL_H
#define _FCNTL_H

#include <klibc/extern.h>
#include <klibc/compiler.h>
#include <klibc/seek.h>
#include <sys/types.h>
#if defined(__mips__) && !defined(__mips64__)
# include <klibc/archfcntl.h>
#endif
#include <linux/fcntl.h>

/* 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.

   This happens to work on all 32-bit architectures except MIPS. */

#ifdef F_GETLK64
# undef F_GETLK
# define F_GETLK F_GETLK64
#endif

#ifdef F_SETLK64
# undef F_SETLK
# define F_SETLK F_SETLK64
#endif

#ifdef F_SETLKW64
# undef F_SETLKW
# define F_SETLKW F_SETLKW64
#endif

/* This is defined here as well as in <unistd.h> */
#ifndef _KLIBC_IN_OPEN_C
__extern int open(const char *, int, ...);
__extern int openat(int, const char *, int, ...);
#endif

__extern int creat(const char *, mode_t);
__extern int fcntl(int, int, ...);

#endif				/* _FCNTL_H */