Commit 9a503e38 authored by aymeric's avatar aymeric
Browse files

check if macros is already defined

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@797 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 57ed9f67
No related merge requests found
Showing with 6 additions and 0 deletions
...@@ -27,17 +27,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -27,17 +27,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef waveheader_h #ifndef waveheader_h
#define waveheader_h #define waveheader_h
#ifdef swap16
#else
/* all integer in wav header must be read in least endian order */ /* all integer in wav header must be read in least endian order */
static inline uint16_t swap16(uint16_t a) static inline uint16_t swap16(uint16_t a)
{ {
return ((a & 0xFF) << 8) | ((a & 0xFF00) >> 8); return ((a & 0xFF) << 8) | ((a & 0xFF00) >> 8);
} }
#endif
#ifdef swap32
#else
static inline uint32_t swap32(uint32_t a) static inline uint32_t swap32(uint32_t a)
{ {
return ((a & 0xFF) << 24) | ((a & 0xFF00) << 8) | return ((a & 0xFF) << 24) | ((a & 0xFF00) << 8) |
((a & 0xFF0000) >> 8) | ((a & 0xFF000000) >> 24); ((a & 0xFF0000) >> 8) | ((a & 0xFF000000) >> 24);
} }
#endif
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
#define le_uint32(a) (swap32((a))) #define le_uint32(a) (swap32((a)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment