mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
Fix: [Cygwin] Fix missing definitions in stdafx
Fix the following compile errors: In file included from openttd/src/debug.h:15:0, from openttd/src/string.cpp:13: openttd/src/cpu.h:35:19: error: 'uint' was not declared in this scope bool HasCPUIDFlag(uint type, uint index, uint bit); openttd/src/string.cpp: In function 'char* strcasestr(const char*, const char*)': openttd/src/string.cpp:548:7: error: 'strncasecmp' was not declared in this scope if (strncasecmp(haystack, needle, needle_len) == 0) return const_cast<char *>(haystack); openttd/src/strgen/strgen_base.cpp: In function 'void EmitPlural(Buffer*, char*, int)': openttd/src/core/alloc_func.hpp:136:6: error: 'alloca' was not declared in this scope (T*)alloca((num_elements) * sizeof(T))) Signed-off-by: Joe Stringer <joe@wand.net.nz>
This commit is contained in:
parent
dd11990ce0
commit
66c32533ec
11
src/stdafx.h
11
src/stdafx.h
@ -21,7 +21,10 @@
|
||||
#include <unistd.h>
|
||||
#define _GNU_SOURCE
|
||||
#define TROUBLED_INTS
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined(__HAIKU__) || defined(__CYGWIN__)
|
||||
# include <strings.h> /* strncasecmp */
|
||||
#endif
|
||||
|
||||
/* It seems that we need to include stdint.h before anything else
|
||||
@ -98,7 +101,7 @@
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#if defined(SUNOS) || defined(HPUX)
|
||||
#if defined(SUNOS) || defined(HPUX) || defined(__CYGWIN__)
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
@ -137,7 +140,7 @@
|
||||
#include <malloc.h>
|
||||
#endif /* __WATCOMC__ */
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
#if defined(__MINGW32__)
|
||||
#include <malloc.h> // alloca()
|
||||
#endif
|
||||
|
||||
@ -305,7 +308,7 @@
|
||||
typedef unsigned char byte;
|
||||
|
||||
/* This is already defined in unix, but not in QNX Neutrino (6.x)*/
|
||||
#if (!defined(UNIX) && !defined(__CYGWIN__) && !defined(__HAIKU__)) || defined(__QNXNTO__)
|
||||
#if (!defined(UNIX) && !defined(__HAIKU__)) || defined(__QNXNTO__)
|
||||
typedef unsigned int uint;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user