Skip to content

Commit

Permalink
Merge pull request #23 from cmangos/master
Browse files Browse the repository at this point in the history
merge latest changes
  • Loading branch information
mostlikely4r authored Sep 5, 2024
2 parents 3d4228e + ba94c75 commit b646feb
Show file tree
Hide file tree
Showing 268 changed files with 49,131 additions and 38,227 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ env:
REPO_DIR : ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/bin/builddir
BOOST_VERSION: "1.83.0"
BOOST_PLATFORM_VERSION: "11"
BOOST_PLATFORM_VERSION: "12"

permissions:
contents: read

jobs:
build:
runs-on: macos-11
runs-on: macos-12
permissions:
contents: read

Expand Down
28 changes: 16 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,17 @@ if(WIN32)
endif()

# Define install rules for provided libs
set(BIN_LIBS ${DEV_PROVIDED_LIBS_FOLDER}/libmySQL.dll)
set(BIN_LIBS ${DEV_PROVIDED_LIBS_FOLDER}/libmysql.dll)
if(PLATFORM MATCHES X86)
if(MSVC)
# Only MSVC. TODO:: check why x64 is not provided
set(BIN_LIBS ${BIN_LIBS} ${DEV_PROVIDED_LIBS_FOLDER}/dbghelp.dll)
endif()
set(BIN_LIBS ${BIN_LIBS} ${DEV_PROVIDED_LIBS_FOLDER}/libcrypto-1_1.dll)
set(BIN_LIBS ${BIN_LIBS} ${DEV_PROVIDED_LIBS_FOLDER}/libcrypto-3.dll)
set(BIN_LIBS ${BIN_LIBS} ${DEV_PROVIDED_LIBS_FOLDER}/legacy.dll)
else()
set(BIN_LIBS ${BIN_LIBS} ${DEV_PROVIDED_LIBS_FOLDER}/libcrypto-1_1-x64.dll)
set(BIN_LIBS ${BIN_LIBS} ${DEV_PROVIDED_LIBS_FOLDER}/libcrypto-3-x64.dll)
set(BIN_LIBS ${BIN_LIBS} ${DEV_PROVIDED_LIBS_FOLDER}/legacy.dll)
endif()
install(FILES
${BIN_LIBS}
Expand Down Expand Up @@ -234,16 +236,18 @@ endif()
# Win32 delivered packages
if(WIN32 AND (BUILD_GAME_SERVER OR BUILD_LOGIN_SERVER OR BUILD_EXTRACTORS))
set(MYSQL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/lib/include/mysql")
set(MYSQL_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libmySQL.lib")
set(MYSQL_DEBUG_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libmySQL.lib")
set(MYSQL_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libmysql.lib")
set(MYSQL_DEBUG_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libmysql.lib")
set(OPENSSL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/lib/include")
set(OPENSSL_LIBRARIES
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libcrypto.dll.a"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libssl.dll.a"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libcrypto.lib"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libssl.lib"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/legacy.lib"
)
set(OPENSSL_DEBUG_LIBRARIES
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libcrypto.dll.a"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libssl.dll.a"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libcrypto.lib"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libssl.lib"
"${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/legacy.lib"
)
endif()

Expand All @@ -260,10 +264,10 @@ if(UNIX AND (BUILD_GAME_SERVER OR BUILD_LOGIN_SERVER OR BUILD_EXTRACTORS))
find_package(OpenSSL REQUIRED)

message(STATUS "Found OpenSSL libraries: ${OPENSSL_LIBRARIES}")
if(OPENSSL_VERSION VERSION_LESS 1.1)
message(SEND_ERROR "OpenSSL: This project requires OpenSSL version 1.1.0 or higher")
if(OPENSSL_VERSION VERSION_LESS 3.0)
message(SEND_ERROR "OpenSSL: This project requires OpenSSL version 3.0 or higher")
endif()
if(OPENSSL_VERSION VERSION_LESS 1.1.1 OR (OPENSSL_VERSION VERSION_GREATER 3.0 AND OPENSSL_VERSION VERSION_LESS 3.0.7))
if(OPENSSL_VERSION VERSION_GREATER 3.0 AND OPENSSL_VERSION VERSION_LESS 3.0.14)
message(WARNING "OpenSSL: Your OpenSSL version is critically vulnerable or no longer being maintained, consider upgrading")
endif()
endif()
Expand Down
22 changes: 14 additions & 8 deletions dep/lib/include/mysql/errmsg.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#ifndef ERRMSG_INCLUDED
#define ERRMSG_INCLUDED

/* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have included with MySQL.
separately licensed software that they have either included with
the program or referenced in the documentation.
Without limiting anything contained in the foregoing, this file,
which is part of C Driver for MySQL (Connector/C), is also subject to the
Expand Down Expand Up @@ -77,10 +78,10 @@ extern const char *client_errors[]; /* Error messages */
#define CR_CANT_READ_CHARSET 2019
#define CR_NET_PACKET_TOO_LARGE 2020
#define CR_EMBEDDED_CONNECTION 2021
#define CR_PROBE_SLAVE_STATUS 2022
#define CR_PROBE_SLAVE_HOSTS 2023
#define CR_PROBE_SLAVE_CONNECT 2024
#define CR_PROBE_MASTER_CONNECT 2025
#define CR_PROBE_REPLICA_STATUS 2022
#define CR_PROBE_REPLICA_HOSTS 2023
#define CR_PROBE_REPLICA_CONNECT 2024
#define CR_PROBE_SOURCE_CONNECT 2025
#define CR_SSL_CONNECTION_ERROR 2026
#define CR_MALFORMED_PACKET 2027
#define CR_WRONG_LICENSE 2028
Expand Down Expand Up @@ -129,7 +130,12 @@ extern const char *client_errors[]; /* Error messages */
#define CR_LOAD_DATA_LOCAL_INFILE_REJECTED 2068
#define CR_LOAD_DATA_LOCAL_INFILE_REALPATH_FAIL 2069
#define CR_DNS_SRV_LOOKUP_FAILED 2070
#define CR_ERROR_LAST /*Copy last error nr:*/ 2070
#define CR_MANDATORY_TRACKER_NOT_FOUND 2071
#define CR_INVALID_FACTOR_NO 2072
#define CR_CANT_GET_SESSION_DATA 2073
#define CR_INVALID_CLIENT_CHARSET 2074
#define CR_TLS_SERVER_NOT_FOUND 2075
#define CR_ERROR_LAST /*Copy last error nr:*/ 2075
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */

/* Visual Studio requires '__inline' for C code */
Expand Down
20 changes: 10 additions & 10 deletions dep/lib/include/mysql/field_types.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* Copyright (c) 2014, 2020, Oracle and/or its affiliates.
/* Copyright (c) 2014, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have included with MySQL.
separately licensed software that they have either included with
the program or referenced in the documentation.
Without limiting anything contained in the foregoing, this file,
which is part of C Driver for MySQL (Connector/C), is also subject to the
Expand Down Expand Up @@ -48,13 +49,11 @@ extern "C" {

/**
Column types for MySQL
Note: Keep include/mysql/components/services/bits/stored_program_bits.h in
sync with this
*/
enum enum_field_types
#if defined(__cplusplus) && __cplusplus > 201103L
// N2764: Forward enum declarations, added in C++11
: int
#endif /* __cplusplus */
{ MYSQL_TYPE_DECIMAL,
enum enum_field_types {
MYSQL_TYPE_DECIMAL,
MYSQL_TYPE_TINY,
MYSQL_TYPE_SHORT,
MYSQL_TYPE_LONG,
Expand Down Expand Up @@ -87,7 +86,8 @@ enum enum_field_types
MYSQL_TYPE_BLOB = 252,
MYSQL_TYPE_VAR_STRING = 253,
MYSQL_TYPE_STRING = 254,
MYSQL_TYPE_GEOMETRY = 255 };
MYSQL_TYPE_GEOMETRY = 255
};

#ifdef __cplusplus
} // extern "C"
Expand Down
26 changes: 14 additions & 12 deletions dep/lib/include/mysql/my_command.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2015, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have included with MySQL.
separately licensed software that they have either included with
the program or referenced in the documentation.
Without limiting anything contained in the foregoing, this file,
which is part of C Driver for MySQL (Connector/C), is also subject to the
Expand Down Expand Up @@ -56,15 +57,15 @@ enum enum_server_command {
COM_FIELD_LIST, /**< Deprecated. See @ref page_protocol_com_field_list */
COM_CREATE_DB, /**< Currently refused by the server. See ::dispatch_command */
COM_DROP_DB, /**< Currently refused by the server. See ::dispatch_command */
COM_REFRESH, /**< Deprecated. See @ref page_protocol_com_refresh */
COM_DEPRECATED_1, /**< Deprecated, used to be COM_SHUTDOWN */
COM_STATISTICS, /**< See @ref page_protocol_com_statistics */
COM_PROCESS_INFO, /**< Deprecated. See @ref page_protocol_com_process_info */
COM_CONNECT, /**< Currently refused by the server. */
COM_PROCESS_KILL, /**< Deprecated. See @ref page_protocol_com_process_kill */
COM_DEBUG, /**< See @ref page_protocol_com_debug */
COM_PING, /**< See @ref page_protocol_com_ping */
COM_TIME, /**< Currently refused by the server. */
COM_UNUSED_2, /**< Removed, used to be COM_REFRESH. */
COM_UNUSED_1, /**< Removed, used to be COM_SHUTDOWN */
COM_STATISTICS, /**< See @ref page_protocol_com_statistics */
COM_UNUSED_4, /**< Removed, used to be COM_PROCESS_INFO */
COM_CONNECT, /**< Currently refused by the server. */
COM_UNUSED_5, /**< Removed, used to be COM_PROCESS_KILL */
COM_DEBUG, /**< See @ref page_protocol_com_debug */
COM_PING, /**< See @ref page_protocol_com_ping */
COM_TIME, /**< Currently refused by the server. */
COM_DELAYED_INSERT, /**< Functionality removed. */
COM_CHANGE_USER, /**< See @ref page_protocol_com_change_user */
COM_BINLOG_DUMP, /**< See @ref page_protocol_com_binlog_dump */
Expand Down Expand Up @@ -93,6 +94,7 @@ enum enum_server_command {
COM_BINLOG_DUMP_GTID,
COM_RESET_CONNECTION, /**< See @ref page_protocol_com_reset_connection */
COM_CLONE,
COM_SUBSCRIBE_GROUP_REPLICATION_STREAM,
/* don't forget to update const char *command_name[] in sql_parse.cc */

/* Must be last */
Expand Down
7 changes: 4 additions & 3 deletions dep/lib/include/mysql/my_compress.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2019, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have included with MySQL.
separately licensed software that they have either included with
the program or referenced in the documentation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
18 changes: 7 additions & 11 deletions dep/lib/include/mysql/my_list.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have included with MySQL.
separately licensed software that they have either included with
the program or referenced in the documentation.
Without limiting anything contained in the foregoing, this file,
which is part of C Driver for MySQL (Connector/C), is also subject to the
Expand All @@ -25,21 +26,16 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */

#ifndef _list_h_
#define _list_h_
#ifndef MY_LIST_INCLUDED
#define MY_LIST_INCLUDED

/**
@file include/my_list.h
*/

typedef struct LIST {
#if defined(__cplusplus) && __cplusplus >= 201103L
struct LIST *prev{nullptr}, *next{nullptr};
void *data{nullptr};
#else
struct LIST *prev, *next;
void *data;
#endif
} LIST;

typedef int (*list_walk_action)(void *, void *);
Expand All @@ -54,4 +50,4 @@ extern int list_walk(LIST *, list_walk_action action, unsigned char *argument);

#define list_rest(a) ((a)->next)

#endif
#endif // MY_LIST_INCLUDED
Loading

0 comments on commit b646feb

Please sign in to comment.