1
0
Commit Graph

42 Commits

Author SHA1 Message Date
Tiger Wang
a145980795
Fix Android builds (#4998)
Construct paths relative to the Cuberite sources with PROJECT_SOURCE_DIR, instead of wherever the first CMakeLists.txt file happened to be with CMAKE_SOURCE_DIR.

In Android's case, the latter was in a folder called android/ but that's not the root of the source tree, so any file path built off that root was wrong. This caused file-specific warnings exclusions to fail to apply.
2020-10-15 09:35:44 +00:00
Tiger Wang
6317176d7e More CMake cleanup 2020-07-12 22:00:07 +01:00
Peter Bell
ad935ef40f Update libevent to 2.1.12-stable 2020-07-06 20:53:04 +01:00
Tiger Wang
9e8598fb1c
Upgrade to C++17 [CMake] (#4717)
* Make our CMake slightly less insane
2020-05-16 20:59:10 +01:00
Mattes D
f021e2fe22 Updated LibEvent to release 2.1.11-stable. (#4383)
This finally restores my ability to compile on Windows and Linux from the same source folder (on a network drive).

LibEvent broke this long ago by writing a config file into the source folder, rather than build folder. Now it's finally fixed.
2019-09-04 22:34:54 +01:00
peterbell10
d3c1c626f5
Deal with covered switches consistently (#4161)
* Fixes a number of "<function>: not all control paths return a value" warnings on MSVC.

* Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults.

* Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
2018-02-04 23:07:12 +00:00
peterbell10
757231cc6e
Add the fmt library (#4065)
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
2018-01-03 17:41:16 +00:00
Lukas Pioch
c5f590d460 Removed UTF-8 BOM (#4033) 2017-09-19 10:34:08 +02:00
peterbell10
84941bcc9f Update mbedtls to 2.5.1 (#3964)
* Renaming changes:
  * macro prefix "POLARSSL" -> "MBEDTLS"
  * functions now prefixed with "mbedtls_"
  * rename PolarSSL++ -> mbedTLS++
  * rename polarssl submodule

* Use mbedtls' AES-CFB8 implementation.

* Add cSslConfig to wrap mbedtls_ssl_config

* Update cTCPLink and cBlockingSslClientSocket to use cSslConfig

* Use cSslConfig in cHTTPServer

* Use cSslConfig for cMojangAPI::SecureRequest

* CI Fixes

* Set -fomit-frame-pointer on the right target
2017-08-30 15:00:06 +01:00
peterbell10
035ecdc9e2 Replace evdns with getaddrinfo and getnameinfo (#3766) 2017-06-15 11:03:49 +02:00
Mattes D
d825456127 Added strict static_cast to void * in printf. 2016-11-13 17:26:58 +01:00
Mattes D
d2e8643607 Fixed type-casting-related warnings. 2016-08-24 22:26:53 +02:00
Mattes D
641cb063bc cTCPLink supports TLS out of the box. 2016-08-22 23:44:36 +02:00
Mattes D
8eaa8613da CMake: Remove needless minimum version specifications. 2016-07-18 22:11:42 +02:00
Mattes D
4d9769a484 SelfTests: More logging for EnumInterfaces. 2016-06-18 13:12:11 +02:00
Mattes D
ea47247dc7 SelfTests: Print a quick message on test start. 2016-06-18 13:12:10 +02:00
Mattes D
82e81c01a2 SelfTests: Fixed missing override keyword in EchoServer. 2016-06-18 13:12:09 +02:00
Mattes D
3d164a77cb SelfTests: Organized into solution folders. 2016-06-18 13:12:07 +02:00
Mattes D
3184433756 Moved NetworkInterfaceEnum test to a separate test project. 2016-06-18 13:12:06 +02:00
Tiger Wang
4315a11393 Fixed and improved restarting
Restarts are now an actual, close-as-possible to application
exit+reopen.
2015-08-20 16:15:23 +01:00
tycho
51b4584b42 Fix clang 3.6 flags to only be used in clang 3.6 2015-05-24 15:22:55 +01:00
tycho
95b81b3ef1 Disable -Werror for warnings in tests. 2015-05-24 14:16:05 +01:00
tycho
a5624debcb Fix tests 2015-05-23 13:21:02 +01:00
Mattes D
591b4eeb8a Network tests: Fixed clang warnings. 2015-02-20 16:08:21 +01:00
Mattes D
014b96adb3 Exported cServerHandle and cNetwork:Listen to Lua.
Also added an example to the NetworkTest plugin.
2015-02-04 08:40:52 +01:00
Mattes D
053362e604 Added network termination called at app exit.
This fixes a crash in MSVC runtime caused by joining a thread in a global var's destructor.
2015-01-27 14:53:37 +01:00
Mattes D
9014bdfa32 cNetwork: Renamed callback to OnConnected() 2015-01-22 22:49:37 +01:00
Mattes D
dbf7f13bd4 cNetwork: Added link creation callback.
This allows the callback classes to store the link inside them and use it internally later on, mainly for sending data.
2015-01-22 20:13:06 +01:00
Mattes D
5b4c5cf2be cNetwork: Changed listening API.
The link-callbacks for each new accepted link are now received from the OnIncomingConnection listen-callback.
2015-01-22 20:13:05 +01:00
Mattes D
64855ed340 cNetwork: Added error message to error callbacks. 2015-01-22 20:13:04 +01:00
Mattes D
d4682463a1 cNetwork: Fixed race conditions with lookups; proper shutdown. 2015-01-22 20:13:02 +01:00
Mattes D
c0cb787c10 cNetwork: Split the main cpp file into several files. 2015-01-22 20:13:02 +01:00
Mattes D
d3076a3e16 cNetwork: Split cNetworkSingleton to a separate file. 2015-01-22 20:13:00 +01:00
Mattes D
7cddb62374 cNetwork: Added an OnError callback for listening servers.
The callback receives the error details.
2015-01-22 20:12:57 +01:00
Mattes D
ddb1818dd5 cNetwork: Added multithreading protection. 2015-01-22 20:12:50 +01:00
Mattes D
d8ac99a037 cNetwork: Implemented connection shutdown and close. 2015-01-22 20:12:49 +01:00
Mattes D
9ffca12709 cNetwork: Fixed Linux compilation. 2015-01-22 20:12:48 +01:00
Mattes D
a2aa37bdc5 cNetwork: Implemented link address getting. 2015-01-22 20:12:47 +01:00
Mattes D
28e97d5468 cNetwork: Implemented basic server functionality. 2015-01-22 20:12:46 +01:00
Mattes D
251c96952b cNetwork: Implemented IP-to-hostname lookup. 2015-01-22 20:12:45 +01:00
Mattes D
fde44cba08 cNetwork: Implemented HostnameToIP lookups. 2015-01-22 20:12:45 +01:00
Tycho
a9b8a530b1 Extracted Google connection test 2015-01-22 20:12:42 +01:00