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
582bad89
Commit
582bad89
authored
17 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
sync with lib/setup_once.h
parent
92433e59
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
ares/setup_once.h
+106
-1
106 additions, 1 deletion
ares/setup_once.h
with
106 additions
and
1 deletion
ares/setup_once.h
+
106
−
1
View file @
582bad89
...
...
@@ -91,6 +91,13 @@ struct timeval {
#endif
#if defined(__minix)
/* Minix doesn't support recv on TCP sockets */
#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
(RECV_TYPE_ARG2)(y), \
(RECV_TYPE_ARG3)(z))
#elif defined(HAVE_RECV)
/*
* The definitions for the return type and arguments types
* of functions recv() and send() belong and come from the
...
...
@@ -136,7 +143,14 @@ struct timeval {
#endif
#endif
/* HAVE_RECV */
#ifdef HAVE_SEND
#if defined(__minix)
/* Minix doesn't support send on TCP sockets */
#define swrite(x,y,z) (ssize_t)write((SEND_TYPE_ARG1)(x), \
(SEND_TYPE_ARG2)(y), \
(SEND_TYPE_ARG3)(z))
#elif defined(HAVE_SEND)
#if !defined(SEND_TYPE_ARG1) || \
!defined(SEND_QUAL_ARG2) || \
!defined(SEND_TYPE_ARG2) || \
...
...
@@ -358,5 +372,96 @@ typedef int sig_atomic_t;
#endif
/*
* We use this ZERO_NULL to avoid picky compiler warnings,
* when assigning a NULL pointer to a function pointer var.
*/
#define ZERO_NULL 0
#if defined (__LP64__) && defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED)
#include
<sys/socket.h>
/* HP-UX has this oddity where it features a few functions that don't work
with socklen_t so we need to convert to ints
This is due to socklen_t being a 64bit int under 64bit ABI, but the
pre-xopen (default) interfaces require an int, which is 32bits.
Therefore, Anytime socklen_t is passed by pointer, the libc function
truncates the 64bit socklen_t value by treating it as a 32bit value.
Note that some socket calls are allowed to have a NULL pointer for
the socklen arg.
*/
inline
static
int
Curl_hp_getsockname
(
int
s
,
struct
sockaddr
*
name
,
socklen_t
*
namelen
)
{
int
rc
;
if
(
namelen
)
{
int
len
=
*
namelen
;
rc
=
getsockname
(
s
,
name
,
&
len
);
*
namelen
=
len
;
}
else
rc
=
getsockname
(
s
,
name
,
0
);
return
rc
;
}
inline
static
int
Curl_hp_getsockopt
(
int
s
,
int
level
,
int
optname
,
void
*
optval
,
socklen_t
*
optlen
)
{
int
rc
;
if
(
optlen
)
{
int
len
=
*
optlen
;
rc
=
getsockopt
(
s
,
level
,
optname
,
optval
,
&
len
);
*
optlen
=
len
;
}
else
rc
=
getsockopt
(
s
,
level
,
optname
,
optval
,
0
);
return
rc
;
}
inline
static
int
Curl_hp_accept
(
int
sockfd
,
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
)
{
int
rc
;
if
(
addrlen
)
{
int
len
=
*
addrlen
;
rc
=
accept
(
sockfd
,
addr
,
&
len
);
*
addrlen
=
len
;
}
else
rc
=
accept
(
sockfd
,
addr
,
0
);
return
rc
;
}
inline
static
ssize_t
Curl_hp_recvfrom
(
int
s
,
void
*
buf
,
size_t
len
,
int
flags
,
struct
sockaddr
*
from
,
socklen_t
*
fromlen
)
{
ssize_t
rc
;
if
(
fromlen
)
{
int
fromlen32
=
*
fromlen
;
rc
=
recvfrom
(
s
,
buf
,
len
,
flags
,
from
,
&
fromlen32
);
*
fromlen
=
fromlen32
;
}
else
{
rc
=
recvfrom
(
s
,
buf
,
len
,
flags
,
from
,
0
);
}
return
rc
;
}
#define getsockname(a,b,c) Curl_hp_getsockname((a),(b),(c))
#define getsockopt(a,b,c,d,e) Curl_hp_getsockopt((a),(b),(c),(d),(e))
#define accept(a,b,c) Curl_hp_accept((a),(b),(c))
#define recvfrom(a,b,c,d,e,f) Curl_hp_recvfrom((a),(b),(c),(d),(e),(f))
#endif
/* HPUX work-around */
#endif
/* __SETUP_ONCE_H */
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