Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
5b7e1f9e
Commit
5b7e1f9e
authored
13 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
gai_strerror: provide private implementation
There are systems (like NetWare) without its own gai_strerror() function.
parent
c33aee16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/asyn-thread.c
+38
-0
38 additions, 0 deletions
lib/asyn-thread.c
with
38 additions
and
0 deletions
lib/asyn-thread.c
+
38
−
0
View file @
5b7e1f9e
...
...
@@ -415,6 +415,44 @@ static bool init_resolve_thread (struct connectdata *conn,
return
FALSE
;
}
#if defined(HAVE_GETADDRINFO) && !defined(HAVE_GAI_STRERROR) && !defined(WIN32)
/* NetWare has getaddrinfo but lacks gai_strerror.
Windows has a gai_strerror but it is bad (not thread-safe) and the generic
socket error string function can be used for this pupose. */
static
const
char
*
gai_strerror
(
int
ecode
)
{
switch
(
ecode
){
case
EAI_AGAIN
:
return
"The name could not be resolved at this time"
;
case
EAI_BADFLAGS
:
return
"The flags parameter had an invalid value"
;
case
EAI_FAIL
:
return
"A non-recoverable error occurred when attempting to "
"resolve the name"
;
case
EAI_FAMILY
:
return
"The address family was not recognized"
;
case
EAI_MEMORY
:
return
"Out of memory"
;
case
EAI_NONAME
:
return
"The name does not resolve for the supplied parameters"
;
case
EAI_SERVICE
:
return
"The service passed was not recognized for the "
"specified socket type"
case
EAI_SOCKTYPE
:
return
"The intended socket type was not recognized"
case
EAI_SYSTEM
:
return
"A system error occurred"
;
case
EAI_OVERFLOW
:
return
"An argument buffer overflowed"
;
default:
return
"Unknown error"
;
/* define this now as this is a private implementation of said function */
#define HAVE_GAI_STRERROR
}
#endif
/*
* resolver_error() calls failf() with the appropriate message after a resolve
* error
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment