Strip dead Windows-only code paths, add LTO/march build flags, seed default GM account
Removes now-unreachable #ifdef _WIN32 branches across Common/ and the three server binaries (all builds are Linux-only), deletes the entirely unused SEH exception-handling shim and an orphaned vendored MySQL client header. Enables LTO and -march=x86-64-v2 in Release builds for a small free perf win. Also seeds a default GM account (gmadmin/changeme) via database sql files/gm_account.sql so a fresh deploy has something to log into the web admin panel with, switches the MariaDB data directory from a Docker named volume to a host bind mount for visibility/backup, and expands the README with a fuller Docker deployment walkthrough. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1e47731d7a
commit
1998bf4273
27 files changed
+101
-1178
No files matched your search
+17
-39
@@ -22,33 +22,23 @@
|
||||
#ifndef __ROSE_SOCKETS__
|
||||
#define __ROSE_SOCKETS__
|
||||
#define USEIFO
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
#define close closesocket
|
||||
#ifdef FD_SETSIZE
|
||||
#undef FD_SETSIZE
|
||||
#endif
|
||||
#define FD_SETSIZE 1024
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <cstdarg>
|
||||
#include <errno.h>
|
||||
#define WSAGetLastError() errno
|
||||
#define SOCKET int
|
||||
#define INVALID_SOCKET -1
|
||||
#define SOCKET_ERROR -1
|
||||
#define PVOID void *
|
||||
#define ioctlsocket ioctl
|
||||
#define SOCKADDR struct sockaddr
|
||||
#define closesocket close
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <cstdarg>
|
||||
#include <errno.h>
|
||||
#define WSAGetLastError() errno
|
||||
#define SOCKET int
|
||||
#define INVALID_SOCKET -1
|
||||
#define SOCKET_ERROR -1
|
||||
#define PVOID void *
|
||||
#define ioctlsocket ioctl
|
||||
#define SOCKADDR struct sockaddr
|
||||
#define closesocket close
|
||||
|
||||
#include "mysql.h"
|
||||
#include <cstdio>
|
||||
@@ -63,7 +53,6 @@
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#ifndef _WIN32
|
||||
// The entire codebase was written against Windows' clock(), which returns a
|
||||
// monotonic MILLISECOND counter (CLOCKS_PER_SEC == 1000) that closely tracks
|
||||
// wall-clock time for a normal single-threaded process. POSIX clock() is
|
||||
@@ -84,7 +73,6 @@ static inline long __rose_portable_clock()
|
||||
#undef CLOCKS_PER_SEC
|
||||
#define CLOCKS_PER_SEC 1000
|
||||
#define clock() __rose_portable_clock()
|
||||
#endif
|
||||
#include <map>
|
||||
#include "pthread.h"
|
||||
#include <vector>
|
||||
@@ -93,9 +81,6 @@ static inline long __rose_portable_clock()
|
||||
#include "rosecrypt.hpp"
|
||||
#include "config.h"
|
||||
#include "database/database.h"
|
||||
#ifdef _WIN32
|
||||
#pragma comment(lib, "Ws2_32.lib")
|
||||
#endif
|
||||
// Just some defs for easier use
|
||||
typedef char SBYTE;
|
||||
typedef unsigned char BYTE;
|
||||
@@ -105,18 +90,11 @@ typedef int SDWORD;
|
||||
typedef unsigned int DWORD;
|
||||
typedef long long SQWORD;
|
||||
typedef unsigned long long QWORD;
|
||||
#ifdef _WIN32
|
||||
typedef unsigned __int8 byte;
|
||||
typedef unsigned __int16 word;
|
||||
typedef unsigned __int32 dword;
|
||||
typedef unsigned __int64 qword;
|
||||
#else
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned short word;
|
||||
typedef unsigned int dword;
|
||||
typedef unsigned long long qword;
|
||||
typedef unsigned int UINT;
|
||||
#endif
|
||||
typedef char* strings;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
Reference in new issue
Block a user