Various fixes to let the tree compile with gcc 2.95:

String constants are now (const char *)s and must be explicitly cast to (char *).
operator new is expected to be empty or throw an expection instead of returning null. (ifdef'd for gcc 2.95+)
Stricter checks on register clobbering in embedded asm. (at least I think that's what it is)
Expects the main function to return int, not something similiar to it like PRInt32.

Still requires a tweak to remove -mno-486 from NSPR's *.mk files.


git-svn-id: svn://10.0.0.236/trunk@42646 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cls%seawood.org
1999-08-07 06:01:31 +00:00
parent 76b2185c50
commit 6a502d3b0e
11 changed files with 38 additions and 14 deletions

View File

@@ -92,7 +92,9 @@ private:
// Not meant to be implemented. This makes it a compiler error to
// attempt to create an nsAutoLock object on the heap.
static void* operator new(size_t /*size*/) {
#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
return nsnull;
#endif
}
static void operator delete(void* /*memory*/) {}
@@ -172,7 +174,9 @@ private:
// Not meant to be implemented. This makes it a compiler error to
// attempt to create an nsAutoLock object on the heap.
static void* operator new(size_t /*size*/) {
#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
return nsnull;
#endif
}
static void operator delete(void* /*memory*/) {}
};
@@ -229,7 +233,9 @@ private:
// Not meant to be implemented. This makes it a compiler error to
// attempt to create an nsAutoLock object on the heap.
static void* operator new(size_t /*size*/) {
#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
return nsnull;
#endif
}
static void operator delete(void* /*memory*/) {}
};