scummvm/scummvm — comment on commit 00242281006dd26204a3b438f1ecb38928bfb75f
File: configure line 3900
By fingolfin:

Removing this extra code yields build errors in two files:

In file included from /System/Library/Frameworks/Security.framework/Headers/Security.h:25,
from /System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:15,
from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:80,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from backends/platform/sdl/macosx/appmenu_osx.mm:30:
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:53: error: conflicting declaration ‘typedef uint64_t uint64’
./config.h:58: error: ‘uint64’ has a previous declaration as ‘typedef long unsigned int uint64’

The other error is identical and in gui/browser_osx.mm. So one header in the Security framework defines uint64 (and uint32, uint16) in an incompatible way: It uses uint64_t, which is "unsigned long long", as opposed to what ScummVM uses ("unsigned long").

But this problem *only* occurs when one includes OS X specific headers, i.e. only in OS X specific source code. Wouldn't it make more sense to remove this OS X specific hack here, and instead add appropriate workarounds to the affected OS X specific files?

However this is handled, though: The reason for the workaround should be documented in a comment, shouldn't it?