make it compile on macos (M1 - arm64). Does not run though

This commit is contained in:
Jos Dehaes 2021-09-28 23:37:03 +02:00 committed by aristocratos
parent 3a20e55f3a
commit f8acb2f854
4 changed files with 1641 additions and 2 deletions

View file

@ -81,8 +81,8 @@ OBJEXT := o
#? Flags, Libraries and Includes
override REQFLAGS := -std=c++20
WARNFLAGS := -Wall -Wextra -pedantic
OPTFLAGS ?= -O2 -ftree-loop-vectorize -flto=$(THREADS)
LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector -fstack-clash-protection $(ADDFLAGS)
OPTFLAGS ?= -O2 #-ftree-loop-vectorize -flto=$(THREADS)
LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions $(ADDFLAGS)
override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
INC := -I$(INCDIR) -I$(SRCDIR)

View file

@ -225,7 +225,11 @@ void clean_quit(int sig) {
//? Assume error if still not cleaned up and call quick_exit to avoid a segfault from Tools::atomic_lock destructor
if (Tools::active_locks > 0) {
#ifdef __APPLE__
exit((sig != -1 ? sig : 0));
#else
quick_exit((sig != -1 ? sig : 0));
#endif
}
if (sig != -1) exit(sig);

View file

@ -32,6 +32,13 @@ tab-size = 4
using std::string, std::vector, std::atomic, std::to_string, std::regex, std::tuple, std::array;
#ifndef HOST_NAME_MAX
#if defined(__APPLE__)
#define HOST_NAME_MAX 255
#else
#define HOST_NAME_MAX 64
#endif /* __APPLE__ */
#endif /* HOST_NAME_MAX */
//? ------------------------------------------------- NAMESPACES ------------------------------------------------------

1628
src/osx/btop_collect.cpp Normal file

File diff suppressed because it is too large Load diff