decode: add some flags for windows
We are doing a static compile of libyaml, so set the
YAML_STATIC_DECLARE compile macro. Also, strdup
is only available in the common run time (CRT) as
_strdup, so use another macro for that.
We could do it in other ways if there is something
more appropriate for the yaml library. Originally I
was doing it in an #ifdef macro, but this makes it
nice and minimal and doesn't touch the yaml files
directly.
R=
CC=
https://codereview.appspot.com/7719045
diff --git a/decode.go b/decode.go
index 2e00362..a60dfdb 100644
--- a/decode.go
+++ b/decode.go
@@ -1,6 +1,7 @@
package goyaml
// #cgo LDFLAGS: -lm -lpthread
+// #cgo windows CFLAGS: -DYAML_DECLARE_STATIC=1 -Dstrdup=_strdup
// #cgo CFLAGS: -I. -DHAVE_CONFIG_H=1
//
// #include "helpers.h"