I dont want to beat this thing to death. But just feel that we could deal with win95 as a special case rather than forcing ALL windows versions to use a hack that is meant for just win95.
there is nothing like "when win95 dies". it will never die. we cant stop someone somewhere from running win95 on his box. We dont have any control over that. An alternative to "changing the code when win95 dies" would be to "use runtime fns to switch to appropriate code based on current windows version..." As always, just my two cents. Peace. -Vinayak > -----Original Message----- > From: David N Bertoni/Cambridge/IBM > [mailto:[EMAIL PROTECTED] > Sent: Friday, March 14, 2003 12:34 PM > To: [EMAIL PROTECTED] > Subject: RE: XMLPlatformUtils::compareAndSwap fn > > > > > > > Hi Vinayak, > > The comment is explicit about why the ifdef is there: > > // If you are willing to give up Win95 support change > this to #if 0 > // otherwise we are back to using assembler. > // (But only if building with compilers that support inline > assembler.) > > In other words, some day, when Windows 95 is dead and gone, change: > > #if defined(_MSC_VER) || defined(__BCPLUSPLUS__) > > to: > > #if 0 > > and you won't need inline assembler any more. Or, if your > compiler doesn't > support inline assembler, you can do the same thing, with the > caveat that > the library won't run on Win95. > > Dave > > > > > > > <[EMAIL PROTECTED] > > > ngcast.com> To: > <[EMAIL PROTECTED]> > > cc: (bcc: > David N Bertoni/Cambridge/IBM) > 03/14/2003 09:26 Subject: RE: > XMLPlatformUtils::compareAndSwap fn > > AM > > > Please respond > > > to xerces-c-dev > > > > > > > > > > The whole point of the ifdef is that all Windows builds use > the inline > > assembly code. > > Got it. But then all we needed was > > #ifdef WIN64 > InterlockedCompareExchangePointer(..) > #else > assembly code > #endif > > Because this entire class (under Win32PlatformUtils.cpp) is > going to be > used only by windows clients, I guess. > > The code is not wrong, per se. But the intention behind the coding is > slightly confusing because the call to the > ::InterlockedCompareExchange at > the bottom now belongs to the domain of unreachable code :-). > > Regards, > -Vinayak > > > -----Original Message----- > > From: David N Bertoni/Cambridge/IBM > > [mailto:[EMAIL PROTECTED] > > Sent: Friday, March 14, 2003 11:37 AM > > To: [EMAIL PROTECTED] > > Subject: Re: XMLPlatformUtils::compareAndSwap fn > > > > > > > > > > > > > > The whole point of the ifdef is that all Windows builds use > the inline > > assembly code. The ifdef is checked at compile time, but the > > assumption is > > you would want to build on NT or Win2000, but run on Windows 95. > > > > Dave > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
