mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
fixing OS/2 VisualAge platform bustage, and bad dates in licenses
This commit is contained in:
parent
6b09973c62
commit
3446bda5c3
@ -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) )
|
||||
|
@ -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++()
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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) )
|
||||
|
@ -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++()
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) )
|
||||
|
@ -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++()
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user