mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
DtSearch/raima: use autodetected byte endianness rather than forcing based on OS
This commit is contained in:
parent
c479fe7b9e
commit
75ea7be520
3 changed files with 7 additions and 6 deletions
|
@ -5,20 +5,20 @@ noinst_LTLIBRARIES = libraima.la
|
|||
libraima_la_LIBADD = -lc -lm
|
||||
|
||||
libraima_la_CFLAGS = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
|
||||
@DT_INCDIR@ \
|
||||
@DT_INCDIR@ -I$(top_srcdir)/include \
|
||||
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
||||
-DNO_TRANS -DUNIX -D_POSIX_SOURCE -DMULTIBYTE
|
||||
|
||||
if LINUX
|
||||
libraima_la_CFLAGS += -DBYTE_SWAP -D_XOPEN_SOURCE=700
|
||||
libraima_la_CFLAGS += -D_XOPEN_SOURCE=700
|
||||
endif
|
||||
|
||||
if BSD
|
||||
libraima_la_CFLAGS += -DBYTE_SWAP -D_XOPEN_SOURCE=700
|
||||
libraima_la_CFLAGS += -D_XOPEN_SOURCE=700
|
||||
endif
|
||||
|
||||
if SOLARIS
|
||||
libraima_la_CFLAGS += -DBYTE_SWAP -D_XOPEN_SOURCE=500 -DNO_REGCOMP
|
||||
libraima_la_CFLAGS += -D_XOPEN_SOURCE=500 -DNO_REGCOMP
|
||||
endif
|
||||
|
||||
if HPUX
|
||||
|
|
|
@ -85,7 +85,7 @@ int debugging_key_swabs = FALSE;
|
|||
*/
|
||||
void swab_page (char *pgbuf, FILE_ENTRY *file_ptr, SWABDIR direction)
|
||||
{
|
||||
#ifndef BYTE_SWAP
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
return;
|
||||
#else
|
||||
INT slotno;
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <autotools_config.h>
|
||||
|
||||
/* Record number for OR_MISCREC DtSearch record */
|
||||
#define MISCREC_RECNO 3
|
||||
|
@ -80,7 +81,7 @@ typedef enum {HTON=1, NTOH} SWABDIR;
|
|||
|
||||
extern void swab_page (char *pgbuf, FILE_ENTRY *file_ptr, SWABDIR direction);
|
||||
|
||||
#ifdef BYTE_SWAP /* ie (BYTE_ORDER != BIG_ENDIAN) */
|
||||
#if !defined(WORDS_BIGENDIAN) /* ie (BYTE_ORDER != BIG_ENDIAN) */
|
||||
|
||||
#define HTONL(x) x = htonl(x)
|
||||
#define HTONS(x) x = htons(x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue