fix for macos
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "err.h"
|
||||
#include <malloc.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
@@ -59,6 +58,7 @@ static inline uint64_t htole64(uint64_t x) { return x; }
|
||||
|
||||
#elif defined(__linux__)
|
||||
#include <endian.h>
|
||||
#include <malloc.h>
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define htole32(x) OSSwapHostToLittleInt32(x)
|
||||
@@ -383,8 +383,9 @@ Execution execute(char *path, Stack *stack) {
|
||||
printf("Translation time taken: %f seconds\n", time_spent);
|
||||
|
||||
darray_free(&ast, free_parsed);
|
||||
|
||||
#if defined(__linux__)
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
|
||||
ensure_dir_exists(cache_folder_path);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "number.h"
|
||||
#include "../../memory.h"
|
||||
#include <ctype.h>
|
||||
#include <gmp-x86_64.h>
|
||||
#include <gmp.h>
|
||||
#include <gmp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "operations/operations.h"
|
||||
#include "return/return.h"
|
||||
#include "string/string.h"
|
||||
#include <gmp-x86_64.h>
|
||||
#include <gmp.h>
|
||||
#include <gmp.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "number.h"
|
||||
#include "../functions/functions.h"
|
||||
#include "../string/string.h"
|
||||
#include <gmp-x86_64.h>
|
||||
#include <gmp.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "objects/type/type.h"
|
||||
#include <fcntl.h>
|
||||
#include <gc/gc.h>
|
||||
#include <gmp-x86_64.h>
|
||||
#include <gmp.h>
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
Reference in New Issue
Block a user