From 59f0d3d5b63a46a735d8802bffa3de41bdaf632e Mon Sep 17 00:00:00 2001 From: MoTrix <112804896+Mo-Tx@users.noreply.github.com> Date: Wed, 27 May 2026 14:35:23 +0100 Subject: [PATCH 1/3] Add cstdint include for uint8_t type usage --- cpp/core/CS_List.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/core/CS_List.h b/cpp/core/CS_List.h index 7420bea..3b1f650 100644 --- a/cpp/core/CS_List.h +++ b/cpp/core/CS_List.h @@ -3,6 +3,7 @@ // as well as possible. Memory management is done via std::shared_ptr and std::vector. #pragma once +#include #include #include #include From 905f687c8fe249333da51d25ae02fb416fb11d05 Mon Sep 17 00:00:00 2001 From: MoTrix <112804896+Mo-Tx@users.noreply.github.com> Date: Wed, 27 May 2026 19:03:55 +0100 Subject: [PATCH 2/3] Change C standard from C99 to GNU99 in Makefile --- cpp/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/Makefile b/cpp/Makefile index fe900c1..751b57f 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -21,11 +21,11 @@ else endif CXXFLAGS = -std=gnu++11 -Wall -Wextra $(OPT_FLAGS) -Icore -I$(GENDIR) -I. $(GOTO_FLAG) $(EDITLINE_DEFINE) -MMD -MP -CFLAGS = -std=c99 -Wall -Wextra $(OPT_FLAGS) -Icore $(GOTO_FLAG) -MMD -MP +CFLAGS = -std=gnu99 -Wall -Wextra $(OPT_FLAGS) -Icore $(GOTO_FLAG) -MMD -MP # AddressSanitizer flags for debugging ASAN_CXXFLAGS = -std=gnu++11 -Wall -Wextra -O0 -g -fsanitize=address -Icore -I$(GENDIR) -I. $(GOTO_FLAG) $(EDITLINE_DEFINE) -MMD -MP -ASAN_CFLAGS = -std=c99 -Wall -Wextra -O0 -g -fsanitize=address -Icore $(GOTO_FLAG) -MMD -MP +ASAN_CFLAGS = -std=gnu99 -Wall -Wextra -O0 -g -fsanitize=address -Icore $(GOTO_FLAG) -MMD -MP ASAN_LDFLAGS = -fsanitize=address COREDIR = core EDITLINEDIR = editline @@ -135,7 +135,7 @@ $(OBJDIR)/gen_%.o: $(GENDIR)/%.g.cpp | $(OBJDIR) # editline C object files (Unix/macOS only) $(OBJDIR)/editline_%.o: $(EDITLINEDIR)/%.c | $(OBJDIR) - $(CC) -std=c99 -Wall $(OPT_FLAGS) $(EDITLINE_CFLAGS) -c $< -o $@ + $(CC) -std=gnu99 -Wall $(OPT_FLAGS) $(EDITLINE_CFLAGS) -c $< -o $@ # ASAN target $(ASAN_TARGET): $(ASAN_OBJECTS) | $(BUILDDIR) @@ -155,7 +155,7 @@ $(ASAN_OBJDIR)/gen_%.o: $(GENDIR)/%.g.cpp | $(ASAN_OBJDIR) # ASAN editline C object files (Unix/macOS only) $(ASAN_OBJDIR)/editline_%.o: $(EDITLINEDIR)/%.c | $(ASAN_OBJDIR) - $(CC) -std=c99 -Wall -O0 -g -fsanitize=address $(EDITLINE_CFLAGS) -c $< -o $@ + $(CC) -std=gnu99 -Wall -O0 -g -fsanitize=address $(EDITLINE_CFLAGS) -c $< -o $@ $(ASAN_OBJDIR): mkdir -p $(ASAN_OBJDIR) @@ -179,4 +179,4 @@ info: # Include auto-generated dependency files (the - silently ignores missing files) -include $(OBJECTS:.o=.d) --include $(ASAN_OBJECTS:.o=.d) \ No newline at end of file +-include $(ASAN_OBJECTS:.o=.d) From 16ada9bf28550e8375a02633486d53c0e42bf2a7 Mon Sep 17 00:00:00 2001 From: MoTrix <112804896+Mo-Tx@users.noreply.github.com> Date: Wed, 27 May 2026 19:11:17 +0100 Subject: [PATCH 3/3] Enable C extensions in CMakeLists.txt Enable C extensions for POSIX compatibility. --- cpp/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 28c9007..9093cf7 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.15) project(miniscript2 LANGUAGES C CXX) set(CMAKE_C_STANDARD 99) +set(CMAKE_C_EXTENSIONS ON) # gnu++11, needed for POSIX extensions set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS ON) # gnu++11, needed for computed-goto