Explorar o código

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
John A Meinel %!s(int64=13) %!d(string=hai) anos
pai
achega
97203c6e4f
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      decode.go

+ 1 - 0
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"