You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "P.Van-Dyck" <IM...@company-benelux.be> on 2000/11/07 12:35:10 UTC

InterlockedCompareExchange (re : BCB5 support in release 1.3.0)

Hi,

According to MSDN July 2000, 'InterlockedCompareExchange' is superseeded by
'InterlockedCompareExchangePonter'. This will correct compilation problems
in Borland without resorting to casts etc.

regards,
Pieter

>Hello.
>
>I don't know if other compilers allow the passing of "toFill" without
>typecasting. BCB5 doesn't. I had to change the following passage to get it
>compiled.
>
>Changes in Win32PlatformUtils.cpp
>
>// --- start
>     #ifdef __BORLANDC__
>     return (long *)::InterlockedCompareExchange
>     (
>          (long*)toFill
>          , (long)newValue
>          , (long)toCompare
>     );
>     #else
>// --- stop
>
>    return ::InterlockedCompareExchange
>    (
>        toFill
>        , (void*)newValue
>        , (void*)toCompare
>    );
>// --- start
>
>    #endif
>// --- stop
>
>    #endif

Re: InterlockedCompareExchange (re : BCB5 support in release 1.3.0)

Posted by Andy Heninger <an...@jtcsv.com>.
For anyone who is stumbling over not having the latest
Microsoft headers, they are available at

http://www.microsoft.com/msdownload/platformsdk/setuplauncher.htm

Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com



----- Original Message -----
From: "Andy Heninger" <an...@jtcsv.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, November 07, 2000 10:43 AM
Subject: Re: InterlockedCompareExchange (re : BCB5 support in release
1.3.0)


> Can someone with Borland BCB5 confirm that the
> InterlockedCompareExcangePointer version of the function works
> for them?  If it's there, this does seem like the way to go.
>
> I have changed the code to be what was originally suggested
> for Borland, with the casts.  It looks like the latest
> Microsoft headers and the Borland headers are the same, but
> my machine doesn't have them.  Something else to upgrade...
>
>
> Andy Heninger
> IBM XML Technology Group, Cupertino, CA
> heninger@us.ibm.com
>
>
> ----- Original Message -----
> From: "P.Van-Dyck"
>
<IMCEAEX-_O=COMP-ANY_OU=COMPANY-BENELUX+2EBE_CN=RECIPIENTS_CN=PIETERVD@com
> pany-benelux.be>
> To: <xe...@xml.apache.org>
> Sent: Tuesday, November 07, 2000 3:35 AM
> Subject: InterlockedCompareExchange (re : BCB5 support in release 1.3.0)
>
>
> > Hi,
> >
> > According to MSDN July 2000, 'InterlockedCompareExchange' is
superseeded
> by
> > 'InterlockedCompareExchangePonter'. This will correct compilation
> problems
> > in Borland without resorting to casts etc.
> >
> > regards,
> > Pieter
> >
> > >Hello.
> > >
> > >I don't know if other compilers allow the passing of "toFill" without
> > >typecasting. BCB5 doesn't. I had to change the following passage to
get
> it
> > >compiled.
> > >
> > >Changes in Win32PlatformUtils.cpp
> > >
> > >// --- start
> > >     #ifdef __BORLANDC__
> > >     return (long *)::InterlockedCompareExchange
> > >     (
> > >          (long*)toFill
> > >          , (long)newValue
> > >          , (long)toCompare
> > >     );
> > >     #else
> > >// --- stop
> > >
> > >    return ::InterlockedCompareExchange
> > >    (
> > >        toFill
> > >        , (void*)newValue
> > >        , (void*)toCompare
> > >    );
> > >// --- start
> > >
> > >    #endif
> > >// --- stop
> > >
> > >    #endif
> >
>



Re: InterlockedCompareExchange (re : BCB5 support in release 1.3.0)

Posted by Andy Heninger <an...@jtcsv.com>.
Can someone with Borland BCB5 confirm that the
InterlockedCompareExcangePointer version of the function works
for them?  If it's there, this does seem like the way to go.

I have changed the code to be what was originally suggested
for Borland, with the casts.  It looks like the latest
Microsoft headers and the Borland headers are the same, but
my machine doesn't have them.  Something else to upgrade...


Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com


----- Original Message -----
From: "P.Van-Dyck"
<IMCEAEX-_O=COMP-ANY_OU=COMPANY-BENELUX+2EBE_CN=RECIPIENTS_CN=PIETERVD@com
pany-benelux.be>
To: <xe...@xml.apache.org>
Sent: Tuesday, November 07, 2000 3:35 AM
Subject: InterlockedCompareExchange (re : BCB5 support in release 1.3.0)


> Hi,
>
> According to MSDN July 2000, 'InterlockedCompareExchange' is superseeded
by
> 'InterlockedCompareExchangePonter'. This will correct compilation
problems
> in Borland without resorting to casts etc.
>
> regards,
> Pieter
>
> >Hello.
> >
> >I don't know if other compilers allow the passing of "toFill" without
> >typecasting. BCB5 doesn't. I had to change the following passage to get
it
> >compiled.
> >
> >Changes in Win32PlatformUtils.cpp
> >
> >// --- start
> >     #ifdef __BORLANDC__
> >     return (long *)::InterlockedCompareExchange
> >     (
> >          (long*)toFill
> >          , (long)newValue
> >          , (long)toCompare
> >     );
> >     #else
> >// --- stop
> >
> >    return ::InterlockedCompareExchange
> >    (
> >        toFill
> >        , (void*)newValue
> >        , (void*)toCompare
> >    );
> >// --- start
> >
> >    #endif
> >// --- stop
> >
> >    #endif
>