From nobody@FreeBSD.org  Sat Mar 30 20:35:09 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id D6990ED0
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Mar 2013 20:35:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id AF756ADA
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Mar 2013 20:35:09 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2UKZ9NU069069
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Mar 2013 20:35:09 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r2UKZ9KV069068;
	Sat, 30 Mar 2013 20:35:09 GMT
	(envelope-from nobody)
Message-Id: <201303302035.r2UKZ9KV069068@red.freebsd.org>
Date: Sat, 30 Mar 2013 20:35:09 GMT
From: Daniel Nebdal <dnebdal@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Make emulators/snes9express compile again
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         177512
>Category:       ports
>Synopsis:       Make emulators/snes9express compile again
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ak
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 30 20:40:01 UTC 2013
>Closed-Date:    Mon Apr 07 05:27:00 UTC 2014
>Last-Modified:  Mon Apr 07 05:27:00 UTC 2014
>Originator:     Daniel Nebdal
>Release:        10-current, sometime early march 2013
>Organization:
-
>Environment:
FreeBSD mimir 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Tue Mar 26 20:25:11 CET 2013     djn@mimir:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I noticed emulators/snes9express wasn't compiling, and took a look. Given clang as cc, it compiled with rather minor fixes, though I haven't tried running it. Patch attached. 
>How-To-Repeat:

>Fix:
Attached. I concatenated the three patch files into one to fit it into the one-file attachment here; it should probably be re-split into patch-frend.cc , patch-frend.h , and patch-rom.cc ... or I should read about shell archives.

Patch attached with submission follows:

--- frend.cc	2009-12-21 23:38:54.000000000 +0100
+++ frend.cc	2013-03-30 21:11:20.702747627 +0100
@@ -373,7 +373,7 @@
 
 /* ############################ dimension ############################## */
 template <class T>
-void dimension<T>::input(std::istream& i)
+std::istream& dimension<T>::input(std::istream& i)
 {
   std::string buf, buf2;
   i >> buf;
--- frend.h	2009-12-21 05:36:15.000000000 +0100
+++ frend.h	2013-03-30 21:11:44.611746201 +0100
@@ -187,7 +187,7 @@
   dimension& operator+=(const dimension& p) { _x+=p._x; _y+=p._y; return *this; }
   dimension& operator-=(const dimension& p) { _x-=p._x; _y-=p._y; return *this; }
   void print(std::ostream& o) const;
-  void input(std::istream& i);
+  std::istream& input(std::istream& i);
 };
 typedef dimension<int> Point;
 typedef dimension<size_t> Size;
--- rom.cc	2009-12-22 01:06:07.000000000 +0100
+++ rom.cc	2013-03-30 21:10:25.279746508 +0100
@@ -21,9 +21,7 @@
 #include "rom.h"
 #include "prefs.h"
 
-#ifdef HAVE_ZLIB_H
-# include <zlib.h>
-#endif
+#include <zlib.h>
 
 namespace fr = frend;
 
@@ -209,9 +207,9 @@
 	};
 #ifdef ZLIB_VERSION
 # define romopen(f) (gzFile*)gzopen(f.c_str(), "rb")
-# define romseek gzseek
-# define romread gzread
-# define romclose gzclose
+# define romseek(a, b, c) gzseek(*a, b, c)
+# define romread(a, b, c) gzread(*a, b, c)
+# define romclose(a) gzclose(*a)
    gzFile *fptr;
 #else
 # define romopen(f) fopen(f.c_str(), "rb")


>Release-Note:
>Audit-Trail:

From: William Grzybowski <william88@gmail.com>
To: bug-followup@FreeBSD.org, dnebdal@gmail.com
Cc:  
Subject: Re: ports/177512: Make emulators/snes9express compile again
Date: Mon, 8 Apr 2013 10:06:12 -0300

 I have tested this patch, the build works but it segfaults on execute,
 did not have time to investigate any further.
 
 Thanks
 
 --
 William Grzybowski
 ------------------------------------------
 Curitiba/PR - Brasil
Responsible-Changed-From-To: freebsd-ports-bugs->ak 
Responsible-Changed-By: ak 
Responsible-Changed-When: Mon Apr 7 05:26:30 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177512 
State-Changed-From-To: open->closed 
State-Changed-By: ak 
State-Changed-When: Mon Apr 7 05:26:59 UTC 2014 
State-Changed-Why:  
Fixed in r330298. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177512 
>Unformatted:
