gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / patches / opencascade-oce-glibc-2.26.patch
CommitLineData
a4f393b7
LF
1Fix build with glibc 2.26:
2
3https://github.com/tpaviot/oce/issues/675
4
5Patch copied from upstream source repository:
6
7https://github.com/tpaviot/oce/commit/aa1321e68cc004e3debe38d79ae74581a617c767
8
9From aa1321e68cc004e3debe38d79ae74581a617c767 Mon Sep 17 00:00:00 2001
10From: Janus Weil <janus@gcc.gnu.org>
11Date: Mon, 18 Dec 2017 11:27:55 +0100
12Subject: [PATCH] fix build errors with glibc 2.26+ due to missing xlocale.h
13 (issue #675)
14
15* check for the presence of xlocale.h via cmake
16* remove related logic from Standard_CLocaleSentry.hxx
17---
18 CMakeLists.txt | 1 +
19 src/Standard/Standard_CLocaleSentry.hxx | 15 ---------------
20 2 files changed, 1 insertion(+), 15 deletions(-)
21
22diff --git a/CMakeLists.txt b/CMakeLists.txt
23index b782b4101..50e9500b2 100644
24--- a/CMakeLists.txt
25+++ b/CMakeLists.txt
26@@ -616,6 +616,7 @@ if (NOT WIN32)
27 # compilation anywhere in OCE
28 include(CheckIncludeFile)
29 check_include_file(strings.h HAVE_STRINGS_H)
30+ check_include_file(xlocale.h HAVE_XLOCALE_H)
31 include(CheckIncludeFileCXX)
32 check_include_file_cxx(mm_malloc.h HAVE_MM_MALLOC_H)
33 check_include_file_cxx(atomic.h OCE_HAVE_ATOMIC_H)
34diff --git a/src/Standard/Standard_CLocaleSentry.hxx b/src/Standard/Standard_CLocaleSentry.hxx
35index 2b226e7f3..1a4c1dadc 100644
36--- a/src/Standard/Standard_CLocaleSentry.hxx
37+++ b/src/Standard/Standard_CLocaleSentry.hxx
38@@ -20,21 +20,6 @@
39
40 #include <locale.h>
41
42-#ifndef HAVE_XLOCALE_H
43- //! "xlocale.h" available in Mac OS X and glibc (Linux) for a long time as an extension
44- //! and become part of POSIX since '2008.
45- //! Notice that this is impossible to test (_POSIX_C_SOURCE >= 200809L)
46- //! since POSIX didn't declared such identifier.
47- #if defined(__APPLE__)
48- #define HAVE_XLOCALE_H
49- #endif
50-
51- //! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
52- #if defined(_GNU_SOURCE) && !defined(__ANDROID__)
53- #define HAVE_XLOCALE_H
54- #endif
55-#endif // ifndef HAVE_LOCALE_H
56-
57 #ifdef HAVE_XLOCALE_H
58 #include <xlocale.h>
59 #endif
60--
612.15.1
62