From b0cc0c874710c5db0832111c9e39a0319d95fe90 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 26 Oct 2019 16:05:48 -0600 Subject: [PATCH] DtHelp: make it build Use configure's endian checks to determine whether to set LSB in il/. Add locale.h check, include to Helpos.c Both via including autotools_config.h. --- cde/lib/DtHelp/Helpos.c | 7 ++++++- cde/lib/DtHelp/Makefile.am | 3 ++- cde/lib/DtHelp/il/Makefile.am | 15 ++------------- cde/lib/DtHelp/il/ilint.h | 6 ++++++ 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/cde/lib/DtHelp/Helpos.c b/cde/lib/DtHelp/Helpos.c index fd4285a2..3787c33d 100644 --- a/cde/lib/DtHelp/Helpos.c +++ b/cde/lib/DtHelp/Helpos.c @@ -42,11 +42,16 @@ **************************************************************************** ************************************<+>*************************************/ - #include #include #include #include + +#include +#if defined(HAVE_LOCALE_H) +#include +#endif + #define X_INCLUDE_PWD_H #define XOS_USE_XT_LOCKING #include diff --git a/cde/lib/DtHelp/Makefile.am b/cde/lib/DtHelp/Makefile.am index ebcc3263..bb36499a 100644 --- a/cde/lib/DtHelp/Makefile.am +++ b/cde/lib/DtHelp/Makefile.am @@ -6,7 +6,8 @@ lib_LTLIBRARIES = libDtHelp.la libDtHelp_la_CFLAGS = -I./il -I./jpeg -I../DtSvc/DtUtil2 -DDTLIB \ -DCDE_INSTALLATION_TOP='"${prefix}"' \ - -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' + -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' \ + @DT_INCDIR@ @DTI_INCDIR@ libDtHelp_la_LIBADD = -ljpeg il/libil.la diff --git a/cde/lib/DtHelp/il/Makefile.am b/cde/lib/DtHelp/il/Makefile.am index c3e2326d..d26e90f4 100644 --- a/cde/lib/DtHelp/il/Makefile.am +++ b/cde/lib/DtHelp/il/Makefile.am @@ -3,19 +3,8 @@ MAINTAINERCLEANFILES = Makefile.in noinst_LTLIBRARIES = libil.la libil_la_CFLAGS = -I.. -DDTLIB -DCDE_INSTALLATION_TOP='"${prefix}"' \ - -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' - -if BSD -libil_la_CFLAGS += -DLSB_BIT_ORDER -else - if LINUX - libil_la_CFLAGS += -DLSB_BIT_ORDER - else - if SUN - libil_la_CFLAGS += -DLSB_BIT_ORDER - endif - endif -endif + -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' \ + @DT_INCDIR@ @DTI_INCDIR@ libil_la_SOURCES = ilX.c ilbigray.c ilcodec.c \ ilcontext.c ilconvert.c ilcrop.c \ diff --git a/cde/lib/DtHelp/il/ilint.h b/cde/lib/DtHelp/il/ilint.h index 68c8f39b..f7fdf1de 100644 --- a/cde/lib/DtHelp/il/ilint.h +++ b/cde/lib/DtHelp/il/ilint.h @@ -43,6 +43,12 @@ /* General internal definitions for Image Library (IL). */ +/* use autotools detection to determine endianess */ +#include +#ifndef WORDS_BIGENDIAN +# define LSB_BIT_ORDER +#endif + #include /* for size_t declaration */ #ifndef IL_H #include "il.h" -- 2.25.1