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
82b27d1b
Commit
82b27d1b
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
prevent the windows version to use global symbol names
added prototypes for the strcasecmp() functions
parent
f7dee3b8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ares/nameser.h
+15
-0
15 additions, 0 deletions
ares/nameser.h
ares/windows_port.c
+2
-2
2 additions, 2 deletions
ares/windows_port.c
with
17 additions
and
2 deletions
ares/nameser.h
+
15
−
0
View file @
82b27d1b
#ifndef ARES_NAMESER_H
#define ARES_NAMESER_H
/* Windows-only header file provided by liren@vivisimo.com to make his Windows
port build */
...
...
@@ -204,3 +207,15 @@ typedef enum __ns_rcode {
#define T_MAILB ns_t_mailb
#define T_MAILA ns_t_maila
#define T_ANY ns_t_any
/* protos for the functions we provide in windows_port.c */
int
ares_strncasecmp
(
const
char
*
s1
,
const
char
*
s2
,
size_t
n
);
int
ares_strcasecmp
(
const
char
*
s1
,
const
char
*
s2
);
/* use this define magic to prevent us from adding symbol names to the library
that is a high-risk to collide with another libraries' attempts to do the
same */
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
#define strcasecmp(a,b) ares_strcasecmp(a,b)
#endif
/* ARES_NAMESER_H */
This diff is collapsed.
Click to expand it.
ares/windows_port.c
+
2
−
2
View file @
82b27d1b
...
...
@@ -6,7 +6,7 @@
#include
"nameser.h"
int
strncasecmp
(
const
char
*
a
,
const
char
*
b
,
size_t
n
)
ares_
strncasecmp
(
const
char
*
a
,
const
char
*
b
,
size_t
n
)
{
size_t
i
;
...
...
@@ -19,7 +19,7 @@ strncasecmp(const char *a, const char *b, size_t n)
}
int
strcasecmp
(
const
char
*
a
,
const
char
*
b
)
ares_
strcasecmp
(
const
char
*
a
,
const
char
*
b
)
{
return
strncasecmp
(
a
,
b
,
strlen
(
a
)
+
1
);
}
...
...
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