Commit ad2d5752 authored by Johan Ström's avatar Johan Ström

xlocale.h can not be included on glibc >= 2.26

https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
parent 3bf20d54
Pipeline #361 passed with stage
in 6 minutes and 56 seconds
......@@ -159,6 +159,8 @@ check_include_files("linux/i2c-dev.h" HAVE_LINUX_I2C_DEV_H)
check_include_files("i2c-tools/i2c-dev.h" HAVE_I2CTOOLS_I2C_DEV_H)
check_include_files("xlocale.h" HAVE_XLOCALE_H)
set (ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${LIBDIR}")
set (LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${LIBDIR}")
......
......@@ -4,5 +4,6 @@
#cmakedefine HAVE_LINUX_I2C_DEV_H @HAVE_LINUX_I2C_DEV_H@
#cmakedefine HAVE_I2CTOOLS_I2C_DEV_H @HAVE_I2CTOOLS_I2C_DEV_H@
#cmakedefine HAVE_XLOCALE_H @HAVE_XLOCALE_H@
#endif
\ No newline at end of file
......@@ -44,9 +44,11 @@ along with this library; if not, write to the Free Software Foundation, Inc.,
#ifndef LOCALE_NOT_USED
#include <locale.h>
#ifndef XLOCALE_NOT_USED
#if HAVE_XLOCALE_H
#include <xlocale.h> // because, on some systems, <locale.h> doesn't include <xlocale.h>; this makes sure that we get both
#endif
#endif
#endif
enum LocaleCategory { All, Numeric }; // define and implement more categories later, as needed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment