1258945Sroberto/*
2280849Scy * Copyright (C) 2004, 2005, 2007, 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
3258945Sroberto * Copyright (C) 2000, 2001  Internet Software Consortium.
4258945Sroberto *
5258945Sroberto * Permission to use, copy, modify, and/or distribute this software for any
6258945Sroberto * purpose with or without fee is hereby granted, provided that the above
7258945Sroberto * copyright notice and this permission notice appear in all copies.
8258945Sroberto *
9258945Sroberto * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10258945Sroberto * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11258945Sroberto * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12258945Sroberto * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13258945Sroberto * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14258945Sroberto * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15258945Sroberto * PERFORMANCE OF THIS SOFTWARE.
16258945Sroberto */
17258945Sroberto
18280849Scy/* $Id$ */
19258945Sroberto
20258945Sroberto#ifndef UNIX_ERRNO2RESULT_H
21258945Sroberto#define UNIX_ERRNO2RESULT_H 1
22258945Sroberto
23258945Sroberto/*! \file */
24258945Sroberto
25258945Sroberto/* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */
26258945Sroberto
27258945Sroberto#include <errno.h>		/* Provides errno. */
28258945Sroberto
29258945Sroberto#include <isc/lang.h>
30258945Sroberto#include <isc/types.h>
31258945Sroberto
32258945SrobertoISC_LANG_BEGINDECLS
33258945Sroberto
34280849Scy#define isc__errno2result(x) isc___errno2result(x, __FILE__, __LINE__)
35280849Scy
36258945Srobertoisc_result_t
37280849Scyisc___errno2result(int posixerrno, const char *file, unsigned int line);
38258945Sroberto
39258945SrobertoISC_LANG_ENDDECLS
40258945Sroberto
41258945Sroberto#endif /* UNIX_ERRNO2RESULT_H */
42