Permalink
Browse files

make native extensions work on solaris 11: ensure the included vaspri…

…ntf function is defined when building on solaris
  • Loading branch information...
1 parent e9e6a65 commit 569a69ce7adf6daadc99d3653e6aff2dba76aebe Lee Mallabone committed Apr 1, 2009
Showing with 5 additions and 3 deletions.
  1. +3 −1 ext/nokogiri/extconf.rb
  2. +1 −1 ext/nokogiri/native.c
  3. +1 −1 ext/nokogiri/native.h
@@ -12,7 +12,9 @@
$CFLAGS << " #{ENV["CFLAGS"]}"
if Config::CONFIG['target_os'] == 'mingw32'
- $CFLAGS << " -DXP_WIN -DXP_WIN32"
+ $CFLAGS << " -DXP_WIN -DXP_WIN32 -DUSE_INCLUDED_VASPRINTF"
+elsif Config::CONFIG['target_os'] == 'solaris2'
+ $CFLAGS << " -DUSE_INCLUDED_VASPRINTF"
else
$CFLAGS << " -g -DXP_UNIX"
end
@@ -7,7 +7,7 @@ VALUE mNokogiriXslt ;
VALUE mNokogiriXmlSax ;
VALUE mNokogiriHtmlSax ;
-#ifdef XP_WIN
+#ifdef USE_INCLUDED_VASPRINTF
/*
* I srsly hate windows. it doesn't have vasprintf.
* Thank you Geoffroy Couprie for this implementation of vasprintf!
@@ -63,7 +63,7 @@
rb_str_new((const char *)str, (long)len)
#endif
-#ifdef XP_WIN
+#ifdef USE_INCLUDED_VASPRINTF
int vasprintf (char **strp, const char *fmt, va_list ap);
#endif

0 comments on commit 569a69c

Please sign in to comment.