Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
1430b7d9
Commit
1430b7d9
authored
Oct 08, 2010
by
Matthias Braun
Browse files
win32 version of obstack_printf
[r28058]
parent
1904be14
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/obstack/obstack_printf.c
View file @
1430b7d9
...
...
@@ -5,9 +5,15 @@
#include "obstack.h"
#ifdef _WIN32
#define vsnprintf _vsnprintf
#endif
/* win32/C89 has no va_copy function... so we have to use the stupid fixed-length version */
int
obstack_vprintf
(
struct
obstack
*
obst
,
const
char
*
fmt
,
va_list
ap
)
{
char
buf
[
16384
];
int
len
=
_vsnprintf
(
buf
,
sizeof
(
buf
),
fmt
,
ap
);
obstack_grow
(
obst
,
buf
,
len
);
return
len
;
}
#else
int
obstack_vprintf
(
struct
obstack
*
obst
,
const
char
*
fmt
,
va_list
ap
)
{
char
buf
[
128
];
...
...
@@ -46,6 +52,7 @@ int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap)
return
len
;
}
#endif
int
obstack_printf
(
struct
obstack
*
obst
,
const
char
*
fmt
,
...)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment