"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.11.23/bin/confgen/util.h" (7 Sep 2020, 1002 Bytes) of package /linux/misc/dns/bind9/9.11.23/bind-9.11.23.tar.gz:


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 and the last Fossies "Diffs" side-by-side code changes report: 9.17.1_vs_9.17.2.

    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 
   13 #ifndef RNDC_UTIL_H
   14 #define RNDC_UTIL_H 1
   15 
   16 /*! \file */
   17 
   18 #include <isc/lang.h>
   19 #include <isc/platform.h>
   20 
   21 #include <isc/formatcheck.h>
   22 
   23 #define NS_CONTROL_PORT     953
   24 
   25 #undef DO
   26 #define DO(name, function) \
   27     do { \
   28         result = function; \
   29         if (result != ISC_R_SUCCESS) \
   30             fatal("%s: %s", name, isc_result_totext(result)); \
   31         else \
   32             notify("%s", name); \
   33     } while (0)
   34 
   35 ISC_LANG_BEGINDECLS
   36 
   37 void
   38 notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2);
   39 
   40 ISC_PLATFORM_NORETURN_PRE void
   41 fatal(const char *format, ...)
   42 ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
   43 
   44 ISC_LANG_ENDDECLS
   45 
   46 #endif /* RNDC_UTIL_H */