]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ntp/sntp/kludges.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ntp / sntp / kludges.h
1 /*  Copyright (C) 1996, 2000 N.M. Maclaren
2     Copyright (C) 1996, 2000 The University of Cambridge
3
4 This includes all of the kludges necessary for certain broken systems.  It is
5 called after all other headers.  All of the modules set a flag to say which
6 they are, but none of the current kludges critically need that information. */
7
8
9
10 /* stdlib.h is broken under SunOS4. */
11
12 #ifndef EXIT_SUCCESS
13 #define EXIT_SUCCESS       0
14 #define EXIT_FAILURE       1
15 #endif
16
17
18
19 /* stdio.h is also broken under SunOS4. */
20
21 #ifndef SEEK_SET
22 #define SEEK_SET           0
23 #endif
24
25
26
27 /* netinet/in.h sometimes omits INADDR_LOOPBACK, or makes it conditional on
28 peculiar preprocessor symbols. */
29
30 #ifndef INADDR_LOOPBACK
31 #define INADDR_LOOPBACK    0x7f000001ul
32 #endif
33
34
35
36 /* HP-UX up to version 9.x does not have adjtime, so make it fail.  This needs
37 a flag setting in Makefile. */
38
39 #ifdef ADJTIME_MISSING
40 #define adjtime(x,y)       1
41 #endif
42
43
44
45 /* O_NONBLOCK doesn't work under Ultrix 4.3.  This needs a flag setting in
46 Makefile. */
47
48 #ifdef NONBLOCK_BROKEN
49 #ifdef O_NONBLOCK
50 #undef O_NONBLOCK
51 #endif
52 #define O_NONBLOCK         O_NDELAY
53 #endif
54
55
56
57 /* Some older systems use EWOULDBLOCK rather than EAGAIN, but don't assume that
58 it is defined.  The differences are not relevant to this program. */
59
60 #ifndef EWOULDBLOCK
61 #define EWOULDBLOCK        EAGAIN
62 #endif