Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2013 20:35:09 GMT
From:      Daniel Nebdal <dnebdal@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/177512: Make emulators/snes9express compile again
Message-ID:  <201303302035.r2UKZ9KV069068@red.freebsd.org>
Resent-Message-ID: <201303302040.r2UKe1cE014177@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         177512
>Category:       ports
>Synopsis:       Make emulators/snes9express compile again
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 30 20:40:01 UTC 2013
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303302035.r2UKZ9KV069068>