Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
be857cc4
Commit
be857cc4
authored
Nov 29, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on OSX, etc. by checking whether each errno is defined.
parent
05620fa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
2 deletions
+42
-2
debug.c++
c++/src/kj/debug.c++
+42
-2
No files found.
c++/src/kj/debug.c++
View file @
be857cc4
...
...
@@ -51,34 +51,74 @@ namespace {
Exception
::
Type
typeOfErrno
(
int
error
)
{
switch
(
error
)
{
#ifdef EDQUOT
case
EDQUOT
:
#endif
#ifdef EMFILE
case
EMFILE
:
#endif
#ifdef ENFILE
case
ENFILE
:
#endif
#ifdef ENOBUFS
case
ENOBUFS
:
#endif
#ifdef ENOLCK
case
ENOLCK
:
#endif
#ifdef ENOMEM
case
ENOMEM
:
#endif
#ifdef ENOSPC
case
ENOSPC
:
#endif
#ifdef ETIMEDOUT
case
ETIMEDOUT
:
#endif
#ifdef EUSERS
case
EUSERS
:
#endif
return
Exception
::
Type
::
OVERLOADED
;
#ifdef ECONNABORTED
case
ECONNABORTED
:
#endif
#ifdef ECONNREFUSED
case
ECONNREFUSED
:
#endif
#ifdef ECONNRESET
case
ECONNRESET
:
#endif
#ifdef EHOSTDOWN
case
EHOSTDOWN
:
#endif
#ifdef EHOSTUNREACH
case
EHOSTUNREACH
:
#endif
#ifdef ENETDOWN
case
ENETDOWN
:
#endif
#ifdef ENETRESET
case
ENETRESET
:
#endif
#ifdef ENETUNREACH
case
ENETUNREACH
:
#endif
#ifdef ENONET
case
ENONET
:
#endif
#ifdef EPIPE
case
EPIPE
:
#endif
return
Exception
::
Type
::
DISCONNECTED
;
#ifdef ENOSYS
case
ENOSYS
:
#if ENOTSUP
#endif
#ifdef ENOTSUP
case
ENOTSUP
:
#endif
#if
EOPNOTSUPP
&& EOPNOTSUPP != ENOTSUP
#if
defined(EOPNOTSUPP)
&& EOPNOTSUPP != ENOTSUP
case
EOPNOTSUPP
:
#endif
return
Exception
::
Type
::
UNIMPLEMENTED
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment