shithub: aacenc

Download patch

ref: e03977d2b54016a992ff8c46f16a5891ac99ef80
parent: 09ad6d02e8976f54aaf711c7ebacb57b8d81de1a
author: menno <menno>
date: Sat Apr 5 20:42:31 EDT 2008

Fixed some conflicts for MSYS+MINGW

--- a/common/mp4v2/mp4atom.cpp
+++ b/common/mp4v2/mp4atom.cpp
@@ -29,6 +29,10 @@
 
 #include "mp4common.h"
 #include "atoms.h"
+#ifdef __MINGW32__
+/* We need isalnum() declaration */
+#include <ctype.h>
+#endif /* #ifdef __MINGW32__ */
 
 MP4AtomInfo::MP4AtomInfo(const char* name, bool mandatory, bool onlyOne) 
 {
--- a/common/mp4v2/mp4util.cpp
+++ b/common/mp4v2/mp4util.cpp
@@ -20,6 +20,10 @@
  */
 
 #include "mp4common.h"
+#ifdef __MINGW32__
+/* We need tolower() declaration */
+#include <ctype.h>
+#endif /* #ifdef __MINGW32__ */
 
 void MP4Error::Print(FILE* pFile)
 {
--- a/common/mp4v2/mpeg4ip.h
+++ b/common/mp4v2/mpeg4ip.h
@@ -71,7 +71,10 @@
 typedef __int8  int8_t;
 typedef unsigned short in_port_t;
 typedef int socklen_t;
+#ifndef __MINGW32__
+/* Let's avoid some boring conflicting declarations */
 typedef int ssize_t;
+#endif /* #ifndef __MINGW32__ */
 #define snprintf _snprintf
 #define strncasecmp _strnicmp
 #define strcasecmp _stricmp
@@ -121,13 +124,17 @@
 #define LOG_INFO 6
 #define LOG_DEBUG 7
 
-#if     !__STDC__ && _INTEGRAL_MAX_BITS >= 64
+#ifdef __MINGW32__
+#define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(fpos)
 #define VAR_TO_FPOS(fpos, var) (fpos) = (var)
+#elif     !__STDC__ && _INTEGRAL_MAX_BITS >= 64
+#define VAR_TO_FPOS(fpos, var) (fpos) = (var)
 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(_FPOSOFF(fpos))
 #else
 #define VAR_TO_FPOS(fpos, var) (fpos).lopart = ((var) & UINT_MAX); (fpos).hipart = ((var) >> 32)
 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((uint64_t)((fpos).hipart ) << 32 | (fpos).lopart)
-#endif
+#endif /* #ifdef __MINGW32__ */
+
 
 #define __STRING(expr) #expr
 
--- a/frontend/input.h
+++ b/frontend/input.h
@@ -16,7 +16,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: input.h,v 1.5 2003/08/17 19:38:15 menno Exp $
+ * $Id: input.h,v 1.6 2008/04/06 00:42:31 menno Exp $
  */
 
 #ifndef _INPUT_H
@@ -31,6 +31,8 @@
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
+#ifndef __MPEG4IP_INCLUDED__
+/* Let's avoid some boring conflicting declarations */
 #ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
@@ -50,6 +52,7 @@
 #ifndef HAVE_U_INT16_T
 typedef unsigned short u_int16_t;
 #endif
+#endif /* #ifndef __MPEG4IP_INCLUDED__ */
 
 #ifdef __cplusplus
 extern "C"