1 --- id3lib-3.8.3.orig/configure.in Fri Sep 25 17:57:49 2009
2 +++ id3lib-3.8.3/configure.in Fri Sep 25 18:03:13 2009
5 AC_CHECK_HEADERS(libcw/sys.h)
6 AC_CHECK_HEADERS(cctype climits cstdio cstdlib bitset cstring)
7 -AC_CHECK_HEADERS(fstream iostream iomanip vector \
8 +AC_CHECK_HEADERS(fstream iostream vector \
9 ,,AC_MSG_ERROR([Missing a vital header file for id3lib - download them here: http://gcc.gnu.org/libstdc++/ or better - compile a newer compiler like gcc3.x])
14 ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
17 --- id3lib3.8.3-3.8.3.orig/include/id3/writers.h
18 +++ id3lib3.8.3-3.8.3/include/id3/writers.h
21 #include "id3/writer.h"
22 #include "id3/id3lib_streams.h"
23 -//#include <string.h>
26 class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
28 --- id3lib3.8.3-3.8.3.orig/include/id3/id3lib_strings.h
29 +++ id3lib3.8.3-3.8.3/include/id3/id3lib_strings.h
31 #define _ID3LIB_STRINGS_H_
36 #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
38 --- id3lib3.8.3-3.8.3.orig/src/io_helpers.cpp
39 +++ id3lib3.8.3-3.8.3/src/io_helpers.cpp
41 // Write the BOM: 0xFEFF
42 unicode_t BOM = 0xFEFF;
43 writer.writeChars((const unsigned char*) &BOM, 2);
44 + // Patch from Spoon : 2004-08-25 14:17
45 + // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
47 + //for (size_t i = 0; i < size; i += 2)
49 + // unicode_t ch = (data[i] << 8) | data[i+1];
50 + // writer.writeChars((const unsigned char*) &ch, 2);
53 + unsigned char *pdata = (unsigned char *) data.c_str();
54 for (size_t i = 0; i < size; i += 2)
56 - unicode_t ch = (data[i] << 8) | data[i+1];
57 + unicode_t ch = (pdata[i] << 8) | pdata[i+1];
58 writer.writeChars((const unsigned char*) &ch, 2);
62 return writer.getCur() - beg;
64 --- id3lib3.8.3-3.8.3.orig/src/tag_file.cpp
65 +++ id3lib3.8.3-3.8.3/src/tag_file.cpp
67 strcpy(sTempFile, filename.c_str());
68 strcat(sTempFile, sTmpSuffix.c_str());
70 -#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
71 - // This section is for Windows folk && gcc 3.x folk
72 +#if !defined(HAVE_MKSTEMP)
73 + // This section is for Windows folk
75 createFile(sTempFile, tmpOut);
78 tmpOut.write((char *)tmpBuffer, nBytes);
81 -#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
82 +#else //!defined(HAVE_MKSTEMP)
84 // else we gotta make a temp file, copy the tag into it, copy the
85 // rest of the old file after the tag, delete the old file, rename
87 //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
90 - ofstream tmpOut(fd);
91 + ofstream tmpOut(sTempFile);
97 close(fd); //closes the file
99 -#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
100 +#endif ////!defined(HAVE_MKSTEMP)
104 --- id3lib3.8.3-3.8.3.orig/examples/demo_convert.cpp
105 +++ id3lib3.8.3-3.8.3/examples/demo_convert.cpp
110 -int main( unsigned int argc, char * const argv[])
111 +int main(int argc, char * const argv[])
113 flags_t ulFlag = ID3TT_ALL;
114 gengetopt_args_info args;
115 --- id3lib3.8.3-3.8.3.orig/examples/demo_copy.cpp
116 +++ id3lib3.8.3-3.8.3/examples/demo_copy.cpp
121 -int main( unsigned int argc, char * const argv[])
122 +int main(int argc, char * const argv[])
124 int ulFlag = ID3TT_ID3;
126 --- id3lib3.8.3-3.8.3.orig/examples/demo_info.cpp
127 +++ id3lib3.8.3-3.8.3/examples/demo_info.cpp
132 -int main( unsigned int argc, char * const argv[])
133 +int main(int argc, char * const argv[])
137 --- id3lib3.8.3-3.8.3.orig/examples/demo_tag.cpp
138 +++ id3lib3.8.3-3.8.3/examples/demo_tag.cpp
143 -int main( unsigned int argc, char * const argv[])
144 +int main(int argc, char * const argv[])
146 int ulFlag = ID3TT_ID3;