Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Main
Synchronet
Commits
f66178e4
Commit
f66178e4
authored
10 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Use __MSVCRT__ to detect if the vsnprintf() implementation is by Microsoft(R)
parent
04a99315
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/ciolib.c
+3
-3
3 additions, 3 deletions
src/conio/ciolib.c
with
3 additions
and
3 deletions
src/conio/ciolib.c
+
3
−
3
View file @
f66178e4
...
...
@@ -854,7 +854,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
{
va_list
argptr
;
int
ret
;
#ifdef
_MSC_VER
/* Can't figure out a way to allocate a "big enough" buffer for Win32. */
#if
def
ined(
_MSC_VER
) || define(__MSVCRT__)
/* Can't figure out a way to allocate a "big enough" buffer for Win32. */
char
str
[
16384
];
#else
char
*
str
;
...
...
@@ -877,7 +877,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
va_end
(
argptr
);
#else
#ifdef
_MSC_VER
#if
def
ined(
_MSC_VER
) || define(__MSVCRT__)
ret
=
_vsnprintf
(
str
,
sizeof
(
str
)
-
1
,
fmat
,
argptr
);
#else
...
...
@@ -895,7 +895,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
ret
=
vsprintf
(
str
,
fmat
,
argptr2
);
#endif
va_end
(
argptr
);
#if
n
def
_MSC_VER
#if
def
ined(
_MSC_VER
) || define(__MSVCRT__)
va_end
(
argptr2
);
#endif
if
(
ret
>=
0
)
...
...
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