VirtualBox

source: kStuff/trunk/include/k/kErr.h@ 18

Last change on this file since 18 was 2, checked in by bird, 18 years ago

Imported http://svn.netlabs.org/repos/libc/trunk/kStuff, revision 3612.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.7 KB
Line 
1/* $Id: kErr.h 2 2007-11-16 16:07:14Z bird $ */
2/** @file
3 * kErr - Status Code API.
4 */
5
6/*
7 * Copyright (c) 2007 knut st. osmundsen <[email protected]>
8 *
9 * This file is part of kStuff.
10 *
11 * kStuff is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * kStuff is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with kStuff; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 *
25 */
26
27#ifndef ___k_kErr_h___
28#define ___k_kErr_h___
29
30/** @defgroup grp_kErr kErr - Status Code API
31 * @{
32 */
33
34/** @def KERR_DECL
35 * Declares a kRdr function according to build context.
36 * @param type The return type.
37 */
38#if defined(KERR_BUILDING_DYNAMIC)
39# define KERR_DECL(type) K_DECL_EXPORT(type)
40#elif defined(KRDR_BUILT_DYNAMIC)
41# define KERR_DECL(type) K_DECL_IMPORT(type)
42#else
43# define KERR_DECL(type) type
44#endif
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50KERR_DECL(const char *) kErrName(int rc);
51KERR_DECL(int) kErrFromErrno(int);
52KERR_DECL(int) kErrFromOS2(unsigned long rcOs2);
53KERR_DECL(int) kErrFromNtStatus(long rcNtStatus);
54KERR_DECL(int) kErrFromMach(int rcMach);
55KERR_DECL(int) kErrFromDarwin(int rcDarwin);
56
57#ifdef __cplusplus
58}
59#endif
60
61/** @} */
62
63#endif
64
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette