compat.h 978 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Values for building 4.4 BSD db routines in the GNU C library. */
  2. #ifndef _compat_h_
  3. #define _compat_h_
  4. #include <fcntl.h>
  5. /*
  6. * If you can't provide lock values in the open(2) call. Note, this
  7. * allows races to happen.
  8. */
  9. #ifndef O_EXLOCK /* 4.4BSD extension. */
  10. #define O_EXLOCK 0
  11. #endif
  12. #ifndef O_SHLOCK /* 4.4BSD extension. */
  13. #define O_SHLOCK 0
  14. #endif
  15. #include <errno.h>
  16. #ifndef EFTYPE
  17. #define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
  18. #endif
  19. #include <unistd.h>
  20. #include <limits.h>
  21. #ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
  22. #define _POSIX_VDISABLE 0 /* Some systems used 0. */
  23. #endif
  24. #include <termios.h>
  25. #ifndef TCSASOFT /* 4.4BSD extension. */
  26. #define TCSASOFT 0
  27. #endif
  28. #include <sys/param.h>
  29. #ifndef MAX /* Usually found in <sys/param.h>. */
  30. #define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
  31. #endif
  32. #ifndef MIN /* Usually found in <sys/param.h>. */
  33. #define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
  34. #endif
  35. #endif /* compat.h */