mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-06 13:54:12 +01:00
WRaster: Fix incorrect use of macro USE_XSHM in installed header
The header "wraster.h" needs different behaviour depending on whether the support for X Shared Memory extension was enabled or not; but the related macro USE_XSHM is defined by WindowMaker's configure. After this header have been installed, the macro is no more useable. This patch makes the "wraster.h" a generated file, so it will be different depending on USE_XSHM, but will not make use of the macro itself. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
4dfb0dd059
commit
0e274dc979
@@ -11,13 +11,17 @@ lib_LTLIBRARIES = libwraster.la
|
||||
|
||||
libwraster_la_LDFLAGS = -version-info @WRASTER_VERSION@
|
||||
|
||||
CLEANFILES = wraster.h
|
||||
EXTRA_DIST += wraster.h.in
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
libwraster_la_LDFLAGS += -Wl,--version-script=libwraster.map
|
||||
EXTRA_libwraster_la_DEPENDENCIES = libwraster.map
|
||||
CLEANFILES = libwraster.map
|
||||
CLEANFILES += libwraster.map
|
||||
endif
|
||||
|
||||
include_HEADERS = wraster.h
|
||||
BUILT_SOURCES = wraster.h
|
||||
nodist_include_HEADERS = wraster.h
|
||||
|
||||
libwraster_la_SOURCES = \
|
||||
imgformat.h \
|
||||
@@ -94,9 +98,15 @@ wrlib.pc: Makefile
|
||||
@echo 'Libs.private: $(GFXLIBS) $(MAGICKLIBS) $(XLIBS) -lm' >> $@
|
||||
@echo 'Cflags: $(inc_search_path)' >> $@
|
||||
|
||||
wraster.h: wraster.h.in $(top_builddir)/config.h
|
||||
$(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
|
||||
--header "$(top_builddir)/config.h" \
|
||||
--filter "USE_XSHM" \
|
||||
-o $@ $<
|
||||
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
libwraster.map: $(include_HEADERS) $(top_srcdir)/script/generate-mapfile-from-header.sh
|
||||
libwraster.map: $(nodist_include_HEADERS) $(top_srcdir)/script/generate-mapfile-from-header.sh
|
||||
$(AM_V_GEN)$(top_srcdir)/script/generate-mapfile-from-header.sh \
|
||||
-n LIBWRASTER -v $(WRASTER_VERSION) $(srcdir)/$(include_HEADERS) > libwraster.map
|
||||
-n LIBWRASTER -v $(WRASTER_VERSION) $< > $@
|
||||
endif
|
||||
|
||||
@@ -46,10 +46,7 @@
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#ifdef USE_XSHM
|
||||
#include <X11/extensions/XShm.h>
|
||||
#endif
|
||||
@USE_XSHM@#include <X11/extensions/XShm.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -261,11 +258,9 @@ typedef struct RImage {
|
||||
typedef struct RXImage {
|
||||
XImage *image;
|
||||
|
||||
/* Private data. Do not access */
|
||||
#ifdef USE_XSHM
|
||||
XShmSegmentInfo info;
|
||||
char is_shared;
|
||||
#endif
|
||||
@USE_XSHM@ /* Private data. Do not access */
|
||||
@USE_XSHM@ XShmSegmentInfo info;
|
||||
@USE_XSHM@ char is_shared;
|
||||
} RXImage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user