RFC - mysqlD

Jonathan M Davis jmdavisProg at gmx.com
Sun Oct 9 14:42:03 PDT 2011


On Sunday, October 09, 2011 14:35:35 Jonathan M Davis wrote:
> On Sunday, October 09, 2011 19:37:31 GrahamC wrote:
> > Don't forget that quite a few MySQL data structure members are C long
> > types which are 64 bit on x86_64.
> > 
> > So if you want code to work on x86_64 as well as x86 it needs a type
> > alias.
> > 
> > For example in st_net these members:
> > 
> > struct st_net
> > {
> > 
> >     Vio *vio;
> >     ubyte *buff;
> >     ubyte *buff_end;
> >     ubyte *write_pos;
> >     ubyte *read_pos;
> >     SOCKET fd;
> >     uint remain_in_buf;   <<<
> >     uint length;          <<<
> >     uint buf_length;      <<<
> >     uint where_b;         <<<
> >     uint max_packet;      <<<
> >     uint max_packet_size; <<<
> > 
> > are 32 bit on x86 and 64 bit on x86_64
> > 
> > Many other MySQL structures and quite a few function arguments have the
> > same issue.
> > 
> > Of course, not many people seem to be using the compiler for 64 bit code
> > at the moment.
> 
> The C types which may differ between x86 and x86_64 are defined in
> core.stdc.config.

Though it currently only does so for the integral types.

- Jonathan M Davis


More information about the Digitalmars-d mailing list