xref: /netbsd-src/external/bsd/ntp/dist/libntp/lib/isc/unix/errno2result.h (revision eabc0478de71e4e011a5b4e0392741e01d491794)
1*eabc0478Schristos /*	$NetBSD: errno2result.h,v 1.2 2024/08/18 20:47:15 christos Exp $	*/
2897be3a4Schristos 
3897be3a4Schristos /*
4897be3a4Schristos  * Copyright (C) 2004, 2005, 2007, 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
5897be3a4Schristos  * Copyright (C) 2000, 2001  Internet Software Consortium.
6897be3a4Schristos  *
7897be3a4Schristos  * Permission to use, copy, modify, and/or distribute this software for any
8897be3a4Schristos  * purpose with or without fee is hereby granted, provided that the above
9897be3a4Schristos  * copyright notice and this permission notice appear in all copies.
10897be3a4Schristos  *
11897be3a4Schristos  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12897be3a4Schristos  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13897be3a4Schristos  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14897be3a4Schristos  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15897be3a4Schristos  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16897be3a4Schristos  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17897be3a4Schristos  * PERFORMANCE OF THIS SOFTWARE.
18897be3a4Schristos  */
19897be3a4Schristos 
20897be3a4Schristos /* Id */
21897be3a4Schristos 
22897be3a4Schristos #ifndef UNIX_ERRNO2RESULT_H
23897be3a4Schristos #define UNIX_ERRNO2RESULT_H 1
24897be3a4Schristos 
25897be3a4Schristos /*! \file */
26897be3a4Schristos 
27897be3a4Schristos /* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */
28897be3a4Schristos 
29897be3a4Schristos #include <errno.h>		/* Provides errno. */
30897be3a4Schristos 
31897be3a4Schristos #include <isc/lang.h>
32897be3a4Schristos #include <isc/types.h>
33897be3a4Schristos 
34897be3a4Schristos ISC_LANG_BEGINDECLS
35897be3a4Schristos 
36897be3a4Schristos #define isc__errno2result(x) isc___errno2result(x, __FILE__, __LINE__)
37897be3a4Schristos 
38897be3a4Schristos isc_result_t
39897be3a4Schristos isc___errno2result(int posixerrno, const char *file, unsigned int line);
40897be3a4Schristos 
41897be3a4Schristos ISC_LANG_ENDDECLS
42897be3a4Schristos 
43897be3a4Schristos #endif /* UNIX_ERRNO2RESULT_H */
44