Add #ifdefs to make sure it only build on supported linux platforms.

This commit is contained in:
ramiro%netscape.com 1999-06-21 02:29:17 +00:00
Родитель 3c966d4e31
Коммит ea02c26409
2 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -22,7 +22,7 @@
#if defined(_WIN32) #if defined(_WIN32)
#include <windows.h> #include <windows.h>
#elif defined(linux) #elif defined(linux) && defined(__GLIBC__) && defined(__i386)
#include <setjmp.h> #include <setjmp.h>
// //
@ -30,7 +30,7 @@
// if __USE_GNU is defined. I suppose its some kind of standards // if __USE_GNU is defined. I suppose its some kind of standards
// adherence thing. // adherence thing.
// //
#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 1) #if (__GLIBC_MINOR__ >= 1)
#define __USE_GNU #define __USE_GNU
#endif #endif
@ -270,7 +270,9 @@ nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen)
*cp = 0; *cp = 0;
} }
/* _WIN32 */ /* _WIN32 */
#elif defined(linux) && defined(__i386) // i386 Linux stackwalking code
#elif defined(linux) && defined(__GLIBC__) && defined(__i386) // i386 Linux stackwalking code
void void
nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen) nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen)
@ -325,7 +327,6 @@ nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen)
*cp = '\0'; *cp = '\0';
} }
// i386 linux
#else // unsupported platform. #else // unsupported platform.
NS_COM void NS_COM void

Просмотреть файл

@ -22,7 +22,7 @@
#if defined(_WIN32) #if defined(_WIN32)
#include <windows.h> #include <windows.h>
#elif defined(linux) #elif defined(linux) && defined(__GLIBC__) && defined(__i386)
#include <setjmp.h> #include <setjmp.h>
// //
@ -30,7 +30,7 @@
// if __USE_GNU is defined. I suppose its some kind of standards // if __USE_GNU is defined. I suppose its some kind of standards
// adherence thing. // adherence thing.
// //
#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 1) #if (__GLIBC_MINOR__ >= 1)
#define __USE_GNU #define __USE_GNU
#endif #endif
@ -270,7 +270,9 @@ nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen)
*cp = 0; *cp = 0;
} }
/* _WIN32 */ /* _WIN32 */
#elif defined(linux) && defined(__i386) // i386 Linux stackwalking code
#elif defined(linux) && defined(__GLIBC__) && defined(__i386) // i386 Linux stackwalking code
void void
nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen) nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen)
@ -325,7 +327,6 @@ nsTraceRefcnt::WalkTheStack(char* aBuffer, int aBufLen)
*cp = '\0'; *cp = '\0';
} }
// i386 linux
#else // unsupported platform. #else // unsupported platform.
NS_COM void NS_COM void