fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer/*
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2000, 2001, 2004, 2005, 2007, 2016 Internet Systems Consortium, Inc. ("ISC")
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer */
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
70e5a7403f0e0a3bd292b8287c5fed5772c15270Automatic Updater/* $Id: errno2result.h,v 1.10 2007/06/19 23:47:19 tbox Exp $ */
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer#ifndef UNIX_ERRNO2RESULT_H
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer#define UNIX_ERRNO2RESULT_H 1
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer/* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer#include <errno.h> /* Provides errno. */
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer#include <isc/lang.h>
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer#include <isc/types.h>
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny MayerISC_LANG_BEGINDECLS
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
ab9871e71eac6b33ce92a0ad26dc50d0ff241e3bMark Andrews#define isc__errno2result(posixerrno) \
f5898cf3484b1588d5239faa4062a2b2b606ce91Evan Hunt isc__errno2resultx(posixerrno, ISC_TRUE, __FILE__, __LINE__)
ab9871e71eac6b33ce92a0ad26dc50d0ff241e3bMark Andrews
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayerisc_result_t
f5898cf3484b1588d5239faa4062a2b2b606ce91Evan Huntisc__errno2resultx(int posixerrno, isc_boolean_t dolog,
f5898cf3484b1588d5239faa4062a2b2b606ce91Evan Hunt const char *file, int line);
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny MayerISC_LANG_ENDDECLS
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer
fc4bae7e83ae2d6319b02bd20b6ef40116c2fe86Danny Mayer#endif /* UNIX_ERRNO2RESULT_H */