From 080cc049b6f2cdab62287caf86bd70975bacdf8b Mon Sep 17 00:00:00 2001 From: ramiro Date: Wed, 15 Jul 1998 10:34:34 +0000 Subject: [PATCH] Nasty hack to deal with hpux 10.x ANSI C compiler bug. Do the expression expansion "by hand". HPUX patches from http://hpux.csc.liv.ac.uk/hppd/mozilla/patch.html. git-svn-id: svn://10.0.0.236/trunk@5588 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/xfe/icons/mkicons.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mozilla/cmd/xfe/icons/mkicons.c b/mozilla/cmd/xfe/icons/mkicons.c index b0bfb69619d..0612223f0b2 100644 --- a/mozilla/cmd/xfe/icons/mkicons.c +++ b/mozilla/cmd/xfe/icons/mkicons.c @@ -652,6 +652,9 @@ MKICON_GetImage(char *file) URL_Struct *url; NET_StreamClass *stream; MWContext cx; +#ifdef __hpux + void *imptr; +#endif memset (&cx, 0, sizeof(cx)); @@ -840,13 +843,29 @@ MKICON_GetImage(char *file) url->address[0] = counter++; +#ifdef __hpux + /* Expression expansion to avoid HP 10.X ANSI C compiler bug */ + if (strstr (file, ".gif")) imptr = (void *) IL_GIF; + else + if (strstr (file, ".jpg") || strstr (file,".jpeg")) + imptr = (void *) IL_JPEG; + else + if (strstr (file, ".xbm")) imptr = (void *) IL_XBM; + else imptr = (void *) IL_GIF; +#endif + + /* Create a stream and decode the image. */ stream = IL_NewStream (FO_PRESENT, +#ifdef __hpux + imptr, +#else (strstr (file, ".gif") ? (void *) IL_GIF : strstr (file, ".jpg") ? (void *) IL_JPEG : strstr (file, ".jpeg") ? (void *) IL_JPEG : strstr (file, ".xbm") ? (void *) IL_XBM : (void *) IL_GIF), +#endif url, &cx); stream->put_block (stream, file_data, size); stream->complete (stream);