diff --git a/bindings/java/build.xml.in b/bindings/java/build.xml.in index 8a1e96b44f..bdce5daf29 100644 --- a/bindings/java/build.xml.in +++ b/bindings/java/build.xml.in @@ -2,8 +2,8 @@ - - + + diff --git a/link-grammar/parse/extract-links.c b/link-grammar/parse/extract-links.c index e2ce266bcc..3a60e34d38 100644 --- a/link-grammar/parse/extract-links.c +++ b/link-grammar/parse/extract-links.c @@ -12,7 +12,11 @@ /*************************************************************************/ #include // INT_MAX +#ifdef __APPLE__ +#include +#else #include // malloc_trim +#endif #include // log2 #include "connectors.h" @@ -294,7 +298,7 @@ void free_extractor(extractor_t * pex) xfree((void *) pex, sizeof(extractor_t)); -#if defined __GLIBC__ +#if defined __GLIBC__ && defined HAVE_MALLOC_TRIM // malloc_trim() is a gnu extension. An alternative would be // to call madvise(MADV_DONTNEED) but this is more complicated. if (trim) malloc_trim(0); diff --git a/link-grammar/resources.c b/link-grammar/resources.c index 95042371be..18fa2bf91e 100644 --- a/link-grammar/resources.c +++ b/link-grammar/resources.c @@ -48,7 +48,7 @@ int getrusage(int who, struct rusage *rusage); /** Returns the CPU usage time, for this thread only, in seconds. */ static double current_usage_time(void) { -#if !defined(_WIN32) +#if !defined(_WIN32) && !defined(__APPLE__) struct rusage u; getrusage (RUSAGE_THREAD, &u); return (u.ru_utime.tv_sec + ((double) u.ru_utime.tv_usec) / 1000000.0);