Fix building on macOS

macOS defines newlocale() in xlocale.h
This commit is contained in:
Kovid Goyal 2021-08-05 06:45:04 +05:30
parent 9e7253c179
commit 30cb7286db
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,6 @@
// Needed for _NSGetProgname
#include <crt_externs.h>
#include <objc/runtime.h>
#include <xlocale.h>
#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101200)
#define NSWindowStyleMaskResizable NSResizableWindowMask

View File

@ -11,6 +11,7 @@
#include <unistd.h>
#undef _DARWIN_C_SOURCE
#endif
#include "data-types.h"
#include "cleanup.h"
#include "safe-wrappers.h"
@ -24,13 +25,16 @@
#include <fcntl.h>
#include <stdio.h>
#include <locale.h>
#ifdef WITH_PROFILER
#include <gperftools/profiler.h>
#endif
#include "monotonic.h"
#ifdef __APPLE__
#include <libproc.h>
#include <xlocale.h>
static PyObject*
user_cache_dir() {