1 --- id3lib3.8.3-3.8.3.orig/src/tag_file.cpp
2 +++ id3lib3.8.3-3.8.3/src/tag_file.cpp
3 @@ -242,8 +242,8 @@
4 strcpy(sTempFile, filename.c_str());
5 strcat(sTempFile, sTmpSuffix.c_str());
6
7 -#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
8 - // This section is for Windows folk && gcc 3.x folk
9 +#if !defined(HAVE_MKSTEMP)
10 + // This section is for Windows folk
11 fstream tmpOut;
12 createFile(sTempFile, tmpOut);
13
14 @@ -257,7 +257,7 @@
15 tmpOut.write((char *)tmpBuffer, nBytes);
16 }
17
18 -#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
19 +#else //!defined(HAVE_MKSTEMP)
20
21 // else we gotta make a temp file, copy the tag into it, copy the
22 // rest of the old file after the tag, delete the old file, rename
23 @@ -270,7 +270,7 @@
24 //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
25 }
26
27 - ofstream tmpOut(fd);
28 + ofstream tmpOut(sTempFile);
29 if (!tmpOut)
30 {
31 tmpOut.close();
32 @@ -285,14 +285,14 @@
33 uchar tmpBuffer[BUFSIZ];
34 while (file)
35 {
36 - file.read(tmpBuffer, BUFSIZ);
37 + file.read((char *)tmpBuffer, BUFSIZ);
38 size_t nBytes = file.gcount();
39 - tmpOut.write(tmpBuffer, nBytes);
40 + tmpOut.write((char *)tmpBuffer, nBytes);
41 }
42
43 close(fd); //closes the file
44
45 -#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
46 +#endif ////!defined(HAVE_MKSTEMP)
47
48 tmpOut.close();
49 file.close();
50 only in patch2:
51 unchanged:
|