[gnome-screenshot] build: Define both _POSIX_C_SOURCE and _XOPEN_SOURCE with versions
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screenshot] build: Define both _POSIX_C_SOURCE and _XOPEN_SOURCE with versions
- Date: Mon, 5 Jun 2017 18:14:39 +0000 (UTC)
commit 1089e4cca5c3f82b6088dc945eef9badfefff149
Author: Ting-Wei Lan <lantw src gnome org>
Date: Tue Jun 6 00:10:06 2017 +0800
build: Define both _POSIX_C_SOURCE and _XOPEN_SOURCE with versions
FreeBSD libc assumes defining _POSIX_C_SOURCE without specifying a
version means a pre-C89 environment with the oldest version of POSIX
standard, IEEE Std 1003.1-1988. Defining _POSIX_C_SOURCE without
defining _XOPEN_SOURCE also causes XSI to be disabled. However, M_PI
constant is only available in XSI. Therefore, we have to define
_XOPEN_SOURCE if we want to define _POSIX_C_SOURCE.
https://bugzilla.gnome.org/show_bug.cgi?id=783442
meson.build | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meson.build b/meson.build
index 66bb84c..7927cb0 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@ project('gnome-screenshot', 'c',
'c_std=c99',
])
-add_project_arguments([ '-D_POSIX_C_SOURCE', '-D_DEFAULT_SOURCE' ], language: 'c')
+add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_XOPEN_SOURCE=700', '-D_DEFAULT_SOURCE' ], language:
'c')
cc = meson.get_compiler('c')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]