From eecce31dac2b5a8ac07933b245f9d079251c1526 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 25 Mar 2023 04:09:25 -0700 Subject: [PATCH] Add note about time.h in 2013/cable3 Interestingly the problem with localtime() being redefined is only for (at least with the current implementation of SDL in macOS) SDL2 which as I noted cannot be used anyway. Nevertheless I have kept the fix in case some system SDL1 SDL.h file ends up including time.h. --- 2013/cable3/README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/2013/cable3/README.md b/2013/cable3/README.md index cf8378a5e..ebfce2fa2 100644 --- a/2013/cable3/README.md +++ b/2013/cable3/README.md @@ -16,11 +16,15 @@ make ``` [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile -with modern systems. The problem is that `localtime()` is used differently and -`time.h` being included there was a conflicting function type. This appeared to -be a problem with macOS. The other problem is that this entry uses SDL functions -that were removed from SDL2 so the Makefile has to use `sdl-config` and not -`sdl2-config`. Thank you Cody for your assistance! +with modern systems. The problems were that `localtime()` is used differently +and `time.h` being included (with SDL2 in macOS - but see below) there was a +conflicting function type. This appeared to be a problem with macOS and only +when SDL2 was included (but which as noted next it cannot be). The other problem +is that this entry uses SDL functions that were removed from SDL2 so the +Makefile has to use `sdl-config` and not `sdl2-config`. Thus the removal of +localtime probably does not have to be done after all. He left it there in case +some implementation of SDL1 also has this problem. Thank you Cody for your +assistance! ### Try: