You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Remove unused include file
remove link to mariadbclient library
This commit is contained in:
@@ -139,7 +139,7 @@ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wno-uninitialized -Wall -Wextra -Wformat-security -Wno-init-self -Wwrite-strings -Wdeclaration-after-statement")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wno-uninitialized -Wall -Wextra -Wformat-security -Wno-init-self -Wwrite-strings -Wshift-count-overflow -Wdeclaration-after-statement")
|
||||
ENDIF()
|
||||
|
||||
# If the build type isn't specified, set to Relwithdebinfo as default.
|
||||
@@ -183,8 +183,10 @@ IF(WITH_EXTERNAL_ZLIB)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(TestBigEndian)
|
||||
TEST_BIG_ENDIAN(HAVE_BIGENDIAN)
|
||||
IF(NOT WIN32)
|
||||
INCLUDE(TestBigEndian)
|
||||
TEST_BIG_ENDIAN(HAVE_BIGENDIAN)
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
SEARCH_LIBRARY(LIBDL dlopen "dl")
|
||||
@@ -347,7 +349,7 @@ ENDIF()
|
||||
IF(WIN32 AND WITH_MSI AND CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
ADD_SUBDIRECTORY(win/packaging)
|
||||
ENDIF()
|
||||
|
||||
MESSAGE("SYSTEM processor: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
SET(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION "MariaDB Connector/C. A library for connecting to MariaDB and MySQL servers")
|
||||
SET(CPACK_PACKAGE_NAME "mariadb_connector_c")
|
||||
|
@@ -68,6 +68,7 @@ struct st_mysql_options_extension {
|
||||
char *connection_handler;
|
||||
my_bool (*set_option)(MYSQL *mysql, const char *config_option, const char *config_value);
|
||||
HASH userdata;
|
||||
char *server_public_key;
|
||||
};
|
||||
|
||||
typedef struct st_connection_handler
|
||||
|
@@ -185,9 +185,6 @@ double my_ulonglong2double(unsigned long long A);
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
#include <sys/timeb.h> /* Avoid warnings on SCO */
|
||||
#endif
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
|
@@ -37,11 +37,11 @@ typedef struct
|
||||
|
||||
#ifdef HAVE_REMOTEIO
|
||||
struct st_rio_methods {
|
||||
MA_FILE *(*open)(const char *url, const char *mode);
|
||||
int (*close)(MA_FILE *ptr);
|
||||
int (*feof)(MA_FILE *file);
|
||||
size_t (*read)(void *ptr, size_t size, size_t nmemb, MA_FILE *file);
|
||||
char * (*gets)(char *ptr, size_t size, MA_FILE *file);
|
||||
MA_FILE *(*mopen)(const char *url, const char *mode);
|
||||
int (*mclose)(MA_FILE *ptr);
|
||||
int (*mfeof)(MA_FILE *file);
|
||||
size_t (*mread)(void *ptr, size_t size, size_t nmemb, MA_FILE *file);
|
||||
char * (*mgets)(char *ptr, size_t size, MA_FILE *file);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@@ -123,7 +123,7 @@ remote:
|
||||
MYSQL mysql;
|
||||
if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *)
|
||||
mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN)))
|
||||
return rio_plugin->methods->open(location, mode);
|
||||
return rio_plugin->methods->mopen(location, mode);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -144,7 +144,7 @@ int ma_close(MA_FILE *file)
|
||||
break;
|
||||
#ifdef HAVE_REMOTEIO
|
||||
case MA_FILE_REMOTE:
|
||||
rc= rio_plugin->methods->close(file);
|
||||
rc= rio_plugin->methods->mclose(file);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@@ -154,6 +154,7 @@ int ma_close(MA_FILE *file)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ ma_feof */
|
||||
int ma_feof(MA_FILE *file)
|
||||
{
|
||||
@@ -166,7 +167,7 @@ int ma_feof(MA_FILE *file)
|
||||
break;
|
||||
#ifdef HAVE_REMOTEIO
|
||||
case MA_FILE_REMOTE:
|
||||
return rio_plugin->methods->feof(file);
|
||||
return rio_plugin->methods->mfeof(file);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@@ -189,7 +190,7 @@ size_t ma_read(void *ptr, size_t size, size_t nmemb, MA_FILE *file)
|
||||
break;
|
||||
#ifdef HAVE_REMOTEIO
|
||||
case MA_FILE_REMOTE:
|
||||
return rio_plugin->methods->read(ptr, size, nmemb, file);
|
||||
return rio_plugin->methods->mread(ptr, size, nmemb, file);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@@ -210,7 +211,7 @@ char *ma_gets(char *ptr, size_t size, MA_FILE *file)
|
||||
break;
|
||||
#ifdef HAVE_REMOTEIO
|
||||
case MA_FILE_REMOTE:
|
||||
return rio_plugin->methods->gets(ptr, size, file);
|
||||
return rio_plugin->methods->mgets(ptr, size, file);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@@ -1008,7 +1008,7 @@ error:
|
||||
}
|
||||
|
||||
int STDCALL
|
||||
mysql_ssl_set(MYSQL *mysql __attribute__((unused)),
|
||||
mysql_ssl_set(MYSQL *mysql __attribute__((unused)),
|
||||
const char *key __attribute__((unused)),
|
||||
const char *cert __attribute__((unused)),
|
||||
const char *ca __attribute__((unused)),
|
||||
@@ -2672,6 +2672,9 @@ mysql_optionsv(MYSQL *mysql,enum mysql_option option, ...)
|
||||
mysql->options.extension->report_progress=
|
||||
(void (*)(const MYSQL *, uint, uint, double, const char *, uint)) arg1;
|
||||
break;
|
||||
case MYSQL_SERVER_PUBLIC_KEY:
|
||||
OPT_SET_EXTENDED_VALUE_STR(&mysql->options, server_public_key, (char *)arg1);
|
||||
break;
|
||||
case MYSQL_PLUGIN_DIR:
|
||||
OPT_SET_EXTENDED_VALUE_STR(&mysql->options, plugin_dir, (char *)arg1);
|
||||
break;
|
||||
@@ -3026,6 +3029,10 @@ mysql_get_optionv(MYSQL *mysql, enum mysql_option option, void *arg, ...)
|
||||
*((void (**)(const MYSQL *, uint, uint, double, const char *, uint))arg)=
|
||||
mysql->options.extension ? mysql->options.extension->report_progress : NULL;
|
||||
break;
|
||||
case MYSQL_SERVER_PUBLIC_KEY:
|
||||
*((char **)arg)= mysql->options.extension ?
|
||||
mysql->options.extension->server_public_key : NULL;
|
||||
break;
|
||||
case MYSQL_PLUGIN_DIR:
|
||||
*((char **)arg)= mysql->options.extension ? mysql->options.extension->plugin_dir : NULL;
|
||||
break;
|
||||
|
@@ -53,7 +53,7 @@ extern unsigned int mariadb_deinitialize_ssl;
|
||||
#define MAX_SSL_ERR_LEN 100
|
||||
|
||||
static pthread_mutex_t LOCK_openssl_config;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
static pthread_mutex_t *LOCK_crypto= NULL;
|
||||
#endif
|
||||
#if OPENSSL_USE_BIOMETHOD
|
||||
@@ -85,14 +85,13 @@ static void ma_tls_set_error(MYSQL *mysql)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
/*
|
||||
thread safe callbacks for OpenSSL
|
||||
Crypto call back functions will be
|
||||
set during ssl_initialization
|
||||
*/
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
static unsigned long my_cb_threadid(void)
|
||||
{
|
||||
/* cast pthread_t to unsigned long */
|
||||
@@ -209,7 +208,7 @@ static void ma_tls_remove_session_cb(SSL_CTX* ctx __attribute__((unused)),
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
static void my_cb_locking(int mode, int n,
|
||||
const char *file __attribute__((unused)),
|
||||
int line __attribute__((unused)))
|
||||
@@ -287,7 +286,7 @@ int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attri
|
||||
/* lock mutex to prevent multiple initialization */
|
||||
pthread_mutex_init(&LOCK_openssl_config, NULL);
|
||||
pthread_mutex_lock(&LOCK_openssl_config);
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL))
|
||||
goto end;
|
||||
#else
|
||||
@@ -669,7 +668,7 @@ int ma_tls_verify_server_cert(MARIADB_TLS *ctls)
|
||||
if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry)))
|
||||
goto error;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
cn_str = (char *)ASN1_STRING_data(cn_asn1);
|
||||
#else
|
||||
cn_str = (char *)ASN1_STRING_get0_data(cn_asn1);
|
||||
|
@@ -36,7 +36,6 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mariadb_config.c.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mariadb_config.c @ONLY)
|
||||
|
||||
ADD_EXECUTABLE(mariadb_config ${CMAKE_CURRENT_BINARY_DIR}/mariadb_config.c)
|
||||
TARGET_LINK_LIBRARIES(mariadb_config)
|
||||
|
||||
# Installation
|
||||
#
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#include <ma_global.h>
|
||||
#include <ma_sys.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <mariadb_version.h>
|
||||
|
||||
static char *mariadb_progname;
|
||||
|
@@ -26,7 +26,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <gssapi/gssapi.h>
|
||||
#else
|
||||
#include <gssapi.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
void gssapi_errmsg(OM_uint32 major, OM_uint32 minor, char *buf, size_t size)
|
||||
{
|
||||
|
@@ -156,7 +156,7 @@ static size_t rio_write_callback(char *buffer,
|
||||
size= free_bytes;
|
||||
else {
|
||||
curl_file->length+= size - free_bytes;
|
||||
curl_file->buffer= tmp;
|
||||
curl_file->buffer= (unsigned char *)tmp;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -48,6 +48,7 @@
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
Reference in New Issue
Block a user