"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.17.5/bin/confgen/util.h" (4 Sep 2020, 1246 Bytes) of package /linux/misc/dns/bind9/9.17.5/bind-9.17.5.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "util.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef RNDC_UTIL_H
   13 #define RNDC_UTIL_H 1
   14 
   15 /*! \file */
   16 
   17 #include <isc/attributes.h>
   18 #include <isc/formatcheck.h>
   19 #include <isc/lang.h>
   20 #include <isc/platform.h>
   21 
   22 #define NS_CONTROL_PORT 953
   23 
   24 #undef DO
   25 #define DO(name, function)                                                \
   26     do {                                                              \
   27         result = function;                                        \
   28         if (result != ISC_R_SUCCESS)                              \
   29             fatal("%s: %s", name, isc_result_totext(result)); \
   30         else                                                      \
   31             notify("%s", name);                               \
   32     } while (0)
   33 
   34 ISC_LANG_BEGINDECLS
   35 
   36 void
   37 notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2);
   38 
   39 ISC_NORETURN void
   40 fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
   41 
   42 ISC_LANG_ENDDECLS
   43 
   44 #endif /* RNDC_UTIL_H */