fixing OS/2 VisualAge platform bustage, and bad dates in licenses

This commit is contained in:
scc%mozilla.org 2000-06-18 05:00:31 +00:00
parent 6b09973c62
commit 3446bda5c3
10 changed files with 53 additions and 30 deletions

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -133,7 +133,7 @@ class nsReadingIterator
return *get();
}
//#if 0
#if 0
// An iterator really deserves this, but some compilers (notably IBM VisualAge for OS/2)
// don't like this when |CharT| is a type without members.
pointer
@ -141,7 +141,7 @@ class nsReadingIterator
{
return get();
}
//#endif
#endif
nsReadingIterator<CharT>&
operator++()
@ -1122,14 +1122,17 @@ Compare( const basic_nsAReadableString<CharT>& lhs, const basic_nsAReadableStrin
nsReadingIterator<CharT> leftIter( lhs.BeginReading() );
nsReadingIterator<CharT> rightIter( rhs.BeginReading() );
int result;
for (;;)
{
PRUint32 lengthAvailable = PRUint32( NS_MIN(leftIter.size_forward(), rightIter.size_forward()) );
if ( lengthAvailable > lengthToCompare )
lengthAvailable = lengthToCompare;
if ( int result = nsCharTraits<CharT>::compare(leftIter.get(), rightIter.get(), lengthAvailable) )
// Note: |result| should be declared in this |if| expression, but some compilers don't like that
if ( (result = nsCharTraits<CharT>::compare(leftIter.get(), rightIter.get(), lengthAvailable)) != 0 )
return result;
if ( !(lengthToCompare -= lengthAvailable) )

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -95,7 +95,7 @@ class nsWritingIterator
return *get();
}
//#if 0
#if 0
// An iterator really deserves this, but some compilers (notably IBM VisualAge for OS/2)
// don't like this when |CharT| is a type without members.
pointer
@ -103,7 +103,7 @@ class nsWritingIterator
{
return get();
}
//#endif
#endif
nsWritingIterator<CharT>&
operator++()

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -165,7 +165,7 @@ struct nsCharTraits
length( const char_type* s )
{
size_t result = 0;
while ( !eq(*s++, CharT()) )
while ( !eq(*s++, CharT(0)) )
++result;
return result;
}

View File

@ -162,6 +162,7 @@
#define HAVE_CPP_ACCESS_CHANGING_USING
#define HAVE_CPP_AMBIGUITY_RESOLVING_USING
#define HAVE_CPP_EXPLICIT
#define HAVE_CPP_TYPENAME
#define HAVE_CPP_BOOL
#define HAVE_CPP_NAMESPACE_STD
#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL
@ -175,6 +176,7 @@
#define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX
#define HAVE_CPP_EXPLICIT
#define HAVE_CPP_TYPENAME
#define HAVE_CPP_ACCESS_CHANGING_USING
#if (_MSC_VER<1100)
@ -190,6 +192,14 @@
//#define HAVE_CPP_2BYTE_WCHAR_T
#endif
// until we get an autoconf test for this, we'll assume it's on (since we're using it already)
#define HAVE_CPP_TYPENAME
/* waiting to find out if OS/2 VisualAge participates in autoconf */
#ifdef XP_OS2_VACPP
#undef HAVE_CPP_TYPENAME
#endif
#ifndef __PRUNICHAR__
#define __PRUNICHAR__
@ -208,6 +218,10 @@
#define explicit
#endif
#ifndef HAVE_CPP_TYPENAME
#define typename
#endif
#ifdef HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX
#define NS_SPECIALIZE_TEMPLATE template <>
#else

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -133,7 +133,7 @@ class nsReadingIterator
return *get();
}
//#if 0
#if 0
// An iterator really deserves this, but some compilers (notably IBM VisualAge for OS/2)
// don't like this when |CharT| is a type without members.
pointer
@ -141,7 +141,7 @@ class nsReadingIterator
{
return get();
}
//#endif
#endif
nsReadingIterator<CharT>&
operator++()
@ -1122,14 +1122,17 @@ Compare( const basic_nsAReadableString<CharT>& lhs, const basic_nsAReadableStrin
nsReadingIterator<CharT> leftIter( lhs.BeginReading() );
nsReadingIterator<CharT> rightIter( rhs.BeginReading() );
int result;
for (;;)
{
PRUint32 lengthAvailable = PRUint32( NS_MIN(leftIter.size_forward(), rightIter.size_forward()) );
if ( lengthAvailable > lengthToCompare )
lengthAvailable = lengthToCompare;
if ( int result = nsCharTraits<CharT>::compare(leftIter.get(), rightIter.get(), lengthAvailable) )
// Note: |result| should be declared in this |if| expression, but some compilers don't like that
if ( (result = nsCharTraits<CharT>::compare(leftIter.get(), rightIter.get(), lengthAvailable)) != 0 )
return result;
if ( !(lengthToCompare -= lengthAvailable) )

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -95,7 +95,7 @@ class nsWritingIterator
return *get();
}
//#if 0
#if 0
// An iterator really deserves this, but some compilers (notably IBM VisualAge for OS/2)
// don't like this when |CharT| is a type without members.
pointer
@ -103,7 +103,7 @@ class nsWritingIterator
{
return get();
}
//#endif
#endif
nsWritingIterator<CharT>&
operator++()

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -165,7 +165,7 @@ struct nsCharTraits
length( const char_type* s )
{
size_t result = 0;
while ( !eq(*s++, CharT()) )
while ( !eq(*s++, CharT(0)) )
++result;
return result;
}

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -133,7 +133,7 @@ class nsReadingIterator
return *get();
}
//#if 0
#if 0
// An iterator really deserves this, but some compilers (notably IBM VisualAge for OS/2)
// don't like this when |CharT| is a type without members.
pointer
@ -141,7 +141,7 @@ class nsReadingIterator
{
return get();
}
//#endif
#endif
nsReadingIterator<CharT>&
operator++()
@ -1122,14 +1122,17 @@ Compare( const basic_nsAReadableString<CharT>& lhs, const basic_nsAReadableStrin
nsReadingIterator<CharT> leftIter( lhs.BeginReading() );
nsReadingIterator<CharT> rightIter( rhs.BeginReading() );
int result;
for (;;)
{
PRUint32 lengthAvailable = PRUint32( NS_MIN(leftIter.size_forward(), rightIter.size_forward()) );
if ( lengthAvailable > lengthToCompare )
lengthAvailable = lengthToCompare;
if ( int result = nsCharTraits<CharT>::compare(leftIter.get(), rightIter.get(), lengthAvailable) )
// Note: |result| should be declared in this |if| expression, but some compilers don't like that
if ( (result = nsCharTraits<CharT>::compare(leftIter.get(), rightIter.get(), lengthAvailable)) != 0 )
return result;
if ( !(lengthToCompare -= lengthAvailable) )

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -95,7 +95,7 @@ class nsWritingIterator
return *get();
}
//#if 0
#if 0
// An iterator really deserves this, but some compilers (notably IBM VisualAge for OS/2)
// don't like this when |CharT| is a type without members.
pointer
@ -103,7 +103,7 @@ class nsWritingIterator
{
return get();
}
//#endif
#endif
nsWritingIterator<CharT>&
operator++()

View File

@ -14,7 +14,7 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author:
@ -165,7 +165,7 @@ struct nsCharTraits
length( const char_type* s )
{
size_t result = 0;
while ( !eq(*s++, CharT()) )
while ( !eq(*s++, CharT(0)) )
++result;
return result;
}