commit 56001b88e5d1df05da2616bdc7d1b3118e5bc7ba
Author: Maia Kozheva <[email protected]>
Date: Sat Aug 28 15:22:48 2010 +0700
Replaced endian.h usage with glib (needed for macports, thanks to
ToHellWithGA)
configure.in | 2 --
libgtkpod/mp4file.c | 9 +++------
2 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/configure.in b/configure.in
index 06ae14d..77cdfcc 100644
--- a/configure.in
+++ b/configure.in
@@ -259,8 +259,6 @@ AC_CHECK_HEADERS([mp4v2/itmf_tags.h], [], [],
typedef void* MP4FileHandle;
])
-AC_CHECK_HEADERS([endian.h])
-
dnl Additional libs maybe needed when compiling under solaris
AC_SEARCH_LIBS(bind, ["socket" "nsl" "socket -lnsl"])
diff --git a/libgtkpod/mp4file.c b/libgtkpod/mp4file.c
index 60d2549..9bf17b6 100644
--- a/libgtkpod/mp4file.c
+++ b/libgtkpod/mp4file.c
@@ -31,10 +31,8 @@
# include <config.h>
#endif
+#include <glib.h>
#include <glib/gi18n-lib.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h> /* for be32toh () */
-#endif
#include "charset.h"
#include "itdb.h"
#include "misc.h"
@@ -42,7 +40,6 @@
#include "mp4file.h"
-
/* ------------------------------------------------------------
Info on how to implement new file formats.
@@ -534,7 +531,7 @@ static gboolean mp4_get_apple_uint8_property (MP4FileHandle
hFile, const char* p
/* pos now points to a 1-byte atom version followed by a 3-byte
class/flag field */
atom_version = *pos;
- class_flag = be32toh(*(guint32*)pos) & 0x00ffffff;
+ class_flag = GUINT32_FROM_BE(*(guint32*)pos) & 0x00ffffff;
if (class_flag == 21 || class_flag == 0)
{
pos += 4; /* Skip over the atom version and class/flag */
@@ -566,7 +563,7 @@ static gboolean mp4_get_apple_text_property (MP4FileHandle
hFile, const char* pr
pos += 8; /* Skip over the length and the atom name */
/* pos now points to a 1-byte atom version followed by a 3-byte
class/flag field */
atom_version = *pos;
- class_flag = be32toh(*(guint32*)pos) & 0x00ffffff;
+ class_flag = GUINT32_FROM_BE(*(guint32*)pos) & 0x00ffffff;
if (class_flag == 1)
{
pos += 4; /* Skip over the atom version and class/flag */
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2