From 1401a6d209006b0b6969109c4a26caad76ef0314 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 12 Oct 2021 10:46:39 +0200 Subject: [PATCH] Fix (most) macOS compilation problems --- src/runtime/c/Makefile.am | 2 +- src/runtime/c/pgf/db.cxx | 4 +++- src/runtime/c/pgf/db.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/runtime/c/Makefile.am b/src/runtime/c/Makefile.am index 123b4c0bb..c0c96b46b 100644 --- a/src/runtime/c/Makefile.am +++ b/src/runtime/c/Makefile.am @@ -29,7 +29,7 @@ libpgf_la_SOURCES = \ libpgf_la_LDFLAGS = -no-undefined libpgf_la_LIBADD = -lrt -libpgf_la_CXXFLAGS = -fno-rtti +libpgf_la_CXXFLAGS = -fno-rtti -std=c++11 bin_PROGRAMS = diff --git a/src/runtime/c/pgf/db.cxx b/src/runtime/c/pgf/db.cxx index 6dcc35e3e..50020df83 100644 --- a/src/runtime/c/pgf/db.cxx +++ b/src/runtime/c/pgf/db.cxx @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include "data.h" @@ -589,7 +591,7 @@ object PgfDB::malloc_internal(size_t bytes) invoked all that often in most programs. And the programs that it is called frequently in otherwise tend to fragment. */ - + idx = largebin_index(nb); if (ms->have_fastchunks) malloc_consolidate(ms); diff --git a/src/runtime/c/pgf/db.h b/src/runtime/c/pgf/db.h index b7bc01482..70812d273 100644 --- a/src/runtime/c/pgf/db.h +++ b/src/runtime/c/pgf/db.h @@ -112,6 +112,6 @@ private: DB_scope* next_scope; }; -extern PGF_INTERNAL_DECL thread_local DB_scope *last_db_scope __attribute__((tls_model("initial-exec"))); +extern PGF_INTERNAL_DECL __thread DB_scope *last_db_scope __attribute__((tls_model("initial-exec"))); #endif