Removed some MKLINUX & MACLINUX ifdefs. Replace a couple with (defined(linux) && defined(__powerpc__)).

Added glibc ifndefs to strdup declarations.
Fixed problem with stderr under glibc 2.1.
Patch submitted by Tom Rini <trini@kernel.crashing.org>.
This commit is contained in:
cls%seawood.org 1998-10-22 06:05:19 +00:00
Родитель 5364335be2
Коммит 58641ee9f5
9 изменённых файлов: 20 добавлений и 28 удалений

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

@ -1,4 +1,4 @@
/* $Id: qtmoz.cpp,v 1.5 1998/10/08 21:24:44 cyeh%netscape.com Exp $
/* $Id: qtmoz.cpp,v 1.6 1998/10/22 06:04:35 cls%seawood.org Exp $
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
@ -216,7 +216,7 @@ usage (void)
#include <errno.h>
#if 0
#if defined(XP_UNIX)
#if !defined(__FreeBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2)
#if !defined(__FreeBSD__) && !defined(LINUX_GLIBC_2)
#include <sys/errno.h>
extern char *sys_errlist[];
extern int sys_nerr;
@ -718,11 +718,7 @@ build_user_agent_string(char *versionLocale)
#elif defined(_HPUX_SOURCE)
strcat (buf, "HP-UX");
#elif defined(__linux)
#if defined(MACLINUX)
strcat (buf, "MkLinux");
#else
strcat (buf, "Linux");
#endif
#elif defined(_ATT4)
strcat (buf, "NCR/ATT");
#elif defined(__USLC__)

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

@ -1679,7 +1679,7 @@ lose_internationally (void)
char buf[64];
# if defined (__linux)
# if defined (MKLINUX)
# if defined (__powerpc__)
XP_SPRINTF(buf,"/usr/X11/lib/X11/locale/");
# else
XP_SPRINTF(buf,"/usr/X386/lib/X11/nls/");
@ -1951,11 +1951,7 @@ build_user_agent_string(char *versionLocale)
#elif defined(_HPUX_SOURCE)
strcat (buf, "HP-UX");
#elif defined(__linux)
#if defined(MKLINUX)
strcat (buf, "MkLinux");
#else
strcat (buf, "Linux");
#endif
#elif defined(_ATT4)
strcat (buf, "NCR/ATT");
#elif defined(__USLC__)

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

@ -96,8 +96,8 @@ PLATFORM_FLAGS += -m68020-40 -D$(CPU_ARCH)
PORT_FLAGS += -DNEED_TIME_R -DMITSHM -D_XOPEN_SOURCE
endif
ifeq ($(CPU_ARCH),ppc)
PLATFORM_FLAGS += -DMKLINUX -D$(CPU_ARCH)
PORT_FLAGS += -DHAVE_SYSERRLIST
PLATFORM_FLAGS += -D$(CPU_ARCH)
PORT_FLAGS += -DNEED_TIME_R -DMITSHM -D_XOPEN_SOURCE
endif
ifeq ($(CPU_ARCH),sparc)
PLATFORM_FLAGS += -D$(CPU_ARCH)

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

@ -85,7 +85,7 @@ XP_END_PROTOS
#endif
#if !defined(XP_WIN) && !defined(XP_OS2)
#if !defined(XP_WIN) && !defined(XP_OS2) && !(defined(__GLIBC__) && __GLIBC__ >= 2)
/* strdup is not an ANSI function */
XP_BEGIN_PROTOS
extern char * strdup (const char * s);

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

@ -62,7 +62,7 @@
#endif
#if !defined(XP_WIN) && !defined(XP_OS2)
#if !defined(XP_WIN) && !defined(XP_OS2) && !(defined(__GLIBC__) && __GLIBC__ >= 2)
/* strdup is not an ANSI function */
XP_BEGIN_PROTOS
extern char * strdup (const char * s);

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

@ -34,11 +34,11 @@
** Note: on some platforms va_list is defined as an array,
** and requires array notation.
*/
#if defined(MKLINUX) || defined(WIN16)
#if (defined(linux) && defined(__powerpc__)) || defined(WIN16)
#define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
#else
#define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
#endif /*MKLINUX*/
#endif /* Linux/PPC || WIN16 */
/*
** WARNING: This code may *NOT* call JS_LOG (because JS_LOG calls it)

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

@ -426,12 +426,6 @@ PRMJ_FormatTime(char *buf, int buflen, char *fmt, PRMJTime *prtm)
* tzoff + dst. (And mktime seems to return -1 for the exact dst
* changeover time.)
* Still not sure if MKLINUX is necessary; this is borrowed from the NSPR20
* prtime.c. I'm leaving it out - My Linux does the right thing without it
* (and the wrong thing with it) even though it has the tm_gmtoff, tm_zone
* fields. Linux seems to be happy so long as the tm struct is zeroed out.
* The #ifdef in nspr is:
* #if defined(SUNOS4) || defined(MKLINUX) || defined (__GLIBC >= 2)
*/
#if defined(SUNOS4)

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

@ -56,15 +56,21 @@ void XP_Trace1 (const char* message, ...)
#endif /* DEBUG */
}
#if defined(XP_UNIX)
FILE *real_stderr = stderr;
#endif /* XP_UNIX */
#if defined(XP_UNIX) && defined(DEBUG)
#if defined(__GLIBC__) && __GLIBC__ >= 2
FILE *real_stderr = 0;
#else
FILE *real_stderr = stderr;
#endif
void FE_Trace (const char* buffer)
{
#if defined(DEBUG_warren)
int len = XP_STRLEN(buffer); /* vsprintf does not return length */
#if defined(__GLIBC__) && __GLIBC__ >=2
if (real_stderr == 0)
real_stderr = stderr;
#endif
fwrite(buffer, 1, len, real_stderr);
#endif
}

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

@ -163,7 +163,7 @@ XP_BEGIN_PROTOS
extern XP_File vr_fileOpen (const char *name, const char * mode);
extern void vr_findGlobalRegName ();
#ifndef XP_PC
#if !defined(XP_PC) && !(defined(__GLIBC__) && __GLIBC__ >= 2)
extern char * strdup (const char * s);
#endif