2001-07-06 01:24:22 -04:00
|
|
|
/*
|
2018-02-23 03:53:12 -05:00
|
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2001-07-06 01:24:22 -04:00
|
|
|
*
|
2016-06-27 00:56:38 -04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2018-02-23 03:53:12 -05:00
|
|
|
*
|
|
|
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
|
|
|
* information regarding copyright ownership.
|
2001-07-06 01:24:22 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef UNIX_ERRNO2RESULT_H
|
|
|
|
|
#define UNIX_ERRNO2RESULT_H 1
|
|
|
|
|
|
|
|
|
|
/* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */
|
|
|
|
|
|
|
|
|
|
#include <errno.h> /* Provides errno. */
|
2018-04-17 11:29:14 -04:00
|
|
|
#include <stdbool.h>
|
2001-07-06 01:24:22 -04:00
|
|
|
|
|
|
|
|
#include <isc/lang.h>
|
|
|
|
|
#include <isc/types.h>
|
|
|
|
|
|
|
|
|
|
ISC_LANG_BEGINDECLS
|
|
|
|
|
|
2005-06-07 21:04:30 -04:00
|
|
|
#define isc__errno2result(posixerrno) \
|
2018-04-17 11:29:14 -04:00
|
|
|
isc__errno2resultx(posixerrno, true, __FILE__, __LINE__)
|
2005-06-07 21:04:30 -04:00
|
|
|
|
2001-07-06 01:24:22 -04:00
|
|
|
isc_result_t
|
2018-04-17 11:29:14 -04:00
|
|
|
isc__errno2resultx(int posixerrno, bool dolog,
|
2016-08-17 14:22:09 -04:00
|
|
|
const char *file, int line);
|
2001-07-06 01:24:22 -04:00
|
|
|
|
|
|
|
|
ISC_LANG_ENDDECLS
|
|
|
|
|
|
|
|
|
|
#endif /* UNIX_ERRNO2RESULT_H */
|