File: compat.h

package info (click to toggle)
db1-compat 2.1.3-19
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 636 kB
  • sloc: ansic: 7,120; makefile: 60
file content (55 lines) | stat: -rw-r--r-- 1,275 bytes parent folder | download | duplicates (7)
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
48
49
50
51
52
53
54
55
/* Values for building 4.4 BSD db routines in the GNU C library.  */

#ifndef _compat_h_
#define _compat_h_

#include <fcntl.h>

/*
 * If you can't provide lock values in the open(2) call.  Note, this
 * allows races to happen.
 */
#ifndef O_EXLOCK			/* 4.4BSD extension. */
#define	O_EXLOCK	0
#endif

#ifndef O_SHLOCK			/* 4.4BSD extension. */
#define	O_SHLOCK	0
#endif

#include <errno.h>

#ifndef EFTYPE
#define	EFTYPE		EINVAL		/* POSIX 1003.1 format errno. */
#endif

#include <unistd.h>
#include <limits.h>

#ifndef _POSIX_VDISABLE			/* POSIX 1003.1 disabling char. */
#define	_POSIX_VDISABLE	0		/* Some systems used 0. */
#endif

#include <termios.h>

#ifndef	TCSASOFT			/* 4.4BSD extension. */
#define	TCSASOFT	0
#endif

#include <sys/param.h>

#ifndef	MAX				/* Usually found in <sys/param.h>. */
#define	MAX(_a,_b)	((_a)<(_b)?(_b):(_a))
#endif
#ifndef	MIN				/* Usually found in <sys/param.h>. */
#define	MIN(_a,_b)	((_a)<(_b)?(_a):(_b))
#endif

/* Define ALIASNAME as a weak alias for NAME.
   If weak aliases are not available, this defines a strong alias.  */
#define weak_alias(name, aliasname) _weak_alias (name, aliasname)
#define _weak_alias(name, aliasname) \
  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));


#endif /* compat.h */