Date: Tue, 20 Mar 2007 16:59:05 GMT From: Jonathan Stewart<jonathan@kc8onw.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/110590: archivers/par2cmdline gcc4 patches Message-ID: <200703201659.l2KGx5tr078868@www.freebsd.org> Resent-Message-ID: <200703201710.l2KHA6PY023110@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 110590 >Category: ports >Synopsis: archivers/par2cmdline gcc4 patches >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Mar 20 17:10:05 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Jonathan Stewart >Release: 6-Stable >Organization: >Environment: N/A >Description: Email to maintainer (me)... "As you may know, in the near future FreeBSD 7.x will be switching from the gcc 3.4 compiler to gcc 4.x. Unfortunately your port fails to build with the new compiler; see the log below." >How-To-Repeat: Build the port with gcc4+ >Fix: The diff below as well as the attached patch file cleans up the warnings and fixes gcc4 compile errors. --- Makefile.old Sun Jan 28 13:54:37 2007 +++ Makefile Tue Mar 20 12:51:07 2007 @@ -25,6 +25,8 @@ post-patch: @${REINPLACE_CMD} -e 's| -lstdc++||g' ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e 's|#define PACKED __attribute__ ((packed))|#define PACKED|' ${WRKSRC}/par1fileformat.h + @${REINPLACE_CMD} -e 's|#define PACKED __attribute__ ((packed))|#define PACKED|' ${WRKSRC}/par2fileformat.h post-install: .if !defined(NOPORTDOCS) Patch attached with submission follows: --- reedsolomon.cpp.old Sun Jan 28 15:56:12 2007 +++ reedsolomon.cpp Sun Jan 28 15:58:17 2007 @@ -51,7 +51,7 @@ } } -bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present) +template<> bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present) { inputcount = (u32)present.size(); @@ -80,7 +80,7 @@ return true; } -bool ReedSolomon<Galois8>::SetInput(u32 count) +template<> bool ReedSolomon<Galois8>::SetInput(u32 count) { inputcount = count; @@ -101,7 +101,7 @@ return true; } -bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) +template<> bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) { // Look up the appropriate element in the RS matrix Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex]; @@ -189,7 +189,7 @@ // Set which of the source files are present and which are missing // and compute the base values to use for the vandermonde matrix. -bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present) +template<> bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present) { inputcount = (u32)present.size(); @@ -233,7 +233,7 @@ // Record that the specified number of source files are all present // and compute the base values to use for the vandermonde matrix. -bool ReedSolomon<Galois16>::SetInput(u32 count) +template<> bool ReedSolomon<Galois16>::SetInput(u32 count) { inputcount = count; @@ -267,7 +267,7 @@ return true; } -bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) +template<> bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer) { // Look up the appropriate element in the RS matrix >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703201659.l2KGx5tr078868>