Build: Move _POSIX_C_SOURCE definition to config.h
Do not redefine it though when already set, so that it can be overridden by the user, or indirectly by the compiler settings.
This commit is contained in:
parent
6ec6c43b47
commit
56c8705e37
|
@ -29,7 +29,7 @@ if BINDINGS_CXX
|
|||
local_includes += -Ibindings/cxx/include -I$(srcdir)/bindings/cxx/include -Ibindings/cxx
|
||||
endif
|
||||
# Ensure that local include directories are always searched first.
|
||||
AM_CPPFLAGS = $(local_includes) -D_POSIX_C_SOURCE=200112L -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
|
||||
AM_CPPFLAGS = $(local_includes) -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
|
||||
|
||||
# The tests CFLAGS are a superset of the libsigrok CFLAGS, and the
|
||||
# python bindings CFLAGS are a superset of the C++ bindings CFLAGS.
|
||||
|
|
|
@ -44,6 +44,12 @@ AC_PROG_LN_S
|
|||
# Required for per-target flags or subdir-objects with C sources.
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
# Set the standard the C library headers should conform to.
|
||||
AH_VERBATIM([_POSIX_C_SOURCE], [/* The targeted POSIX standard. */
|
||||
#ifndef _POSIX_C_SOURCE
|
||||
# define _POSIX_C_SOURCE 200112L
|
||||
#endif])
|
||||
|
||||
# Get compiler versions.
|
||||
SR_PROG_VERSION([$CC], [sr_cc_version])
|
||||
SR_PROG_VERSION([$CXX], [sr_cxx_version])
|
||||
|
|
Loading…
Reference in New Issue