mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
# 37239
r= dougt@netscape.com OS/2 bring up continues - xpcom changes - #ifdefs for OS/2
This commit is contained in:
parent
d41c17e2f8
commit
5be272bc33
@ -889,14 +889,14 @@ nsCString& nsCString::Assign(char aChar) {
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
#ifdef AIX
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCString& nsCString::operator=(const nsSubsumeCStr& aSubsumeString) {
|
||||
nsSubsumeCStr temp(aSubsumeString); // a temp is needed for the AIX compiler
|
||||
nsSubsumeCStr temp(aSubsumeString); // a temp is needed for the AIX and VAC++ compiler
|
||||
CSubsume(*this,temp);
|
||||
#else
|
||||
nsCString& nsCString::operator=(nsSubsumeCStr& aSubsumeString) {
|
||||
CSubsume(*this,aSubsumeString);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
@ -1946,14 +1946,14 @@ nsCAutoString::nsCAutoString(PRUnichar aChar) : nsCString(){
|
||||
* @update gess 1/4/99
|
||||
* @param reference to a subsumeString
|
||||
*/
|
||||
#ifdef AIX
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCAutoString::nsCAutoString(const nsSubsumeCStr& aSubsumeStr) :nsCString() {
|
||||
nsSubsumeCStr temp(aSubsumeStr); // a temp is needed for the AIX compiler
|
||||
nsSubsumeCStr temp(aSubsumeStr); // a temp is needed for the AIX and VAC++ compilers
|
||||
CSubsume(*this,temp);
|
||||
#else
|
||||
nsCAutoString::nsCAutoString( nsSubsumeCStr& aSubsumeStr) :nsCString() {
|
||||
CSubsume(*this,aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -237,6 +237,7 @@ public:
|
||||
nsSubsumeCStr operator+(char aChar);
|
||||
#endif
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
Lexomorphic transforms...
|
||||
*********************************************************************/
|
||||
@ -432,8 +433,8 @@ public:
|
||||
|
||||
// Yes, I know this makes assignment from a |nsSubsumeString| not do the special thing
|
||||
// |nsSubsumeString| needs to go away
|
||||
#ifdef AIX
|
||||
nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX and VAC++ requires a const here
|
||||
#else
|
||||
nsCString& operator=(nsSubsumeCStr& aSubsumeString);
|
||||
#endif
|
||||
@ -813,11 +814,11 @@ public:
|
||||
// nsCAutoString(PRUnichar aChar);
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
nsCAutoString(const nsSubsumeCStr& aSubsumeStr); // AIX requires a const
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCAutoString(const nsSubsumeCStr& aSubsumeStr); // AIX and VAC++ require a const
|
||||
#else
|
||||
nsCAutoString(nsSubsumeCStr& aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
|
@ -124,8 +124,8 @@ public:
|
||||
* This constructor takes a subsumestr
|
||||
* @param reference to subsumestr
|
||||
*/
|
||||
#ifdef AIX
|
||||
nsString(const nsSubsumeStr& aSubsumeStr); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsString(const nsSubsumeStr& aSubsumeStr); // AIX and VAC++ require a const here
|
||||
#else
|
||||
nsString(nsSubsumeStr& aSubsumeStr);
|
||||
#endif
|
||||
@ -468,8 +468,8 @@ public:
|
||||
|
||||
// Yes, I know this makes assignment from a |nsSubsumeString| not do the special thing
|
||||
// |nsSubsumeString| needs to go away
|
||||
#ifdef AIX
|
||||
nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX and VAC++ requires a const here
|
||||
#else
|
||||
nsString& operator=(nsSubsumeStr& aSubsumeString);
|
||||
#endif
|
||||
@ -904,11 +904,11 @@ public:
|
||||
// nsAutoString(const nsStr& aString);
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
nsAutoString(const nsSubsumeStr& aSubsumeStr); // AIX requires a const
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsAutoString(const nsSubsumeStr& aSubsumeStr); // AIX and VAC++ requires a const
|
||||
#else
|
||||
nsAutoString(nsSubsumeStr& aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
|
@ -889,14 +889,14 @@ nsCString& nsCString::Assign(char aChar) {
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
#ifdef AIX
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCString& nsCString::operator=(const nsSubsumeCStr& aSubsumeString) {
|
||||
nsSubsumeCStr temp(aSubsumeString); // a temp is needed for the AIX compiler
|
||||
nsSubsumeCStr temp(aSubsumeString); // a temp is needed for the AIX and VAC++ compiler
|
||||
CSubsume(*this,temp);
|
||||
#else
|
||||
nsCString& nsCString::operator=(nsSubsumeCStr& aSubsumeString) {
|
||||
CSubsume(*this,aSubsumeString);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
@ -1946,14 +1946,14 @@ nsCAutoString::nsCAutoString(PRUnichar aChar) : nsCString(){
|
||||
* @update gess 1/4/99
|
||||
* @param reference to a subsumeString
|
||||
*/
|
||||
#ifdef AIX
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCAutoString::nsCAutoString(const nsSubsumeCStr& aSubsumeStr) :nsCString() {
|
||||
nsSubsumeCStr temp(aSubsumeStr); // a temp is needed for the AIX compiler
|
||||
nsSubsumeCStr temp(aSubsumeStr); // a temp is needed for the AIX and VAC++ compilers
|
||||
CSubsume(*this,temp);
|
||||
#else
|
||||
nsCAutoString::nsCAutoString( nsSubsumeCStr& aSubsumeStr) :nsCString() {
|
||||
CSubsume(*this,aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -237,6 +237,7 @@ public:
|
||||
nsSubsumeCStr operator+(char aChar);
|
||||
#endif
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
Lexomorphic transforms...
|
||||
*********************************************************************/
|
||||
@ -432,8 +433,8 @@ public:
|
||||
|
||||
// Yes, I know this makes assignment from a |nsSubsumeString| not do the special thing
|
||||
// |nsSubsumeString| needs to go away
|
||||
#ifdef AIX
|
||||
nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX and VAC++ requires a const here
|
||||
#else
|
||||
nsCString& operator=(nsSubsumeCStr& aSubsumeString);
|
||||
#endif
|
||||
@ -813,11 +814,11 @@ public:
|
||||
// nsCAutoString(PRUnichar aChar);
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
nsCAutoString(const nsSubsumeCStr& aSubsumeStr); // AIX requires a const
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCAutoString(const nsSubsumeCStr& aSubsumeStr); // AIX and VAC++ require a const
|
||||
#else
|
||||
nsCAutoString(nsSubsumeCStr& aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
|
@ -124,8 +124,8 @@ public:
|
||||
* This constructor takes a subsumestr
|
||||
* @param reference to subsumestr
|
||||
*/
|
||||
#ifdef AIX
|
||||
nsString(const nsSubsumeStr& aSubsumeStr); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsString(const nsSubsumeStr& aSubsumeStr); // AIX and VAC++ require a const here
|
||||
#else
|
||||
nsString(nsSubsumeStr& aSubsumeStr);
|
||||
#endif
|
||||
@ -468,8 +468,8 @@ public:
|
||||
|
||||
// Yes, I know this makes assignment from a |nsSubsumeString| not do the special thing
|
||||
// |nsSubsumeString| needs to go away
|
||||
#ifdef AIX
|
||||
nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX and VAC++ requires a const here
|
||||
#else
|
||||
nsString& operator=(nsSubsumeStr& aSubsumeString);
|
||||
#endif
|
||||
@ -904,11 +904,11 @@ public:
|
||||
// nsAutoString(const nsStr& aString);
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
nsAutoString(const nsSubsumeStr& aSubsumeStr); // AIX requires a const
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsAutoString(const nsSubsumeStr& aSubsumeStr); // AIX and VAC++ requires a const
|
||||
#else
|
||||
nsAutoString(nsSubsumeStr& aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <Files.h>
|
||||
#include <Memory.h>
|
||||
#include <Processes.h>
|
||||
#elif defined(XP_OS2)
|
||||
#define MAX_PATH _MAX_PATH
|
||||
#elif defined(XP_PC)
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
@ -99,6 +101,17 @@ static nsresult GetCurrentProcessDirectory(nsILocalFile** aFile)
|
||||
|
||||
|
||||
#ifdef XP_PC
|
||||
#ifdef XP_OS2
|
||||
PPIB ppib;
|
||||
PTIB ptib;
|
||||
char buffer[CCHMAXPATH];
|
||||
DosGetInfoBlocks( &ptib, &ppib);
|
||||
DosQueryModuleName( ppib->pib_hmte, CCHMAXPATH, buffer);
|
||||
*strrchr( buffer, '\\') = '\0'; // XXX DBCS misery
|
||||
localFile->InitWithPath(buffer);
|
||||
*aFile = localFile;
|
||||
return NS_OK;
|
||||
#else
|
||||
char buf[MAX_PATH];
|
||||
if ( ::GetModuleFileName(0, buf, sizeof(buf)) ) {
|
||||
// chop of the executable name by finding the rightmost backslash
|
||||
@ -110,6 +123,7 @@ static nsresult GetCurrentProcessDirectory(nsILocalFile** aFile)
|
||||
*aFile = localFile;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif defined(XP_MAC)
|
||||
// get info for the the current process to determine the directory
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef XP_PC
|
||||
#if defined(XP_PC) && !defined(XP_OS2)
|
||||
#include <mbstring.h>
|
||||
#endif
|
||||
|
||||
@ -357,7 +357,7 @@ char* nsSimpleCharString::GetLeaf(char inSeparator) const
|
||||
return nsnull;
|
||||
|
||||
char* chars = mData->mString;
|
||||
#ifdef XP_PC
|
||||
#if defined(XP_PC) && !defined(XP_OS2)
|
||||
const char* lastSeparator = (const char*) _mbsrchr((const unsigned char *) chars, inSeparator);
|
||||
#else
|
||||
const char* lastSeparator = strrchr(chars, inSeparator);
|
||||
@ -374,7 +374,7 @@ char* nsSimpleCharString::GetLeaf(char inSeparator) const
|
||||
|
||||
// So now, separator was the last character. Poke in a null instead.
|
||||
*(char*)lastSeparator = '\0'; // Should use const_cast, but Unix has old compiler.
|
||||
#ifdef XP_PC
|
||||
#if defined(XP_PC) && !defined(XP_OS2)
|
||||
leafPointer = (const char*) _mbsrchr((const unsigned char *) chars, inSeparator);
|
||||
#else
|
||||
leafPointer = strrchr(chars, inSeparator);
|
||||
|
@ -889,14 +889,14 @@ nsCString& nsCString::Assign(char aChar) {
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
#ifdef AIX
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCString& nsCString::operator=(const nsSubsumeCStr& aSubsumeString) {
|
||||
nsSubsumeCStr temp(aSubsumeString); // a temp is needed for the AIX compiler
|
||||
nsSubsumeCStr temp(aSubsumeString); // a temp is needed for the AIX and VAC++ compiler
|
||||
CSubsume(*this,temp);
|
||||
#else
|
||||
nsCString& nsCString::operator=(nsSubsumeCStr& aSubsumeString) {
|
||||
CSubsume(*this,aSubsumeString);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
@ -1946,14 +1946,14 @@ nsCAutoString::nsCAutoString(PRUnichar aChar) : nsCString(){
|
||||
* @update gess 1/4/99
|
||||
* @param reference to a subsumeString
|
||||
*/
|
||||
#ifdef AIX
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCAutoString::nsCAutoString(const nsSubsumeCStr& aSubsumeStr) :nsCString() {
|
||||
nsSubsumeCStr temp(aSubsumeStr); // a temp is needed for the AIX compiler
|
||||
nsSubsumeCStr temp(aSubsumeStr); // a temp is needed for the AIX and VAC++ compilers
|
||||
CSubsume(*this,temp);
|
||||
#else
|
||||
nsCAutoString::nsCAutoString( nsSubsumeCStr& aSubsumeStr) :nsCString() {
|
||||
CSubsume(*this,aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -237,6 +237,7 @@ public:
|
||||
nsSubsumeCStr operator+(char aChar);
|
||||
#endif
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
Lexomorphic transforms...
|
||||
*********************************************************************/
|
||||
@ -432,8 +433,8 @@ public:
|
||||
|
||||
// Yes, I know this makes assignment from a |nsSubsumeString| not do the special thing
|
||||
// |nsSubsumeString| needs to go away
|
||||
#ifdef AIX
|
||||
nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX and VAC++ requires a const here
|
||||
#else
|
||||
nsCString& operator=(nsSubsumeCStr& aSubsumeString);
|
||||
#endif
|
||||
@ -813,11 +814,11 @@ public:
|
||||
// nsCAutoString(PRUnichar aChar);
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
nsCAutoString(const nsSubsumeCStr& aSubsumeStr); // AIX requires a const
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsCAutoString(const nsSubsumeCStr& aSubsumeStr); // AIX and VAC++ require a const
|
||||
#else
|
||||
nsCAutoString(nsSubsumeCStr& aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
|
@ -124,8 +124,8 @@ public:
|
||||
* This constructor takes a subsumestr
|
||||
* @param reference to subsumestr
|
||||
*/
|
||||
#ifdef AIX
|
||||
nsString(const nsSubsumeStr& aSubsumeStr); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsString(const nsSubsumeStr& aSubsumeStr); // AIX and VAC++ require a const here
|
||||
#else
|
||||
nsString(nsSubsumeStr& aSubsumeStr);
|
||||
#endif
|
||||
@ -468,8 +468,8 @@ public:
|
||||
|
||||
// Yes, I know this makes assignment from a |nsSubsumeString| not do the special thing
|
||||
// |nsSubsumeString| needs to go away
|
||||
#ifdef AIX
|
||||
nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX requires a const here
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX and VAC++ requires a const here
|
||||
#else
|
||||
nsString& operator=(nsSubsumeStr& aSubsumeString);
|
||||
#endif
|
||||
@ -904,11 +904,11 @@ public:
|
||||
// nsAutoString(const nsStr& aString);
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
nsAutoString(const nsSubsumeStr& aSubsumeStr); // AIX requires a const
|
||||
#if defined(AIX) || defined(XP_OS2_VACPP)
|
||||
nsAutoString(const nsSubsumeStr& aSubsumeStr); // AIX and VAC++ requires a const
|
||||
#else
|
||||
nsAutoString(nsSubsumeStr& aSubsumeStr);
|
||||
#endif // AIX
|
||||
#endif // AIX || XP_OS2_VACPP
|
||||
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
|
Loading…
Reference in New Issue
Block a user