axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Dick <adrian.d...@uk.ibm.com>
Subject Re: Fw: XSD types
Date Thu, 19 May 2005 09:25:32 GMT

Hmm, yes that was a piece of sloppy coding on my part.


I believe your proposal will work on all the unix platforms, but the
identifier needs to be I64 on Windows.


I suggest we add the following to the PlatformSpecificX.hpp files:
/**
 * identifier of 64bit integer literals
 */
#define LONGLONGVALUE(value) value##I64

This will give the following in soap/xsd/long.cpp:
*maxInclusive = LONGLONGVALUE(9223372036854775807);


I have done a quick test on AIX, Linux and Windows, and this works fine.

_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


Nadir Amra <amra@us.ibm.com> wrote on 18/05/2005 23:00:57:

> In soap/xsd/long.cpp we use strtol() as follows:
>
> *minInclusive = strtol ("-9223372036854775808", &end, 10);
>
> and
>
> *maxInclusive = strtol ("9223372036854775807", &end, 10);
>
> for min and max.  strtol() converts string to long integer.  long integer

> is 32 bits on OS/400, so the resultant value is not correct.  Is there a
> way to make this platform free of code (which is why i proposed the use
of
> limits.h)?  On OS/400, we can do something like
>
> long long x = 9223372036854775807LL.  is this a standard or an OS/400
> thing?
>
> If not, it may be a candidate for platform abstraction layer.
>
> Nadir K. Amra
>
>
> Mark Whitlock <mark_whitlock@uk.ibm.com> wrote on 05/18/2005 04:00:20 AM:
>
> >
> >
> >
> >
> > In src/soap/xsd the classes (eg Int.cpp) use hardcoded values because
> these
> > limits are defined by the SOAP spec. Values from limits.h are platform
> > specific.
> > Mark
> > Mark Whitlock
> > IBM
> >
> > ----- Forwarded by Mark Whitlock/UK/IBM on 18/05/2005 09:53 -----
> >
> >              Nadir Amra
> >              <amra@us.ibm.com>
> > To
> >              17/05/2005 20:44          "Apache AXIS C Developers List"

> >                                        <axis-c-dev@ws.apache.org>
> >
> >
> > OS/400 is 64-bit machine.  ints and longs are 32 bit. long long is
> 64bit.
> >
> > In addition, I was wondering why we do not use the <limits.h> file to
> > determine max/min value for the various types?  I saw that we hard-code
> > the values when checking for ranges.
> >
> > Nadir K. Amra
> >
> >
>


Mime
View raw message