summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@mysql.com>2006-05-02 09:19:54 +0200
committerunknown <knielsen@mysql.com>2006-05-02 09:19:54 +0200
commit33417297c5e11ff82aae7bc2d8b5a75968725905 (patch)
tree344e142a1552ff36726a9f213f672836202a643a
parenta82956545761a68c87d235ba4b0bea9729cebab7 (diff)
downloadmariadb-git-33417297c5e11ff82aae7bc2d8b5a75968725905.tar.gz
Fix a bunch of non-Linux compile failures.
VC++Files/mysql.sln: mysql_client_test depends on mysys. VC++Files/mysys/mysys.vcproj: Add new file missing in previous push. mysys/my_memmem.c: Fix illegal pointer arithmetics on void *. tests/Makefile.am: -L must go before -l tests/mysql_client_test.c: No declarations after statement in C code.
-rw-r--r--VC++Files/mysql.sln1
-rw-r--r--VC++Files/mysys/mysys.vcproj43
-rw-r--r--mysys/my_memmem.c5
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/mysql_client_test.c3
5 files changed, 50 insertions, 4 deletions
diff --git a/VC++Files/mysql.sln b/VC++Files/mysql.sln
index 14f16f8fd8d..3e3e4c67e17 100644
--- a/VC++Files/mysql.sln
+++ b/VC++Files/mysql.sln
@@ -278,6 +278,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql_client_test", "tests\mysql_client_test.vcproj", "{DA224DAB-5006-42BE-BB77-16E8BE5326D5}"
ProjectSection(ProjectDependencies) = postProject
{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+ {44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql_test_run_new", "mysql-test\mysql_test_run_new.vcproj", "{6189F838-21C6-42A1-B2D0-9146316573F7}"
diff --git a/VC++Files/mysys/mysys.vcproj b/VC++Files/mysys/mysys.vcproj
index d124551e0bb..1053b605119 100644
--- a/VC++Files/mysys/mysys.vcproj
+++ b/VC++Files/mysys/mysys.vcproj
@@ -3189,6 +3189,49 @@
</FileConfiguration>
</File>
<File
+ RelativePath="my_memmem.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Max|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="TLS_DEBUG|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="TLS|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="my_messnc.c">
<FileConfiguration
Name="Debug|Win32">
diff --git a/mysys/my_memmem.c b/mysys/my_memmem.c
index 3a71d39c262..682a1314f09 100644
--- a/mysys/my_memmem.c
+++ b/mysys/my_memmem.c
@@ -9,8 +9,9 @@
void *my_memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen)
{
- const void *cursor;
- const void *last_possible_needle_location = haystack + haystacklen - needlelen;
+ const unsigned char *cursor;
+ const unsigned char *last_possible_needle_location =
+ (unsigned char *)haystack + haystacklen - needlelen;
/* Easy answers */
if (needlelen > haystacklen) return(NULL);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ec732462ca5..ebe97393045 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -42,7 +42,7 @@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
LIBS = @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ \
$(top_builddir)/libmysql/libmysqlclient.la
-mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS) -lmysys -L../mysys
+mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS) -L../mysys -lmysys
mysql_client_test_SOURCES= mysql_client_test.c $(yassl_dummy_link_fix)
insert_test_SOURCES= insert_test.c $(yassl_dummy_link_fix)
select_test_SOURCES= select_test.c $(yassl_dummy_link_fix)
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 4bd636a7ae3..b0971980168 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -14828,7 +14828,6 @@ static void test_bug15613()
static void test_bug17667()
{
int rc;
- myheader("test_bug17667");
struct buffer_and_length {
const char *buffer;
const uint length;
@@ -14845,6 +14844,8 @@ static void test_bug17667()
struct buffer_and_length *statement_cursor;
FILE *log_file;
+ myheader("test_bug17667");
+
for (statement_cursor= statements; statement_cursor->buffer != NULL;
statement_cursor++) {
rc= mysql_real_query(mysql, statement_cursor->buffer,