Index: asterisk/aesopt.h =================================================================== RCS file: /usr/cvsroot/asterisk/aesopt.h,v retrieving revision 1.7 diff -u -r1.7 aesopt.h --- asterisk/aesopt.h 31 Aug 2004 13:32:11 -0000 1.7 +++ asterisk/aesopt.h 16 Jun 2005 03:23:35 -0000 @@ -136,6 +136,7 @@ #define _AESOPT_H #include +#include "asterisk/endian.h" /* CONFIGURATION - USE OF DEFINES @@ -146,24 +147,6 @@ #if clauses. */ -/* PLATFORM SPECIFIC INCLUDES */ - -#if defined( __OpenBSD__ ) -# include -# include -#elif defined( __FreeBSD__ ) || defined( __NetBSD__ ) -# include -# include -#elif defined( BSD ) && ( BSD >= 199103 ) || defined(__APPLE__) -# include -#elif defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) -# include -#if !defined(__APPLE__) -# include -#endif -#elif defined( linux ) -# include -#endif /* BYTE ORDER IN 32-BIT WORDS Index: asterisk/dns.c =================================================================== RCS file: /usr/cvsroot/asterisk/dns.c,v retrieving revision 1.10 diff -u -r1.10 dns.c --- asterisk/dns.c 22 Jun 2004 20:11:15 -0000 1.10 +++ asterisk/dns.c 16 Jun 2005 03:23:35 -0000 @@ -19,6 +19,7 @@ #include #include #include +#include "asterisk/endian.h" #define MAX_SIZE 4096 Index: asterisk/md5.c =================================================================== RCS file: /usr/cvsroot/asterisk/md5.c,v retrieving revision 1.8 diff -u -r1.8 md5.c --- asterisk/md5.c 31 Aug 2004 13:32:11 -0000 1.8 +++ asterisk/md5.c 16 Jun 2005 03:23:35 -0000 @@ -1,16 +1,6 @@ /* MD5 checksum routines used for authentication. Not covered by GPL, but in the public domain as per the copyright below */ -#if defined( __OpenBSD__ ) -# include -# include -#elif defined( __FreeBSD__ ) || defined( __NetBSD__ ) -# include -# include -#elif defined( BSD ) && ( BSD >= 199103 ) || defined(__APPLE__) -# include -#else -# include -#endif +#include "asterisk/endian.h" # if __BYTE_ORDER == __BIG_ENDIAN || BYTE_ORDER == BIG_ENDIAN # define HIGHFIRST 1 # endif Index: asterisk/channels/chan_alsa.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_alsa.c,v retrieving revision 1.27.2.3 diff -u -r1.27.2.3 chan_alsa.c --- asterisk/channels/chan_alsa.c 15 Apr 2005 07:59:59 -0000 1.27.2.3 +++ asterisk/channels/chan_alsa.c 16 Jun 2005 03:23:37 -0000 @@ -27,7 +27,7 @@ #include #include #include -#include +#include "asterisk/endian.h" #define ALSA_PCM_NEW_HW_PARAMS_API #define ALSA_PCM_NEW_SW_PARAMS_API @@ -60,7 +60,6 @@ /* Don't switch between read/write modes faster than every 300 ms */ #define MIN_SWITCH_TIME 600 -#if __BYTE_ORDER == __LITTLE_ENDIAN static snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE; #else static snd_pcm_format_t format = SND_PCM_FORMAT_S16_BE; Index: asterisk/channels/chan_oss.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v retrieving revision 1.33.2.2 diff -u -r1.33.2.2 chan_oss.c --- asterisk/channels/chan_oss.c 2 Apr 2005 07:59:45 -0000 1.33.2.2 +++ asterisk/channels/chan_oss.c 16 Jun 2005 03:23:38 -0000 @@ -35,22 +35,7 @@ #include #include -#if defined( __OpenBSD__ ) -# include -#elif defined( __FreeBSD__ ) || defined( __NetBSD__ ) -# include -#elif defined( BSD ) && ( BSD >= 199103 ) || defined(__APPLE__) -# include -#elif defined ( SOLARIS ) -# include -#elif defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) -# include -#if !defined(__APPLE__) -# include -#endif -#elif defined( linux ) -# include -#endif +#include "asterisk/endian.h" #ifdef __linux #include Index: asterisk/formats/format_g726.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_g726.c,v retrieving revision 1.4 diff -u -r1.4 format_g726.c --- asterisk/formats/format_g726.c 22 Jun 2004 18:49:00 -0000 1.4 +++ asterisk/formats/format_g726.c 16 Jun 2005 03:23:39 -0000 @@ -24,11 +24,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" #define RATE_40 0 #define RATE_32 1 Index: asterisk/formats/format_g729.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_g729.c,v retrieving revision 1.12.2.1 diff -u -r1.12.2.1 format_g729.c --- asterisk/formats/format_g729.c 7 Feb 2005 04:29:19 -0000 1.12.2.1 +++ asterisk/formats/format_g729.c 16 Jun 2005 03:23:39 -0000 @@ -25,11 +25,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" /* Some Ideas for this code came from makeg729e.c by Jeffrey Chilton */ Index: asterisk/formats/format_gsm.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_gsm.c,v retrieving revision 1.17 diff -u -r1.17 format_gsm.c --- asterisk/formats/format_gsm.c 22 Jun 2004 18:49:00 -0000 1.17 +++ asterisk/formats/format_gsm.c 16 Jun 2005 03:23:39 -0000 @@ -25,11 +25,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" #include "msgsm.h" /* Some Ideas for this code came from makegsme.c by Jeffrey Chilton */ Index: asterisk/formats/format_h263.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_h263.c,v retrieving revision 1.6 diff -u -r1.6 format_h263.c --- asterisk/formats/format_h263.c 22 Jun 2004 18:49:00 -0000 1.6 +++ asterisk/formats/format_h263.c 16 Jun 2005 03:23:39 -0000 @@ -25,11 +25,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" /* Some Ideas for this code came from makeh263e.c by Jeffrey Chilton */ Index: asterisk/formats/format_ilbc.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_ilbc.c,v retrieving revision 1.5 diff -u -r1.5 format_ilbc.c --- asterisk/formats/format_ilbc.c 22 Jun 2004 18:49:00 -0000 1.5 +++ asterisk/formats/format_ilbc.c 16 Jun 2005 03:23:40 -0000 @@ -27,11 +27,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" /* Some Ideas for this code came from makeg729e.c by Jeffrey Chilton */ Index: asterisk/formats/format_jpeg.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_jpeg.c,v retrieving revision 1.6 diff -u -r1.6 format_jpeg.c --- asterisk/formats/format_jpeg.c 22 Jun 2004 18:49:00 -0000 1.6 +++ asterisk/formats/format_jpeg.c 16 Jun 2005 03:23:40 -0000 @@ -27,11 +27,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" static char *desc = "JPEG (Joint Picture Experts Group) Image Format"; Index: asterisk/formats/format_pcm.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_pcm.c,v retrieving revision 1.14 diff -u -r1.14 format_pcm.c --- asterisk/formats/format_pcm.c 25 Aug 2004 18:30:51 -0000 1.14 +++ asterisk/formats/format_pcm.c 16 Jun 2005 03:23:40 -0000 @@ -25,11 +25,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" #define BUF_SIZE 160 /* 160 samples */ Index: asterisk/formats/format_pcm_alaw.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_pcm_alaw.c,v retrieving revision 1.12 diff -u -r1.12 format_pcm_alaw.c --- asterisk/formats/format_pcm_alaw.c 22 Jun 2004 18:49:00 -0000 1.12 +++ asterisk/formats/format_pcm_alaw.c 16 Jun 2005 03:23:40 -0000 @@ -27,11 +27,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" #define BUF_SIZE 160 /* 160 samples */ Index: asterisk/formats/format_sln.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_sln.c,v retrieving revision 1.1.2.1 diff -u -r1.1.2.1 format_sln.c --- asterisk/formats/format_sln.c 14 Jun 2005 20:49:33 -0000 1.1.2.1 +++ asterisk/formats/format_sln.c 16 Jun 2005 03:23:40 -0000 @@ -23,11 +23,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" #define BUF_SIZE 320 /* 320 samples */ Index: asterisk/formats/format_vox.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_vox.c,v retrieving revision 1.16 diff -u -r1.16 format_vox.c --- asterisk/formats/format_vox.c 22 Jun 2004 18:49:00 -0000 1.16 +++ asterisk/formats/format_vox.c 16 Jun 2005 03:23:40 -0000 @@ -25,11 +25,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" #define BUF_SIZE 80 /* 160 samples */ Index: asterisk/formats/format_wav.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_wav.c,v retrieving revision 1.18 diff -u -r1.18 format_wav.c --- asterisk/formats/format_wav.c 22 Jun 2004 18:49:00 -0000 1.18 +++ asterisk/formats/format_wav.c 16 Jun 2005 03:23:41 -0000 @@ -25,11 +25,8 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" + /* Some Ideas for this code came from makewave.c by Jeffrey Chilton */ Index: asterisk/formats/format_wav_gsm.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_wav_gsm.c,v retrieving revision 1.23.2.2 diff -u -r1.23.2.2 format_wav_gsm.c --- asterisk/formats/format_wav_gsm.c 1 Apr 2005 03:23:33 -0000 1.23.2.2 +++ asterisk/formats/format_wav_gsm.c 16 Jun 2005 03:23:41 -0000 @@ -25,11 +25,7 @@ #include #include #include -#ifdef __linux__ -#include -#else -#include -#endif +#include "asterisk/endian.h" #include "msgsm.h" /* Some Ideas for this code came from makewave.c by Jeffrey Chilton */ Index: asterisk/include/asterisk/frame.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/frame.h,v retrieving revision 1.35.2.3 diff -u -r1.35.2.3 frame.h --- asterisk/include/asterisk/frame.h 5 Apr 2005 17:08:05 -0000 1.35.2.3 +++ asterisk/include/asterisk/frame.h 16 Jun 2005 03:23:42 -0000 @@ -23,40 +23,7 @@ #include #include -/* - * Autodetect system endianess - */ -#ifndef __BYTE_ORDER -#ifdef __linux__ -#include -#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) -#if defined(__OpenBSD__) -#include -#endif /* __OpenBSD__ */ -#include -#define __BYTE_ORDER BYTE_ORDER -#define __LITTLE_ENDIAN LITTLE_ENDIAN -#define __BIG_ENDIAN BIG_ENDIAN -#else -#ifdef __LITTLE_ENDIAN__ -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif /* __LITTLE_ENDIAN */ - -#if defined(i386) || defined(__i386__) -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif /* defined i386 */ - -#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 "asterisk/endian.h" struct ast_codec_pref { char order[32];