[cairo-commit] test/cairo-test.c

M. Joonas Pihlaja joonas at kemper.freedesktop.org
Mon Aug 31 06:27:32 PDT 2009


 test/cairo-test.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit feaf38d0cdc5a79966d3a412b644705b0f38e75a
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Mon Aug 31 16:25:08 2009 +0300

    [test] Use HAVE_FLOCKFILE instead of _POSIX_C_SOURCE.
    
    The _POSIX_C_SOURCE 2001.. #define requires C99 mode and
    clang on Solaris is strict about such things. Use configure
    tests for flockfile() instead.

diff --git a/test/cairo-test.c b/test/cairo-test.c
index eeb8b6f..7e93410 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -26,7 +26,6 @@
  */
 
 #define _GNU_SOURCE 1	/* for feenableexcept() et al */
-#define _POSIX_C_SOURCE 200112L /* for flockfile() et al */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -1646,7 +1645,7 @@ _cairo_test_context_run_for_target (cairo_test_context_t *ctx,
 	}
 	fflush (stdout);
     } else {
-#if _POSIX_THREAD_SAFE_FUNCTIONS
+#if HAVE_FLOCKFILE && HAVE_FUNLOCKFILE
 	flockfile (stdout);
 #endif
 	printf ("%s.%s.%s %d [%d]:\t",
@@ -1678,7 +1677,7 @@ _cairo_test_context_run_for_target (cairo_test_context_t *ctx,
 	}
 
 	fflush (stdout);
-#if _POSIX_THREAD_SAFE_FUNCTIONS
+#if  HAVE_FLOCKFILE && HAVE_FUNLOCKFILE
 	funlockfile (stdout);
 #endif
     }


More information about the cairo-commit mailing list