summaryrefslogtreecommitdiff
path: root/community/id3lib-rcc/id3lib-gcc4.patch
blob: 7f4ef666a5c707a70ef0dbc92a14a3032cecd62f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
diff -wbBur id3lib-3.8.3/configure.in id3lib-3.8.3.my/configure.in
--- id3lib-3.8.3/configure.in	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/configure.in	2009-09-08 15:09:40.000000000 +0000
@@ -227,7 +227,6 @@
 )
 AC_CHECK_HEADERS(               \
   string                        \
-  iomanip.h                     \
   ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
 )
 
@@ -296,11 +295,11 @@
 AC_DEFINE_UNQUOTED(_ID3LIB_BINARY_AGE,            $ID3LIB_BINARY_AGE)
 AC_DEFINE_UNQUOTED(_ID3_COMPILED_WITH_DEBUGGING, "${enable_debug}")
 
-CONDITIONAL_SUBDIRS=
-if test "x$ac_cv_lib_z_uncompress" = "xno"; then
-  CONDITIONAL_SUBDIRS="$CONDITIONAL_SUBDIRS zlib"
-fi
-AC_CONFIG_SUBDIRS(zlib)
+#CONDITIONAL_SUBDIRS=
+#if test "x$ac_cv_lib_z_uncompress" = "xno"; then
+#  CONDITIONAL_SUBDIRS="$CONDITIONAL_SUBDIRS zlib"
+#fi
+#AC_CONFIG_SUBDIRS(zlib)
 
 CFLAGS="$CFLAGS -Wall"
 
diff -wbBur id3lib-3.8.3/doc/Doxyfile.in id3lib-3.8.3.my/doc/Doxyfile.in
--- id3lib-3.8.3/doc/Doxyfile.in	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/doc/Doxyfile.in	2009-09-08 15:10:40.000000000 +0000
@@ -263,8 +263,10 @@
 
 INPUT                  = ../src \
                          ../include/id3/field.h \
-                         ../include/id3/frame.h \
                          ../include/id3/globals.h \
+			 ../include/id3/io_decorators.h \
+			 ../include/id3/io_helpers.h \
+			 ../include/id3/io_strings.h \
                          ../include/id3/misc_support.h \
                          ../include/id3/reader.h \
                          ../include/id3/readers.h \
diff -wbBur id3lib-3.8.3/examples/demo_convert.cpp id3lib-3.8.3.my/examples/demo_convert.cpp
--- id3lib-3.8.3/examples/demo_convert.cpp	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/examples/demo_convert.cpp	2009-09-08 15:09:26.000000000 +0000
@@ -84,7 +84,7 @@
   }
 }
 
-int main( unsigned int argc, char * const argv[])
+int main( int argc, char * const argv[])
 {
   flags_t ulFlag = ID3TT_ALL;
   gengetopt_args_info args;
diff -wbBur id3lib-3.8.3/examples/demo_copy.cpp id3lib-3.8.3.my/examples/demo_copy.cpp
--- id3lib-3.8.3/examples/demo_copy.cpp	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/examples/demo_copy.cpp	2009-09-08 15:09:26.000000000 +0000
@@ -81,7 +81,7 @@
   }
 }
 
-int main( unsigned int argc, char * const argv[])
+int main( int argc, char * const argv[])
 {
   int ulFlag = ID3TT_ID3;
   ID3D_INIT_DOUT();
diff -wbBur id3lib-3.8.3/examples/demo_info.cpp id3lib-3.8.3.my/examples/demo_info.cpp
--- id3lib-3.8.3/examples/demo_info.cpp	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/examples/demo_info.cpp	2009-09-08 15:09:26.000000000 +0000
@@ -309,7 +309,7 @@
 
 #define DEBUG
 
-int main( unsigned int argc, char * const argv[])
+int main( int argc, char * const argv[])
 {
   ID3D_INIT_DOUT();
 
diff -wbBur id3lib-3.8.3/examples/demo_tag.cpp id3lib-3.8.3.my/examples/demo_tag.cpp
--- id3lib-3.8.3/examples/demo_tag.cpp	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/examples/demo_tag.cpp	2009-09-08 15:09:26.000000000 +0000
@@ -46,7 +46,7 @@
     os << "v2";
 }
 
-int main( unsigned int argc, char * const argv[])
+int main( int argc, char * const argv[])
 {
   int ulFlag = ID3TT_ID3;
   ID3D_INIT_DOUT();
diff -wbBur id3lib-3.8.3/include/id3/id3lib_strings.h id3lib-3.8.3.my/include/id3/id3lib_strings.h
--- id3lib-3.8.3/include/id3/id3lib_strings.h	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/include/id3/id3lib_strings.h	2009-09-08 15:09:26.000000000 +0000
@@ -30,6 +30,7 @@
 #define _ID3LIB_STRINGS_H_
 
 #include <string>
+#include <cstring>
 
 #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
 namespace std
diff -wbBur id3lib-3.8.3/include/id3/writers.h id3lib-3.8.3.my/include/id3/writers.h
--- id3lib-3.8.3/include/id3/writers.h	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/include/id3/writers.h	2009-09-08 15:09:26.000000000 +0000
@@ -30,7 +30,7 @@
 
 #include "id3/writer.h"
 #include "id3/id3lib_streams.h"
-//#include <string.h>
+#include <string.h>
 
 class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
 {
diff -wbBur id3lib-3.8.3/src/Makefile.am id3lib-3.8.3.my/src/Makefile.am
--- id3lib-3.8.3/src/Makefile.am	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/src/Makefile.am	2009-09-08 15:09:49.000000000 +0000
@@ -76,6 +76,8 @@
 LDADD        = $(top_builddir)/zlib/src/libz.la
 endif
 
+libid3_la_LIBADD = -lz -lstdc++
+
 libid3_la_LDFLAGS = \
   -version-info $(LT_VERSION) \
   -release $(LT_RELEASE) \
diff -wbBur id3lib-3.8.3/src/Makefile.in id3lib-3.8.3.my/src/Makefile.in
--- id3lib-3.8.3/src/Makefile.in	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/src/Makefile.in	2009-09-08 15:09:49.000000000 +0000
@@ -192,7 +192,8 @@
 CONFIG_CLEAN_FILES =
 LTLIBRARIES = $(lib_LTLIBRARIES)
 
-libid3_la_LIBADD =
+libid3_la_LIBADD = -lz -lstdc++
+
 am__objects_1 = c_wrapper.lo field.lo field_binary.lo field_integer.lo \
 	field_string_ascii.lo field_string_unicode.lo frame.lo \
 	frame_impl.lo frame_parse.lo frame_render.lo globals.lo \
diff -wbBur id3lib-3.8.3/src/tag_file.cpp id3lib-3.8.3.my/src/tag_file.cpp
--- id3lib-3.8.3/src/tag_file.cpp	2008-10-27 18:24:52.000000000 +0000
+++ id3lib-3.8.3.my/src/tag_file.cpp	2009-09-08 15:10:22.000000000 +0000
@@ -242,8 +242,8 @@
     strcpy(sTempFile, filename.c_str());
     strcat(sTempFile, sTmpSuffix.c_str());
 
-#if ((defined(__GNUC__) && __GNUC__ >= 3  ) || !defined(HAVE_MKSTEMP))
-    // This section is for Windows folk && gcc 3.x folk
+#if !defined(HAVE_MKSTEMP)
+    // This section is for Windows folk
     fstream tmpOut;
     createFile(sTempFile, tmpOut);
 
@@ -257,7 +257,7 @@
       tmpOut.write((char *)tmpBuffer, nBytes);
     }
 
-#else //((defined(__GNUC__) && __GNUC__ >= 3  ) || !defined(HAVE_MKSTEMP))
+#else //!defined(HAVE_MKSTEMP)
 
     // else we gotta make a temp file, copy the tag into it, copy the
     // rest of the old file after the tag, delete the old file, rename
@@ -270,7 +270,7 @@
       //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
     }
 
-    ofstream tmpOut(fd);
+    ofstream tmpOut(sTempFile);
     if (!tmpOut)
     {
       tmpOut.close();
@@ -285,14 +285,14 @@
     uchar tmpBuffer[BUFSIZ];
     while (file)
     {
-      file.read(tmpBuffer, BUFSIZ);
+      file.read((char *)tmpBuffer, BUFSIZ);
       size_t nBytes = file.gcount();
-      tmpOut.write(tmpBuffer, nBytes);
+      tmpOut.write((char *)tmpBuffer, nBytes);
     }
 
     close(fd); //closes the file
 
-#endif ////((defined(__GNUC__) && __GNUC__ >= 3  ) || !defined(HAVE_MKSTEMP))
+#endif ////!defined(HAVE_MKSTEMP)
 
     tmpOut.close();
     file.close();