]> git.ipfire.org Git - thirdparty/dhcp.git/blame - includes/cdefs.h
- Code cleanup: remove obsolete PROTO, KandR, INLINE and ANSI_DECL macros
[thirdparty/dhcp.git] / includes / cdefs.h
CommitLineData
d7837182
TL
1/* cdefs.h
2
3 Standard C definitions... */
4
5/*
6 * Copyright (c) 1995 RadioMail Corporation. All rights reserved.
fb30f3fc 7 * Copyright (c) 2011 by Internet Systems Consortium, Inc. ("ISC")
ae566556 8 * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
98311e4b 9 * Copyright (c) 1996-2003 by Internet Software Consortium
d7837182 10 *
98311e4b
DH
11 * Permission to use, copy, modify, and distribute this software for any
12 * purpose with or without fee is hereby granted, provided that the above
13 * copyright notice and this permission notice appear in all copies.
d7837182 14 *
98311e4b
DH
15 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
16 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
18 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
d7837182 22 *
98311e4b
DH
23 * Internet Systems Consortium, Inc.
24 * 950 Charter Street
25 * Redwood City, CA 94063
26 * <info@isc.org>
2c85ac9b 27 * https://www.isc.org/
d7837182
TL
28 *
29 * This software was written for RadioMail Corporation by Ted Lemon
86461900 30 * under a contract with Vixie Enterprises. Further modifications have
98311e4b 31 * been made for Internet Systems Consortium under a contract
86461900 32 * with Vixie Laboratories.
d7837182
TL
33 */
34
bfc3d448
TL
35#if !defined (__ISC_DHCP_CDEFS_H__)
36#define __ISC_DHCP_CDEFS_H__
ab58ff49
TL
37/* Delete attributes if not gcc or not the right version of gcc. */
38#if !defined(__GNUC__) || __GNUC__ < 2 || \
d758ad8c 39 (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined (darwin)
ab58ff49
TL
40#define __attribute__(x)
41#endif
42
ae566556
SR
43/* The following macro handles the case of unwanted return values. In
44 * GCC one can specify an attribute for a function to generate a warning
45 * if the return value of the function is ignored and one can't dispose of
46 * the warning by the use of void. In conjunction with the use of -Werror
47 * these warnings prohibit the compilation of the package. This macro
48 * allows us to assign the return value to a variable and then ignore it.
49 */
fb30f3fc 50#if !defined(__GNUC__) || (__GNUC__ < 4)
ae566556
SR
51#define IGNORE_RET(x) (void) x
52#else
53#define IGNORE_RET(x) \
54 do { \
55 int ignore_return; \
56 ignore_return = x; \
57 } while (0)
58#endif
59
bfc3d448 60#endif /* __ISC_DHCP_CDEFS_H__ */