#include "lwgeom_log.h"
#include "../postgis_config.h"
-#ifdef HAVE_LIBJSON
+#if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */
#ifdef HAVE_LIBJSON_C
#include <json-c/json.h>
# define json_tokener_error_desc(x) json_tokener_errors[(x)]
#endif
-#else
-
#include <string.h>
static void geojson_lwerror(char *msg, int error_code)
return NULL; /* Never reach */
}
-#endif /* HAVE_LIBJSON */
+#endif /* HAVE_LIBJSON or HAVE_LIBJSON_C --} */
LWGEOM*
lwgeom_from_geojson(const char *geojson, char **srs)
}
return lwgeom;
-#endif /* HAVE_LIBJSON */
+#endif /* HAVE_LIBJSON } */
}