diff --git a/mozilla/modules/libimg/jpgcom/Makefile.in b/mozilla/modules/libimg/jpgcom/Makefile.in index 812efb7377b..dfbbaceaa43 100644 --- a/mozilla/modules/libimg/jpgcom/Makefile.in +++ b/mozilla/modules/libimg/jpgcom/Makefile.in @@ -27,7 +27,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk LIBRARY_NAME = nsjpg -IS_COMPONENT = 1 +IS_COMPONENT = 1 REQUIRES += util jpeg xpcom img @@ -52,3 +52,11 @@ endif include $(topsrcdir)/config/rules.mk +ifeq ($(OS_ARCH)$(OS_RELEASE),SunOS5) +ifeq ($(shell uname -r),5.3) +# In this special case (jpeg.cpp), the compiler has to know +# the OS version to a finer granularity than normal. +DEFINES += -DOSMINOR=3 +endif +endif + diff --git a/mozilla/modules/libimg/jpgcom/jpeg.cpp b/mozilla/modules/libimg/jpgcom/jpeg.cpp index 4dd643a9fd4..2113d3461e8 100644 --- a/mozilla/modules/libimg/jpgcom/jpeg.cpp +++ b/mozilla/modules/libimg/jpgcom/jpeg.cpp @@ -22,7 +22,7 @@ /* * jpeg.c --- Glue code to Independent JPEG Group decoder library - * $Id: jpeg.cpp,v 1.13 1999-12-03 01:05:41 pnunn%netscape.com Exp $ + * $Id: jpeg.cpp,v 1.14 1999-12-20 23:58:23 briano%netscape.com Exp $ */ @@ -40,6 +40,12 @@ # include #endif +/* This is a lame hack to get around a problem with boolean on Solaris 2.3 */ +#if defined(__sun) && defined(__sparc) && defined(__svr4__) && (OSMINOR == 3) +#define HAVE_BOOLEAN +#undef MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES +#endif + PR_BEGIN_EXTERN_C #include "jpeglib.h" #include "jerror.h" diff --git a/mozilla/modules/libimg/src/Makefile.in b/mozilla/modules/libimg/src/Makefile.in index 210ed0cc725..3218411c2f6 100644 --- a/mozilla/modules/libimg/src/Makefile.in +++ b/mozilla/modules/libimg/src/Makefile.in @@ -54,6 +54,13 @@ override NO_STATIC_LIB= include $(topsrcdir)/config/rules.mk -ifeq ($(OS_ARCH), Linux) -DEFINES += -D_BSD_SOURCE -D_XOPEN_SOURCE=500 +ifeq ($(OS_ARCH),Linux) +DEFINES += -D_BSD_SOURCE -D_XOPEN_SOURCE=500 +endif +ifeq ($(OS_ARCH)$(OS_RELEASE),SunOS5) +ifeq ($(shell uname -r),5.3) +# In this special case (dither.cpp), the compiler has to know +# the OS version to a finer granularity than normal. +DEFINES += -DOSMINOR=3 +endif endif diff --git a/mozilla/modules/libimg/src/dither.cpp b/mozilla/modules/libimg/src/dither.cpp index 4fc2eb88952..77aa965dfc2 100644 --- a/mozilla/modules/libimg/src/dither.cpp +++ b/mozilla/modules/libimg/src/dither.cpp @@ -23,6 +23,12 @@ #include "if.h" #include "il.h" +/* This is a lame hack to get around a problem with boolean on Solaris 2.3 */ +#if defined(__sun) && defined(__sparc) && defined(__svr4__) && (OSMINOR == 3) +#define HAVE_BOOLEAN +#undef MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES +#endif + #include "jpeglib.h" #include "jerror.h" #include "nsCRT.h"