← Back to team overview

maria-developers team mailing list archive

Re: MariaDB and Windows

 

Hi!

>>>>> "Kristian" == Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx> writes:

Kristian> Patrick Crews <gleebix@xxxxxxxxx> writes:
>> I was wondering what is the policy / direction for MariaDB and Windows.
>> Basically, are we aiming to maintain MariaDB for that platform as well?

Kristian> The current plan is to keep MariaDB working on Windows.

Yes!

>> net_serv.cc
>> C:\work\maria\include\violite.h(91) : error C2146: syntax error : missing ';' before identifier 'vio_pending'
>> C:\work\maria\include\violite.h(91) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
>> C:\work\maria\include\violite.h(91) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Kristian> This looks to be due to a missing ssize_t definition.

>> From a quick web search, ssize_t seems to be a Linux-ism, or at least not in
Kristian> the ANSI C standard. You should probably add a windows definition, maybe

Kristian>     typedef ptrdiff_t ssize_t

This comes from me moving the pool-of-threads from 6.0 to MariaDB but
I missed the move the ssize_t typedef that was added in
include/config.win

What they have in 6.0 is:

include/config-win.h:typedef SSIZE_T ssize_t;

Will add this to the MariaDB tree at once.

>> .\mysqltest.cc(1638) : warning C4244: 'argument' : conversion from 'my_off_t' to 'size_t', possible loss of data
>> .\mysqltest.cc(1639) : warning C4244: 'argument' : conversion from 'my_off_t' to 'size_t', possible loss of data
>> .\mysqltest.cc(1642) : warning C4244: '=' : conversion from 'my_off_t' to 'size_t', possible loss of data
>> .\mysqltest.cc(1643) : warning C4244: '=' : conversion from 'my_off_t' to 'size_t', possible loss of data
>> .\mysqltest.cc(1647) : warning C4244: 'argument' : conversion from 'my_off_t' to 'size_t', possible loss of data
>> .\mysqltest.cc(1649) : warning C4244: 'argument' : conversion from 'my_off_t' to 'size_t', possible loss of data
>> .\mysqltest.cc(1654) : warning C4244: 'argument' : conversion from 'my_off_t' to 'size_t', possible loss of data

Kristian> Are these warnings also in MySQL source? I would think so, don't look fatal
Kristian> from a quick glance.

The above come from a new function I added in mysqltest.c to fix
things for Maria.

Have now added casts to remove the warnings.

(We need quickly a buildbot for windows so that we can catch things
like this...)

>> Building Custom Rule C:/work/maria/unittest/mysys/CMakeLists.txt
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to: C:/work/maria
>> Compiling...
>> waiting_threads-t.c
>> .\waiting_threads-t.c(265) : warning C4013: 'ftruncate' undefined; assuming extern returning int
>> Linking...
>> waiting_threads-t.obj : error LNK2019: unresolved external symbol _ftruncate referenced in function _do_tests

Kristian> I guess Windows doesn't have ftruncate. Maybe there is a mysys portable
Kristian> replacement that you can use, or maybe you can wrap that part of the unit test
Kristian> in #ifdef HAVE_FTRUNCATE.

This one is strange; The normal MySQL source has this too.

I wrapped the code in an #ifndef _WIN32 so this should work now.

Will push the fixes at once.

Regards,
Monty




Follow ups

References