Unrar fails to build with gcc3.0.4 giving the following error (only the first 20 lines shown, there was almost 8000 lines of errors): --- c++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUNRAR -w -O2 -o unrar rar.cpp strlist.cpp strfn.cpp pathfn.cpp int64.cpp savepos.cpp global.cpp file.cpp filefn.cpp filcreat.cpp archive.cpp arcread.cpp unicode.cpp system.cpp isnt.cpp crypt.cpp crc.cpp rawread.cpp encname.cpp resource.cpp match.cpp timefn.cpp rdwrfn.cpp consio.cpp options.cpp ulinks.cpp errhnd.cpp rarvm.cpp rijndael.cpp getbits.cpp sha1.cpp extinfo.cpp extract.cpp volume.cpp list.cpp find.cpp unpack.cpp cmddata.cpp filestr.cpp recvol.cpp rs.cpp scantree.cpp In file included from rar.hpp:13, from rar.cpp:1: rartypes.hpp:14: syntax error before `;' token In file included from rar.hpp:17, from rar.cpp:1: unicode.hpp:16: parse error before `*' token unicode.hpp:17: type specifier omitted for parameter unicode.hpp:17: parse error before `*' token unicode.hpp:18: parse error before `*' token unicode.hpp:19: syntax error before `*' token unicode.hpp:20: parse error before `*' token unicode.hpp:21: parse error before `*' token unicode.hpp:22: syntax error before `*' token unicode.hpp:23: syntax error before `*' token unicode.hpp:24: syntax error before `*' token unicode.hpp:25: syntax error before `*' token --- On line 14 of rartypes.hpp: typedef __wchar_t wchar; It assumes that gcc uses __wchat_t. Changing it to: typedef wchar_t wchar; Fixes the problem and it seems to build and execute correctly. It's likely a gcc3 specific thing, and I guess it'll build correctly unmodified with the 2.95 series though.
Created attachment 1279 [details] fixed rartypes.hpp for emerging unrar under gcc3.0.4 An updated, updated unrar-3.00-rartypes.hpp (the one that 'fixed' the problem I'm experiencing using gcc3.0.4, in gcc3.1), to also fix the problem in gcc3.0.4. Tested and seems to work under gcc3.0.4, I don't see any problem with it breaking either gcc2.95.x or gcc3.1.
Okay, looks like PreZ beat you two it by only hours :) Thanks for taking the time to construct a patch though! Matt