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.
This commit is contained in:
ramiro%netscape.com 1998-07-31 11:00:24 +00:00
Родитель 05bb69e0dc
Коммит d97a800952
2 изменённых файлов: 33 добавлений и 7 удалений

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

@ -26,10 +26,8 @@
#include <Xfe/XfeTest.h>
#if defined(LINUX) || defined(IRIX)
#ifdef XFE_USE_NATIVE_XPM
#include <X11/xpm.h>
#else
#include <xpm.h>
#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

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

@ -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