Commit Graph

165 Commits (970fedd78cef3f5ef7a26fcaf4fd9db0f6abbe4b)

Author SHA1 Message Date
Niels Martin Hansen b427ddce88 Codechange: Switch to explicit wide strings 3 years ago
Joe Stringer d21442941c Fix: [Cygwin] Fix missing uint definition
In file included from src/settingsgen/../string_func.h:30,
                 from src/settingsgen/settingsgen.cpp:11:
src/settingsgen/../core/bitmath_func.hpp:34:15: error: 'uint' does not name a type; did you mean 'uint8'?
   34 | static inline uint GB(const T x, const uint8 s, const uint8 n)
      |               ^~~~
      |               uint8
3 years ago
Michael Lutz f137b3057a Codechange: [Win32] Increase SDK version for 32-bit target.
Use the same Windows XP target as for 64-bit. Current MSVC version will
not produce a binary that works on anything earlier anyway.
3 years ago
Michael Lutz 84636fc2af Codechange: Remove all remaining uses of cpp_offset. 3 years ago
Patric Stout fda1fbf61c
Revert c1fddb9, 639cfa4: "Codechange: Check if access __attribute__ is supported before trying to use it." (#8526)
This reverts commit c1fddb9a6a and 639cfa43d2.

access_mode "none" is only supported by GCC11, but introduced
after it branched. So there are GCC11.0s out there that do not
support it. We will have to wait for GCC11.1 to hit before we
can re-add this.
4 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
milek7 c1fddb9a6a Codechange: Check if access __attribute__ is supported before trying to use it. 4 years ago
milek7 639cfa43d2 Codechange: Use access __attribute__ to silence warnings in GCC 4 years ago
Charles Pigott 3dfee979a7 Codechange: Drop libxdg-basedir dependency in favour of finding the directories ourselves 4 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
Jonathan G Rennison 0e017f6233 Codechange: Enable FINAL, (un)likely, __attribute__ when building with clang 4 years ago
Jonathan G Rennison fc52d3df50 Codechange: Use likely/__builtin_expect for assertion macros 4 years ago
Jonathan G Rennison 5cf28be742 Codechange: Add support for verbose asserts 4 years ago
Jonathan G Rennison eb74179c6d Codechange: Unconditionally use static_assert
We're well past having to support non-C++11 compliant compilers now.
4 years ago
Charles Pigott 52f3abba6e Cleanup: Remove unnecessary assert_tcompile macro 4 years ago
TechGeekNZ 716c883737 Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs
in not-very-nice places.
4 years ago
Niels Martin Hansen 9895ced6af Fix: Silence some warnings when building with clang-cl on VS 2019
Clang-cl presents as both _MSC_VER and __clang__ in the preprocessor which makes some things confusing.
4 years ago
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Joe Stringer 66c32533ec 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>
5 years ago
glx22 846fc8fe09
Fix: vcpkg used to patch lzma.h to define LZMA_API_STATIC for static builds (#7614) 5 years ago
glx22 cef9a76c3f
Fix #7553: check bounds when loading strings (#7554) 5 years ago
Michael Lutz baf9229931 Codechange: Replace AutoDeleteSmallVector with direct std::vector use in text layout code. 5 years ago
Patric Stout 72c5f2b3ee Remove: DOS support
In 10 years there was no active development on DOS. Although it
turned out to still work, the FPS was very bad. There is little
interest in the current community to look into this.

Further more, we like to switch to c++11 functions for threads,
which are not implemented by DJGPP, the only current compiler
for DOS.

Additionally, DOS is the only platform which does not support
networking. It is the reason we have tons of #ifdefs to support
disabling networking.

By removing DOS support, we can both use c++11 functions for threads,
and remove all the code related to disabling network. Sadly, this
means we have to see DOS go.

Of course, if you feel up for the task, simply revert this commit,
and implement stub c++11 functions for threads and stub functions
for networking. We are more than happy to accept such Pull Request.
5 years ago
Patric Stout 1c5ea33099 Fix: warnings when compiling for a recent version of Haiku
This might break older Haiku versions, but it is hard to tell.
5 years ago
Patric Stout f58db44ff2 Remove: BeOS support (deprecated by Haiku)
In 10 years there is no commit to change how BeOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).

With the arrival of SDL2 (and removal of SDL), BeOS is no longer
support. SDL2 suggests to use Haiku instead of BeOS.
5 years ago
Patric Stout ad30d04b5e Codechange: removed some left-behind __NDS__ references 5 years ago
Patric Stout 7784d77713 Remove: MorphOS / AmigaOS support
In 10 years there is no commit to change how MorphOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).

With the arrival of SDL2 (and removal of SDL), MorphOS is no longer
support. There is an SDL2 port for MorphOS, but it is not maintained
by upstream SDL2, and nobody can currently test it out.

If anyone wants to re-add MorphOS, please do (revert this patch,
fix the problems, and create a Pull Request). If you need any help
doing so, let us know! It is not that we don't like MorphOS, it is
that we don't have anyone fixing the problems :(
5 years ago
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 6 years ago
glx 3be6ab555c Change: use vcpkg integration in Visual Studio
Removes the need for us to provide OpenTTD-useful package
6 years ago
Charles Pigott 63898f61b0 Codechange: Rearrange struct packing defines and make MinGW use _Pragma pack style 6 years ago
Patric Stout aef69443e7 Remove: WinCE support 6 years ago
Patric Stout 85adde7485 Remove: PSP support 6 years ago
Charles Pigott dd6b82d6b2 Codechange: Simplify C++11 check for assert_compile 6 years ago
frosch 24a1b82840 (svn r27916) -Codechange: Enable usage of static_assert for MSVC 7 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
michi_cc 35b77450f8 (svn r27380) -Fix: [Win32] Compilation with MSVC2015. 9 years ago
rubidium 889780adce (svn r27109) -Fix (r27102): MinGW compilation 10 years ago
rubidium 730773f5f1 (svn r27102) -Fix [FS#6194]: money values would end up wrong in strings when outside of the bounds of a 32 bits integer 10 years ago
fonsinchen 28bd8a3d83 (svn r27040) -Fix: Don't use GCC diagnostic push/pop if unsupported 10 years ago
frosch 9d209829eb (svn r26922) -Fix: Include strings.h on HAIKU for strcasecmp. Some platforms do not have a strings.h at all, most define the functions in string.h as well. 10 years ago
rubidium 7c4e9dd71d (svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD 10 years ago
rubidium 7a00d2e849 (svn r26769) -Codechange [Squirrel]: remove the difference between some platforms having wchar for SQChar and others just char; always use char (and UTF-8) like in the rest of (internal) OpenTTD 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 99452c51ce (svn r26500) -Cleanup: remove unused snprintf implementation 10 years ago
zuu 998049a618 (svn r26226) -Fix (r26212): Compilation in visual studio 2008 failed 11 years ago
planetmaker 7b20da8a0a (svn r26223) -Codechange: Silence some compile warnings about unititialized variables in the SSE blitters (MJP) 11 years ago
michi_cc b96ef5c758 (svn r25677) -Codechange: [Win32] There are no 64-bit Windows versions below XP and we can safely assume it as the target platform. 11 years ago
michi_cc e3648455aa (svn r25674) -Fix: [Win32] The console code page for non-Unicode builds is not the normal ANSI code page and definitely not UTF-8 either. 11 years ago
michi_cc 8ce21bb1c0 (svn r25128) -Codechange: [Win32] MSVC 2010 comes with stdint.h. 11 years ago