Deleted Added
full compact
util.h (193149) util.h (204619)
1/*
1/*
2 * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
2 * Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1998-2001 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
3 * Copyright (C) 1998-2001 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/* $Id: util.h,v 1.30 2007/06/19 23:47:18 tbox Exp $ */
18/* $Id: util.h,v 1.30.332.2 2010/01/11 23:47:22 tbox Exp $ */
19
20#ifndef ISC_UTIL_H
21#define ISC_UTIL_H 1
22
23/*! \file isc/util.h
24 * NOTE:
25 *
26 * This file is not to be included from any <isc/???.h> (or other) library

--- 198 unchanged lines hidden (view full) ---

225/*% Runtime Check */
226#define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
227
228/*%
229 * Time
230 */
231#define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS)
232
19
20#ifndef ISC_UTIL_H
21#define ISC_UTIL_H 1
22
23/*! \file isc/util.h
24 * NOTE:
25 *
26 * This file is not to be included from any <isc/???.h> (or other) library

--- 198 unchanged lines hidden (view full) ---

225/*% Runtime Check */
226#define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
227
228/*%
229 * Time
230 */
231#define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS)
232
233/*%
234 * Prevent Linux spurious warnings
235 */
236#if defined(__GNUC__) && (__GNUC__ > 3)
237#define isc_util_fwrite(a, b, c, d) \
238 __builtin_expect(fwrite((a), (b), (c), (d)), (c))
239#else
240#define isc_util_fwrite(a, b, c, d) fwrite((a), (b), (c), (d))
241#endif
242
233#endif /* ISC_UTIL_H */
243#endif /* ISC_UTIL_H */