aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-05-06 22:27:46 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-05-06 22:27:46 +0000
commitc6901f2adcaa3d40c148c535a451c7c79f236d58 (patch)
treef77ff40ae7ce929c5fed987c9183c4dcdaac58eb
parentbdb06848ba206bd0ce268049d40a12e7b933a385 (diff)
Beginning of solaris portability
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@968 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xinclude/asterisk/frame.h22
-rwxr-xr-xmkdep2
2 files changed, 21 insertions, 3 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index e89891bb1..27ad5ca5d 100755
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -20,11 +20,29 @@
extern "C" {
#endif
+/*
+ * Autodetect system endianess
+ */
+#ifndef __BYTE_ORDER
#ifdef __linux__
#include <endian.h>
#else
-#include <machine/endian.h>
-#endif
+#ifdef __LITTLE_ENDIAN__
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif /* __LITTLE_ENDIAN */
+
+#if (defined(sun) && defined(unix) && defined(sparc))
+#define __BYTE_ORDER __BIG_ENDIAN
+#endif /* sun unix sparc */
+
+#endif /* linux */
+
+#endif /* __BYTE_ORDER */
+
+#ifndef __BYTE_ORDER
+#error Need to know endianess
+#endif /* __BYTE_ORDER */
+
#include <sys/types.h>
//! Data structure associated with a single frame of data
diff --git a/mkdep b/mkdep
index 05b3aa14b..8475cc1d1 100755
--- a/mkdep
+++ b/mkdep
@@ -1,4 +1,4 @@
-#!/bin/sh -
+#!/bin/bash -
#
# $OpenBSD: mkdep.gcc.sh,v 1.8 1998/09/02 06:40:07 deraadt Exp $
# $NetBSD: mkdep.gcc.sh,v 1.9 1994/12/23 07:34:59 jtc Exp $