par2cmdline-0.4-gcc4.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. Fix compilation with gcc-4.
  2. Patch by Dirk-Jan Heijs.
  3. http://bugs.gentoo.org/102391
  4. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287904
  5. --- par2cmdline-0.4/reedsolomon.cpp
  6. +++ par2cmdline-0.4/reedsolomon.cpp
  7. @@ -51,7 +51,7 @@
  8. }
  9. }
  10. -bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
  11. +template <> bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
  12. {
  13. inputcount = (u32)present.size();
  14. @@ -80,7 +80,7 @@
  15. return true;
  16. }
  17. -bool ReedSolomon<Galois8>::SetInput(u32 count)
  18. +template <> bool ReedSolomon<Galois8>::SetInput(u32 count)
  19. {
  20. inputcount = count;
  21. @@ -101,7 +101,7 @@
  22. return true;
  23. }
  24. -bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
  25. +template <> bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
  26. {
  27. // Look up the appropriate element in the RS matrix
  28. Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex];
  29. @@ -189,7 +189,7 @@
  30. // Set which of the source files are present and which are missing
  31. // and compute the base values to use for the vandermonde matrix.
  32. -bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
  33. +template <> bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
  34. {
  35. inputcount = (u32)present.size();
  36. @@ -233,7 +233,7 @@
  37. // Record that the specified number of source files are all present
  38. // and compute the base values to use for the vandermonde matrix.
  39. -bool ReedSolomon<Galois16>::SetInput(u32 count)
  40. +template <> bool ReedSolomon<Galois16>::SetInput(u32 count)
  41. {
  42. inputcount = count;
  43. @@ -267,7 +267,7 @@
  44. return true;
  45. }
  46. -bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
  47. +template <> bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
  48. {
  49. // Look up the appropriate element in the RS matrix