blob: fb081bb485a3613e45045e9c8419857b03a33d58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From: Vicente Armando Sole <sole@titan.esrf.fr>
Date: Mon, 27 Nov 2017 10:46:30 +0100
Subject: slocale.h is removed in GLIBC 2.26
---
silx/io/specfile/src/locale_management.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/silx/io/specfile/src/locale_management.c b/silx/io/specfile/src/locale_management.c
index 163ed75..62111cc 100644
--- a/silx/io/specfile/src/locale_management.c
+++ b/silx/io/specfile/src/locale_management.c
@@ -24,15 +24,23 @@
#include <stdlib.h>
#ifdef _GNU_SOURCE
-#include <xlocale.h>
-#include <locale.h>
+# include <locale.h>
+# ifdef __GLIBC__
+# include <features.h>
+# if !((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ > 25)))
+# /* strtod_l has been moved to stdlib.h since glibc 2.26 */
+# include <xlocale.h>
+# endif
+# else
+# include <xlocale.h>
+# endif
#else
-#ifdef PYMCA_POSIX
-#else
-#ifdef SPECFILE_POSIX
-#include <locale.h>
-#endif
-#endif
+# ifdef PYMCA_POSIX
+# else
+# ifdef SPECFILE_POSIX
+# include <locale.h>
+# endif
+# endif
#endif
#include <string.h>
|