$NetBSD: patch-aj,v 1.4 2007/09/04 09:58:20 drochner Exp $ --- src/tag_file.cpp.orig 2003-03-02 01:23:00.000000000 +0100 +++ src/tag_file.cpp @@ -242,8 +242,8 @@ size_t RenderV2ToFile(const ID3_TagImpl& 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 @@ size_t RenderV2ToFile(const ID3_TagImpl& 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 @@ size_t RenderV2ToFile(const ID3_TagImpl& //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file"); } - ofstream tmpOut(fd); + ofstream tmpOut(sTempFile); if (!tmpOut) { tmpOut.close(); @@ -282,7 +282,7 @@ size_t RenderV2ToFile(const ID3_TagImpl& tmpOut.write(tagData, tagSize); file.seekg(tag.GetPrependedBytes(), ios::beg); - uchar tmpBuffer[BUFSIZ]; + char tmpBuffer[BUFSIZ]; while (file) { file.read(tmpBuffer, BUFSIZ); @@ -292,7 +292,7 @@ size_t RenderV2ToFile(const ID3_TagImpl& close(fd); //closes the file -#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) +#endif ////!defined(HAVE_MKSTEMP) tmpOut.close(); file.close();