mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-22 05:50:41 +02:00
[test] Use _POSIX_C_SOURCE for flockfile.
From bug 18010 (https://bugs.freedesktop.org/show_bug.cgi?id=18010), in order to make flockfile() available we need to set _POSIX_C_SOURCE and according to the man page, the appropriate feature check is _POSIX_THREAD_SAFE_FUNCTIONS.
This commit is contained in:
parent
34ff7e4ac4
commit
7707027081
1 changed files with 3 additions and 2 deletions
|
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
|
||||
#define _GNU_SOURCE 1 /* for feenableexcept() et al */
|
||||
#define _POSIX_C_SOURCE 2000112L /* for flockfile() et al */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
|
@ -1059,7 +1060,7 @@ cairo_test_run (cairo_test_context_t *ctx)
|
|||
}
|
||||
fflush (stdout);
|
||||
} else {
|
||||
#ifdef HAVE_FLOCKFILE
|
||||
#if _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
flockfile (stdout);
|
||||
#endif
|
||||
printf ("%s-%s-%s %d [%d]:\t",
|
||||
|
|
@ -1090,7 +1091,7 @@ cairo_test_run (cairo_test_context_t *ctx)
|
|||
}
|
||||
|
||||
fflush (stdout);
|
||||
#ifdef HAVE_FLOCKFILE
|
||||
#if _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
funlockfile (stdout);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue