Fuck the industry domination of C++ and its standard not forcing compliance in both C and C++ modes, if this is the case here. If not, then fuck MSVC.
This commit is contained in:
parent
a6c1e1ed17
commit
79ecadb909
|
@ -30,7 +30,7 @@ void uiprivInternalError(const char *fmt, ...)
|
|||
}
|
||||
|
||||
static const char *messages[uiprivNumProgrammerErrors] = {
|
||||
[uiprivProgrammerErrorWrongStructSize] = "wrong size %zu for %s",
|
||||
[uiprivProgrammerErrorWrongStructSize] = "wrong size %" uiprivSizetPrintf " for %s",
|
||||
[uiprivProgrammerErrorIndexOutOfRange] = "index %d out of range in %s()",
|
||||
[uiprivProgrammerErrorNullPointer] = "invalid null pointer for %s passed into %s()",
|
||||
[uiprivProgrammerErrorIntIDNotFound] = "%s identifier %d not found in %s()",
|
||||
|
|
|
@ -11,6 +11,13 @@ extern "C" {
|
|||
#define uiprivFunc __func__
|
||||
#endif
|
||||
|
||||
// TODO WHY IS THIS NEEDED?!?!?!?!!?!??!Q https://stackoverflow.com/questions/15610053/correct-printf-format-specifier-for-size-t-zu-or-iu SAYS THAT VS2013 DOES SUPPORT %zu
|
||||
#ifdef _MSC_VER
|
||||
#define uiprivSizetPrintf "Iu"
|
||||
#else
|
||||
#define uiprivSizetPrintf "zu"
|
||||
#endif
|
||||
|
||||
// init.c
|
||||
extern const char **uiprivSysInitErrors(void);
|
||||
extern int uiprivSysInit(void *options, uiInitError *err);
|
||||
|
|
Loading…
Reference in New Issue