From d97a800952093cc891c6b52122c60a21190d172b Mon Sep 17 00:00:00 2001 From: "ramiro%netscape.com" Date: Fri, 31 Jul 1998 11:00:24 +0000 Subject: [PATCH] I want to build these tests on platforms that dont have xpm, so i added some ifdefs to allow building on loser platforms that dont ship xpm. --- cmd/xfe/XfeWidgets/XfeTest/TestPixmap.c | 36 ++++++++++++++++++++----- cmd/xfe/XfeWidgets/XfeWidgets.mk | 4 +++ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/cmd/xfe/XfeWidgets/XfeTest/TestPixmap.c b/cmd/xfe/XfeWidgets/XfeTest/TestPixmap.c index da76c070319..09da3917731 100644 --- a/cmd/xfe/XfeWidgets/XfeTest/TestPixmap.c +++ b/cmd/xfe/XfeWidgets/XfeTest/TestPixmap.c @@ -26,10 +26,8 @@ #include -#if defined(LINUX) || defined(IRIX) +#ifdef XFE_USE_NATIVE_XPM #include -#else -#include #endif /*----------------------------------------------------------------------*/ @@ -44,8 +42,10 @@ XfeAllocatePixmapFromFile(char * filename, Pixmap * pixmap, Pixmap * mask) { - XpmAttributes attrib; Boolean result = True; + +#ifdef XFE_USE_NATIVE_XPM + XpmAttributes attrib; XpmColorSymbol symbols[1]; assert( dpy != NULL ); @@ -81,7 +81,17 @@ XfeAllocatePixmapFromFile(char * filename, result = False; } - return result; +#else + + /* So that loser platforms that dont ship xpm will at least compile */ + *pixmap = XmUNSPECIFIED_PIXMAP; + *mask = XmUNSPECIFIED_PIXMAP; + + result = False; + +#endif + + return result; } /*----------------------------------------------------------------------*/ Boolean @@ -95,8 +105,10 @@ XfeAllocatePixmapFromData(char ** data, Pixmap * pixmap, Pixmap * mask) { - XpmAttributes attrib; Boolean result = True; + +#ifdef XFE_USE_NATIVE_XPM + XpmAttributes attrib; XpmColorSymbol symbols[1]; assert( dpy != NULL ); @@ -130,7 +142,17 @@ XfeAllocatePixmapFromData(char ** data, result = False; } - return result; +#else + + /* So that loser platforms that dont ship xpm will at least compile */ + *pixmap = XmUNSPECIFIED_PIXMAP; + *mask = XmUNSPECIFIED_PIXMAP; + + result = False; + +#endif + + return result; } /*----------------------------------------------------------------------*/ Pixmap diff --git a/cmd/xfe/XfeWidgets/XfeWidgets.mk b/cmd/xfe/XfeWidgets/XfeWidgets.mk index 4bacd0bdbff..b4b97061939 100644 --- a/cmd/xfe/XfeWidgets/XfeWidgets.mk +++ b/cmd/xfe/XfeWidgets/XfeWidgets.mk @@ -94,6 +94,8 @@ ifeq ($(OS_ARCH),Linux) XFE_USE_NATIVE_XPM = True + XFE_EXTRA_DEFINES += -DXFE_USE_NATIVE_XPM + XFE_OS_LD_FLAGS = endif @@ -151,6 +153,8 @@ ifeq ($(OS_ARCH),IRIX) XFE_USE_NATIVE_XPM = True + XFE_EXTRA_DEFINES += -DXFE_USE_NATIVE_XPM + XFE_OS_LD_FLAGS = endif