Commit Graph

40 Commits

Author SHA1 Message Date
Rubidium e3f49ee7a0 Codechange: coding style fixes 2024-01-04 16:23:54 +01:00
Rubidium 700241410b Remove: support for not having getifaddrs 2023-06-27 12:35:07 +02:00
Charles Pigott b282664242 Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives 2023-04-15 16:57:00 +01:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
milek7 7607277380 Fix: Network on Haiku, remove old code for BeOS 2021-05-24 08:56:18 +02:00
Patric Stout b136e65cf9
Change: reworked the debug levels for network facility (#9251)
It now follows very simple rules:
0 - Fatal, user should know about this
1 - Error, but we are recovering
2 - Warning, wrong but okay if you don't know
3 - Info, information you might care about
4 -
5 - Debug #1 - High level debug messages
6 - Debug #2 - Low level debug messages
7 - Trace information
2021-05-12 16:34:02 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
PeterN 0ab6244f6b
Fix #7165: Missed another 'Append() --> push_back()' replacement (#7548) 2019-04-27 20:47:32 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
stormcone b913c92aa7 Fix #7165: Missed 'Append() --> push_back()' replacement 2019-03-26 22:20:56 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson 2bc2de9034 Codechange: Replaced SmallVector::Find() with std::find() 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson 8460952240 Codechange: Replaced SmallVector::Find() const with suitable alternatives
The use of std::none_of in network/core/host.cpp is driven by the non-const
comparison operator use by NetworkAddress. A future commit should address
the const_casts in that class to ensure const-correctness.
2019-03-26 20:15:57 +00:00
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
2019-03-20 19:24:55 +01:00
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.
2019-03-05 22:03:00 +01:00
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 2018-12-27 18:09:16 +01:00
Patric Stout 85adde7485 Remove: PSP support 2018-04-29 15:32:16 +02:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium 01ab1c6001 (svn r17606) -Add: initial support for Haiku; a dedicated server with zlib and libpng compiles and links (for me). Something's fishy with the network so it doesn't actually work (yet) 2009-09-21 18:36:33 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 2d3ddab7ca (svn r17169) -Codechange: apply coding style to some for statements 2009-08-14 17:14:04 +00:00
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
rubidium 5db32d1dc5 (svn r16134) -Change: do not add duplicates to the broadcast list 2009-04-24 10:33:16 +00:00
glx d466fa9672 (svn r15974) -Fix (r15969): win32 compilation was broken (again) 2009-04-08 00:10:20 +00:00
rubidium 82f8badc07 (svn r15969) -Codechange: make the list of broadcast addresses virtually unlimited. 2009-04-07 19:06:36 +00:00
glx 2dafb9dd57 (svn r15938) -Fix: broadcast addresses detection was broken for win32 2009-04-03 16:22:34 +00:00
glx d84fb358f5 (svn r15930) -Fix (r15926): MSVC compilation 2009-04-03 12:48:11 +00:00
rubidium 11723c40b2 (svn r15926) -Codechange: make the broadcast IP list less AF dependent. 2009-04-03 11:02:41 +00:00
rubidium dccfba6e20 (svn r15924) -Codechange: replace NetworkResolveHost with something less AF dependant. 2009-04-03 09:07:16 +00:00
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
smatz d2a050bb29 (svn r14671) -Fix: compilation was broken for some systems 2008-12-13 18:19:44 +00:00
rubidium e7829c1a57 (svn r14414) -Fix: replace instances of strncpy with strecpy as strncpy doesn't guarantee the resulting string is '\0'-terminated. 2008-09-29 16:27:02 +00:00
glx 788b625553 (svn r14026) -Cleanup (r13995, r14004): trailing whitespaces 2008-08-08 15:49:16 +00:00
rubidium 0ebcac669e (svn r13997) -Fix (r13988): in some cases no broadcast addresses would be found. 2008-08-04 19:07:37 +00:00
rubidium b1eaf763e1 (svn r13995) -Fix (r13988): some warnings of the compile farm. 2008-08-04 18:27:54 +00:00
glx 0f10939029 (svn r13990) -Fix (r13988): win32 compilation failed 2008-08-04 13:54:10 +00:00
rubidium c88cb1daa0 (svn r13988) -Codechange: move the to IP resolving functions to a separate file. 2008-08-04 12:56:38 +00:00