check for asprintf instead of _MSC_VER - better for mingw
This commit is contained in:
parent
9ba194c4b1
commit
f8d45c405e
@ -112,7 +112,9 @@ static void write_utf8(buffer_t buffer, VALUE string, char check_null) {
|
|||||||
|
|
||||||
/* TODO we ought to check that the malloc or asprintf was successful
|
/* TODO we ought to check that the malloc or asprintf was successful
|
||||||
* and raise an exception if not. */
|
* and raise an exception if not. */
|
||||||
#ifdef _MSC_VER
|
/* TODO maybe we can use something more portable like vsnprintf instead
|
||||||
|
* of this hack. And share it with the Python extension ;) */
|
||||||
|
#ifndef HAVE_ASPRINTF
|
||||||
#define INT2STRING(buffer, i) \
|
#define INT2STRING(buffer, i) \
|
||||||
{ \
|
{ \
|
||||||
int vslength = _scprintf("%d", i) + 1; \
|
int vslength = _scprintf("%d", i) + 1; \
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
require 'mkmf'
|
require 'mkmf'
|
||||||
|
|
||||||
|
have_func("asprintf")
|
||||||
|
|
||||||
have_header("ruby/st.h") || have_header("st.h")
|
have_header("ruby/st.h") || have_header("st.h")
|
||||||
have_header("ruby/regex.h") || have_header("regex.h")
|
have_header("ruby/regex.h") || have_header("regex.h")
|
||||||
have_header("ruby/encoding.h")
|
have_header("ruby/encoding.h")
|
||||||
|
Loading…
Reference in New Issue
Block a user