corrected #ifdefs so gcc doesn't try and compile VC6 specific code

This commit is contained in:
jez_higgins 2003-04-03 17:58:11 +00:00
parent 2304018b6f
commit 34c84383a2
2 changed files with 7 additions and 7 deletions

View file

@ -81,7 +81,7 @@ public:
void str(const fromStringT& str)
{
// do conversion
#if !(_MSC_VER < 1300)
#if !(defined _MSC_VER) || !(_MSC_VER < 1300)
const std::codecvt<charT, fromCharT, typename traitsT::state_type>& cvt =
std::use_facet<std::codecvt<charT, fromCharT, typename traitsT::state_type> >(this->getloc());
#else
@ -127,7 +127,7 @@ private:
stringT no_conversion(const fromStringT& str)
{
stringT dest;
#if!(_MSC_VER < 1300)
#if !(defined _MSC_VER) || !(_MSC_VER < 1300)
std::copy(str.begin(), str.end(), std::back_inserter(dest));
#else
// hack around pre-Standard library
@ -178,7 +178,7 @@ public:
return out;
// convert it here
#if !(_MSC_VER < 1300)
#if !(defined _MSC_VER) || !(_MSC_VER < 1300)
const std::codecvt<charT, toCharT, typename traitsT::state_type>& cvt =
std::use_facet<std::codecvt<charT, toCharT, typename traitsT::state_type> >(this->getloc());
#else
@ -229,7 +229,7 @@ private:
toStringT no_conversion(const stringT& str)
{
toStringT dest;
#if!(_MSC_VER < 1300)
#if !(defined _MSC_VER) || !(_MSC_VER < 1300)
std::copy(str.begin(), str.end(), std::back_inserter(dest));
#else
for(typename stringT::const_iterator i = str.begin(); i != str.end(); ++i)

View file

@ -269,7 +269,7 @@ bool basic_socketbuf<charT, traitsT>::writeSocket()
bool ok(true);
const std::codecvt<charT, char, state_t>& cvt =
#if !(_MSC_VER < 1300)
#if !(defined _MSC_VER) || !(_MSC_VER < 1300)
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
#else
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
@ -326,7 +326,7 @@ int basic_socketbuf<charT, traitsT>::readSocket()
if(!inBuffer_.capacity())
growInBuffer();
#if!(_MSC_VER < 1300)
#if !(defined _MSC_VER) || !(_MSC_VER < 1300)
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
#else
size_t pbCount = min(gptr() - eback(), pbSize_);
@ -336,7 +336,7 @@ int basic_socketbuf<charT, traitsT>::readSocket()
pbCount*sizeof(charT));
const std::codecvt<charT, char, state_t>& cvt =
#if!(_MSC_VER < 1300)
#if !(defined _MSC_VER) || !(_MSC_VER < 1300)
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
#else
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);