Endianness setup in Solaris compatibility header. Add its include to CFLAGS, not just CPPFLAGS.

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@739 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Richard Newman 19 years ago
parent d8e9d1084b
commit 535e45a8b1

@ -40,8 +40,8 @@ OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
# Additions for Solaris support.
ifeq ($(OS),solaris)
GETARCH=uname -p
CPPFLAGS += -DHAVE_SYS_SOCKIO_H -DBSD_COMP -include compat/solaris.h -fPIC
CFLAGS += -DHAVE_SYS_SOCKIO_H -DBSD_COMP -fPIC
CPPFLAGS += -DHAVE_SYS_SOCKIO_H -DBSD_COMP -fPIC -include compat/solaris.h
CFLAGS += -DHAVE_SYS_SOCKIO_H -DBSD_COMP -fPIC -include compat/solaris.h
# For nanosleep.
LDFLAGS += -lrt
# For inet_aton.

@ -1,9 +1,10 @@
#ifndef __SOLARIS_H__
#define __SOLARIS_H__
#ifdef SOLARIS
/*
* New compatibility code for Solaris.
* This is conditionally included *in the Makefile.defs*, so it doesn't
* need to be conditionalized here.
*/
#ifndef timeradd
@ -65,16 +66,15 @@ typedef unsigned long long int u_int64_t;
#endif
#if defined(sun)
#include <sys/byteorder.h>
#if defined(_BIG_ENDIAN)
/* Which of these applies depends on which compiler suite is used! */
#if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN)
#define BYTE_ORDER BIG_ENDIAN
#else
#elif (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN)
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#else
#include <endian.h>
#error "No endianness found for Solaris build."
#endif
#endif /* SOLARIS */
#endif

Loading…
Cancel
Save