PageRenderTime 38ms CodeModel.GetById 31ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/ntp/sntp/kludges.h

https://bitbucket.org/freebsd/freebsd-head/
C++ Header | 62 lines | 22 code | 24 blank | 16 comment | 0 complexity | bcfa4666bbf3099242ffe4d28004d048 MD5 | raw file
 1/*  Copyright (C) 1996, 2000 N.M. Maclaren
 2    Copyright (C) 1996, 2000 The University of Cambridge
 3
 4This includes all of the kludges necessary for certain broken systems.  It is
 5called after all other headers.  All of the modules set a flag to say which
 6they 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
28peculiar 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
37a 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
46Makefile. */
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
58it is defined.  The differences are not relevant to this program. */
59
60#ifndef EWOULDBLOCK
61#define EWOULDBLOCK        EAGAIN
62#endif