changeset 2973:ac880987a2c4

Mac: Fix compiling with Xcode 8.2.1, needed #include <stdlib.h> and <errno.h> for missing alloca(), calloc() and errno.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 21 Mar 2023 00:41:25 +0000
parents 5727036821bd
children fffb4904c90b
files dw.hpp dwtestoo.cpp
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dw.hpp	Mon Mar 20 23:30:01 2023 +0000
+++ b/dw.hpp	Tue Mar 21 00:41:25 2023 +0000
@@ -8,6 +8,8 @@
 #include <cstring>
 #include <string>
 #include <vector>
+// For alloca() and calloc()
+#include <stdlib.h>
 
 // Attempt to support compilers without nullptr type literal
 #if __cplusplus >= 201103L 
--- a/dwtestoo.cpp	Mon Mar 20 23:30:01 2023 +0000
+++ b/dwtestoo.cpp	Tue Mar 21 00:41:25 2023 +0000
@@ -3,6 +3,7 @@
 // By: Brian Smith and Mark Hessling
 #include "dw.hpp"
 #include <cstdio>
+#include <errno.h>
 
 // Select a fixed width font for our platform 
 #ifdef __OS2__