2
terminatorX - realtime audio scratching software
3
Copyright (C) 1999-2011 Alexander König
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
Description: header to tX_endian.c
23
27 apr 1999: include config.h to automatically recognize
24
big endian machines via configure.
26
7 mar 2000: moved from endian.{cc,h} to tX_endian.{cc,h} as
27
the glibc includes used my endian.h when they should
28
include <bits/endian.h>
36
# ifdef WORDS_BIGENDIAN
37
# define BIG_ENDIAN_MACHINE 1
39
# undef BIG_ENDIAN_MACHINE
43
#ifdef WORDS_BIGENDIAN
45
# include "tX_types.h"
47
#define __USE_XOPEN // we need this for swab()
51
#define swapbuffer(b, s) swab((void *) b, (void *) b, (ssize_t) s<<1)
53
static inline void swap32_inline(int32_t *val) {
55
int8_t *p=(int8_t *) val;
68
# endif /* __cplusplus */
70
extern void swap16(int16_t * val);
71
extern void swap32(int32_t * val);
75
# endif /* __cplusplus */
77
#endif /* WORDS_BIGENDIAN */
79
#endif /* _H_TX_ENDIAN_ */