VirtualBox

Changeset 76417 in vbox for trunk/include


Ignore:
Timestamp:
Dec 23, 2018 6:59:47 PM (6 years ago)
Author:
vboxsync
Message:

iprt/errcore.h,*: Duplicate some of the most frequently used status codes in the errcore.h header, letting once.h, rest.h and others avoid iprt/err.h and thereby reducing err.h rebuild time (openssl includes once.h for everything). bugref:9344

Location:
trunk/include
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VMMDev.h

    r76393 r76417  
    3434#include <VBox/param.h>                 /* for the PCI IDs. */
    3535#include <VBox/types.h>
    36 #include <VBox/err.h>
     36#include <VBox/err.h> /** @todo replace with errcore.h */
    3737#include <VBox/ostypes.h>
    3838#include <VBox/VMMDevCoreTypes.h>
  • trunk/include/VBox/VMMDevCoreTypes.h

    r76393 r76417  
    3737#include <iprt/types.h>
    3838#ifdef __cplusplus
    39 # include <iprt/err.h> /* VERR_INVALID_PARAMETER */
     39# include <iprt/errcore.h>
    4040#endif
    4141
  • trunk/include/iprt/cpp/path.h

    r76369 r76417  
    2828
    2929#include <iprt/assert.h>
    30 #include <iprt/err.h>
     30#include <iprt/errcore.h>
    3131#include <iprt/path.h>
    3232#include <iprt/cpp/ministring.h>
  • trunk/include/iprt/cpp/restbase.h

    r76355 r76417  
    2929#include <iprt/cdefs.h>
    3030#include <iprt/types.h>
    31 #include <iprt/err.h> /* VERR_NO_MEMORY */
     31#include <iprt/errcore.h> /* VERR_NO_MEMORY */
    3232#include <iprt/json.h>
    3333#include <iprt/stdarg.h>
  • trunk/include/iprt/errcore.h

    r76348 r76417  
    3737 */
    3838
     39/* We duplicate a handful of very commonly used status codes from err.h here.
     40   Needless to say, these needs to match the err.h definition exactly: */
     41
    3942/** Success.
    4043 * @ingroup grp_rt_err  */
    4144#define VINF_SUCCESS                        0
     45
     46/** General failure - DON'T USE THIS!!!
     47 * @ingroup grp_rt_err */
     48#define VERR_GENERAL_FAILURE                (-1)
     49/** Invalid parameter.
     50 * @ingroup grp_rt_err */
     51#define VERR_INVALID_PARAMETER              (-2)
     52/** Invalid parameter.
     53 * @ingroup grp_rt_err */
     54#define VWRN_INVALID_PARAMETER              2
     55/** Invalid magic or cookie.
     56 * @ingroup grp_rt_err */
     57#define VERR_INVALID_MAGIC                  (-3)
     58/** Invalid magic or cookie.
     59 * @ingroup grp_rt_err */
     60#define VWRN_INVALID_MAGIC                  3
     61/** Invalid loader handle.
     62 * @ingroup grp_rt_err */
     63#define VERR_INVALID_HANDLE                 (-4)
     64/** Invalid loader handle.
     65 * @ingroup grp_rt_err */
     66#define VWRN_INVALID_HANDLE                 4
     67/** Invalid memory pointer. */
     68#define VERR_INVALID_POINTER                (-6)
     69/** Memory allocation failed.
     70 * @ingroup grp_rt_err */
     71#define VERR_NO_MEMORY                      (-8)
     72/** Permission denied.
     73 * @ingroup grp_rt_err */
     74#define VERR_PERMISSION_DENIED              (-10)
     75/** Permission denied.
     76 * @ingroup grp_rt_err */
     77#define VINF_PERMISSION_DENIED              10
     78/** Version mismatch.
     79 * @ingroup grp_rt_err */
     80#define VERR_VERSION_MISMATCH               (-11)
     81/** The request function is not implemented.
     82 * @ingroup grp_rt_err */
     83#define VERR_NOT_IMPLEMENTED                (-12)
     84/** Invalid flags was given.
     85 * @ingroup grp_rt_err */
     86#define VERR_INVALID_FLAGS                  (-13)
     87/** Invalid function.
     88 * @ingroup grp_rt_err */
     89#define VERR_INVALID_FUNCTION               (-36)
     90/** Not supported.
     91 * @ingroup grp_rt_err */
     92#define VERR_NOT_SUPPORTED                  (-37)
     93/** Not supported.
     94 * @ingroup grp_rt_err */
     95#define VINF_NOT_SUPPORTED                  37
     96/** Access denied.
     97 * @ingroup grp_rt_err */
     98#define VERR_ACCESS_DENIED                  (-38)
     99/** Call interrupted.
     100 * @ingroup grp_rt_err */
     101#define VERR_INTERRUPTED                    (-39)
     102/** Call interrupted.
     103 * @ingroup grp_rt_err */
     104#define VINF_INTERRUPTED                    39
     105/** Timeout.
     106 * @ingroup grp_rt_err */
     107#define VERR_TIMEOUT                        (-40)
     108/** Timeout.
     109 * @ingroup grp_rt_err */
     110#define VINF_TIMEOUT                        40
     111/** Buffer too small to save result.
     112 * @ingroup grp_rt_err */
     113#define VERR_BUFFER_OVERFLOW                (-41)
     114/** Buffer too small to save result.
     115 * @ingroup grp_rt_err */
     116#define VINF_BUFFER_OVERFLOW                41
     117/** The operation was cancelled by the user (copy) or another thread (local ipc).
     118 * @ingroup grp_rt_err */
     119#define VERR_CANCELLED                      (-70)
     120/** Trailing characters.
     121 * @ingroup grp_rt_err */
     122#define VERR_TRAILING_CHARS                 (-76)
     123/** Trailing characters.
     124 * @ingroup grp_rt_err */
     125#define VWRN_TRAILING_CHARS                 76
     126/** Trailing spaces.
     127 * @ingroup grp_rt_err */
     128#define VERR_TRAILING_SPACES                (-77)
     129/** Trailing spaces.
     130 * @ingroup grp_rt_err */
     131#define VWRN_TRAILING_SPACES                77
     132/** Generic not found error.
     133 * @ingroup grp_rt_err */
     134#define VERR_NOT_FOUND                      (-78)
     135/** Generic not found warning.
     136 * @ingroup grp_rt_err */
     137#define VWRN_NOT_FOUND                      78
     138/** Generic invalid state error.
     139 * @ingroup grp_rt_err */
     140#define VERR_INVALID_STATE                  (-79)
     141/** Generic invalid state warning.
     142 * @ingroup grp_rt_err */
     143#define VWRN_INVALID_STATE                  79
     144/** Generic out of resources error.
     145 * @ingroup grp_rt_err */
     146#define VERR_OUT_OF_RESOURCES               (-80)
     147/** Generic out of resources warning.
     148 * @ingroup grp_rt_err */
     149#define VWRN_OUT_OF_RESOURCES               80
     150/** End of string.
     151 * @ingroup grp_rt_err */
     152#define VERR_END_OF_STRING                  (-83)
     153/** Duplicate something.
     154 * @ingroup grp_rt_err */
     155#define VERR_DUPLICATE                      (-98)
     156/** Something is missing.
     157 * @ingroup grp_rt_err */
     158#define VERR_MISSING                        (-99)
     159/** Buffer underflow.
     160 * @ingroup grp_rt_err */
     161#define VERR_BUFFER_UNDERFLOW               (-22401)
     162/** Buffer underflow.
     163 * @ingroup grp_rt_err */
     164#define VINF_BUFFER_UNDERFLOW               22401
     165/** Something is not available or not working properly.
     166 * @ingroup grp_rt_err */
     167#define VERR_NOT_AVAILABLE                  (-22403)
     168/** Mismatch.
     169 * @ingroup grp_rt_err */
     170#define VERR_MISMATCH                       (-22408)
     171/** Wrong type.
     172 * @ingroup grp_rt_err */
     173#define VERR_WRONG_TYPE                     (-22409)
     174/** Wrong type.
     175 * @ingroup grp_rt_err */
     176#define VWRN_WRONG_TYPE                     (22409)
     177/** Wrong parameter count.
     178 * @ingroup grp_rt_err */
     179#define VERR_WRONG_PARAMETER_COUNT          (-22415)
     180/** Wrong parameter type.
     181 * @ingroup grp_rt_err */
     182#define VERR_WRONG_PARAMETER_TYPE           (-22416)
     183/** Invalid client ID.
     184 * @ingroup grp_rt_err */
     185#define VERR_INVALID_CLIENT_ID              (-22417)
     186/** Invalid session ID.
     187 * @ingroup grp_rt_err */
     188#define VERR_INVALID_SESSION_ID             (-22418)
     189/** Incompatible configuration requested.
     190 * @ingroup grp_rt_err */
     191#define VERR_INCOMPATIBLE_CONFIG            (-22420)
     192/** Internal error - this should never happen.
     193 * @ingroup grp_rt_err */
     194#define VERR_INTERNAL_ERROR                 (-225)
     195
    42196
    43197
  • trunk/include/iprt/latin1.h

    r76350 r76417  
    2727#define ___iprt_latin1_h
    2828
    29 #include <iprt/string.h>
    30 #include <iprt/err.h> /* VERR_END_OF_STRING */
     29#include <iprt/assert.h>
     30#include <iprt/errcore.h> /* VERR_END_OF_STRING */
    3131
    3232RT_C_DECLS_BEGIN
  • trunk/include/iprt/once.h

    r69105 r76417  
    3030#include <iprt/types.h>
    3131#include <iprt/asm.h>
    32 #include <iprt/err.h>
     32#include <iprt/errcore.h>
    3333#include <iprt/list.h>
    3434
  • trunk/include/iprt/vector.h

    r69105 r76417  
    7474#include <iprt/assert.h>
    7575#include <iprt/cdefs.h>
    76 #include <iprt/err.h>
     76#include <iprt/errcore.h>
    7777#include <iprt/mem.h>  /** @todo Should the caller include this if they need
    7878                        *        it? */
Note: See TracChangeset for help on using the changeset viewer.

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