mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Fix locale_t
under macOS 10.10
`xlocale.h` is not available on Linux, so we can't just universally include it. `HAVE_XLOCALE_H` was already being tested/set in the CMake script as a possible requirement for `wcstod_l` support, this just adds it to `config_cmake_h.in` and uses it in `wutil.h` to gate the include.
This commit is contained in:
parent
b402b635a9
commit
2bb53f7253
2 changed files with 7 additions and 0 deletions
|
@ -156,6 +156,9 @@
|
|||
/* The size of wchar_t in bits. */
|
||||
#define WCHAR_T_BITS ${WCHAR_T_BITS}
|
||||
|
||||
/* Define if xlocale.h is required for locale_t or wide character support */
|
||||
#cmakedefine HAVE_XLOCALE_H 1
|
||||
|
||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
||||
# define _DARWIN_USE_64_BIT_INODE 1
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
#include <locale.h>
|
||||
#include <string>
|
||||
|
||||
#ifdef HAVE_XLOCALE_H
|
||||
#include <xlocale.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "maybe.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue