From 24c8770cc1abe1bbe0f95b542e90a2a5137c33f6 Mon Sep 17 00:00:00 2001 From: ComputerNerd Date: Mon, 7 Dec 2020 19:22:15 -0600 Subject: [PATCH 1/2] Fix min not defined compiler error using the same method the Debian maintainers did by moving it down. --- src/fl_draw.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 216ec072a0..d055b3ed02 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -32,7 +32,6 @@ // Expands all unprintable characters to ^X or \nnn notation // Aligns them against the inside of the box. -#define min(a,b) ((a)<(b)?(a):(b)) #include #include @@ -40,6 +39,7 @@ #include #include +#define min(a,b) ((a)<(b)?(a):(b)) #define MAXBUF 1024 char fl_draw_shortcut; // set by fl_labeltypes.cxx From 2521b8b5270ad43d8e55dd3b9af56e9c39aa2629 Mon Sep 17 00:00:00 2001 From: ComputerNerd Date: Mon, 7 Dec 2020 21:36:27 -0600 Subject: [PATCH 2/2] Ensure that min is undefined prior to defining our own min macro to prevent any compiler warnings. --- src/fl_draw.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index d055b3ed02..b11aca0fa4 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -39,6 +39,7 @@ #include #include +#undef min #define min(a,b) ((a)<(b)?(a):(b)) #define MAXBUF 1024