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
56bf97ff
Commit
56bf97ff
authored
18 years ago
by
Gisle Vanem
Browse files
Options
Downloads
Patches
Plain Diff
'in6addr_any' must be placed in .c-file. Added 'REAL_WIN32' for
all Win32 targets except CygWin. Cleanup.
parent
7d3e719a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/server/util.c
+6
-5
6 additions, 5 deletions
tests/server/util.c
tests/server/util.h
+6
-9
6 additions, 9 deletions
tests/server/util.h
with
12 additions
and
14 deletions
tests/server/util.c
+
6
−
5
View file @
56bf97ff
...
...
@@ -55,6 +55,10 @@
#include
"getpart.h"
#include
"util.h"
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
const
struct
in6_addr
in6addr_any
=
{{
IN6ADDR_ANY_INIT
}};
#endif
/*
* ourerrno() returns the errno (or equivalent) on this platform to
* hide platform specific for the function that calls this.
...
...
@@ -97,7 +101,7 @@ void logmsg(const char *msg, ...)
}
}
#if defined(WIN32)
&& !defined(__CYGWIN__)
#if defined(
REAL_
WIN32)
/* use instead of perror() on generic windows */
void
win32_perror
(
const
char
*
msg
)
{
...
...
@@ -111,9 +115,7 @@ void win32_perror (const char *msg)
fprintf
(
stderr
,
"%s: "
,
msg
);
fprintf
(
stderr
,
"%s
\n
"
,
buf
);
}
#endif
#if defined(WIN32) && !defined(__CYGWIN__)
void
win32_init
(
void
)
{
WORD
wVersionRequested
;
...
...
@@ -143,7 +145,7 @@ void win32_cleanup(void)
{
WSACleanup
();
}
#endif
#endif
/* REAL_WIN32 */
/* set by the main code to point to where the test dir is */
const
char
*
path
=
"."
;
...
...
@@ -154,4 +156,3 @@ char *test2file(long testno)
snprintf
(
filename
,
sizeof
(
filename
),
TEST_DATA_PATH
,
path
,
testno
);
return
filename
;
}
This diff is collapsed.
Click to expand it.
tests/server/util.h
+
6
−
9
View file @
56bf97ff
...
...
@@ -40,6 +40,8 @@ extern const char *path;
#if defined(WIN32) && !defined(__CYGWIN__)
#include
<process.h>
#include
<fcntl.h>
#define REAL_WIN32
#define sleep(sec) Sleep ((sec)*1000)
...
...
@@ -49,20 +51,15 @@ extern const char *path;
#define ENOTSOCK WSAENOTSOCK
#define ECONNREFUSED WSAECONNREFUSED
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
const
struct
in6_addr
in6addr_any
=
{{
IN6ADDR_ANY_INIT
}};
#endif
#endif
#endif
#if defined(WIN32) && !defined(__CYGWIN__)
#undef perror
#define perror(m) win32_perror(m)
#endif
void
win32_perror
(
const
char
*
msg
);
void
win32_init
(
void
);
void
win32_cleanup
(
void
);
#endif
/* WIN32 && !__CYGWIN__ */
/* returns the path name to the test case file */
char
*
test2file
(
long
testno
);
#endif
/* __SERVER_UTIL_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