Chris BeHanna - 2004-03-15

Logged In: YES
user_id=89364

In general, the private definitions of many standard datatypes that this project
uses are going to cause more and more problems as STL changes underneath
it. Here's a minimally-invasive patch that solves the particular problem
mentioned in this bug (compiles cleanly on FreeBSD 4.9, but the resulting
executable has not been tested):

--- include/id3/reader.h.orig Sat Mar 1 19:23:00 2003
+++ include/id3/reader.h Mon Mar 15 01:37:19 2004
@@ -28,6 +28,10 @@
#ifndef _ID3LIB_READER_H_
#define _ID3LIB_READER_H_

+#if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__
>= 4)
+#include <string> // for std::streampos and pos_type
+#endif
+
#include "id3/globals.h" //has <stdlib.h> "id3/sized_types.h"

class ID3_CPP_EXPORT ID3_Reader
@@ -35,7 +39,11 @@
public:
typedef uint32 size_type;
typedef uint8 char_type;
+#if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__
>= 4)
+ /* pos_type is a typedef of std::streampos in g++ 3.4 */
+#else
typedef uint32 pos_type;
+#endif
typedef int32 off_type;
typedef int16 int_type;
static const int_type END_OF_READER;