Skip to content

Commit acf9f8f

Browse files
authored
Move modular header includes outside extern "C" scope (#351)
1 parent 68f01a5 commit acf9f8f

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

sljit_src/sljitConfigInternal.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@
135135
#include <stdlib.h>
136136
#endif
137137

138+
#ifdef __APPLE__
139+
#include <AvailabilityMacros.h>
140+
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
141+
#include <libkern/OSCacheControl.h>
142+
#endif
143+
#endif
144+
138145
#ifdef __cplusplus
139146
extern "C" {
140147
#endif
@@ -253,10 +260,6 @@ extern "C" {
253260
/* Instruction cache flush. */
254261
/****************************/
255262

256-
#ifdef __APPLE__
257-
#include <AvailabilityMacros.h>
258-
#endif
259-
260263
/*
261264
* TODO:
262265
*
@@ -302,7 +305,6 @@ extern "C" {
302305
/* Supported by all macs since Mac OS 10.5.
303306
However, it does not work on non-jailbroken iOS devices,
304307
although the compilation is successful. */
305-
#include <libkern/OSCacheControl.h>
306308
#define SLJIT_CACHE_FLUSH(from, to) \
307309
sys_icache_invalidate((void*)(from), (size_t)((char*)(to) - (char*)(from)))
308310

0 commit comments

Comments
 (0)