pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/snes9x emulators/snes9x: Rename a function f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2de336ac7592
branches:  trunk
changeset: 317196:2de336ac7592
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Jan 02 11:25:32 2019 +0000

description:
emulators/snes9x: Rename a function from log2 to log2l to avoid problems
with libc collisions on certain platforms.

diffstat:

 emulators/snes9x/distinfo                    |   3 +-
 emulators/snes9x/patches/patch-unix_unix.cpp |  33 ++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletions(-)

diffs (50 lines):

diff -r 27fc035938bd -r 2de336ac7592 emulators/snes9x/distinfo
--- a/emulators/snes9x/distinfo Wed Jan 02 10:36:32 2019 +0000
+++ b/emulators/snes9x/distinfo Wed Jan 02 11:25:32 2019 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.20 2019/01/01 22:16:14 nia Exp $
+$NetBSD: distinfo,v 1.21 2019/01/02 11:25:32 nia Exp $
 
 SHA1 (snes9x-1.58.tar.gz) = c94ceb8d7b322b4bfa030b1327d815b697e4176a
 RMD160 (snes9x-1.58.tar.gz) = 51f7fe17f003998b35204046ca7d193d37980da1
 SHA512 (snes9x-1.58.tar.gz) = 51f8e92258db58e55f7b0b6c4537a916358891bb5ee35bd984d1970d2fedbdb2f8b3a4f560e0302d3011e521a1072c8a0d69723e8b151f61d33802c02f392d7d
 Size (snes9x-1.58.tar.gz) = 2830667 bytes
 SHA1 (patch-unix_configure) = 9df9a805141396583bceb35bea1bda157ed3ed6b
+SHA1 (patch-unix_unix.cpp) = 96089e2cc990a1b6bb83b94c3509957f91fd046a
diff -r 27fc035938bd -r 2de336ac7592 emulators/snes9x/patches/patch-unix_unix.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/snes9x/patches/patch-unix_unix.cpp      Wed Jan 02 11:25:32 2019 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-unix_unix.cpp,v 1.1 2019/01/02 11:25:32 nia Exp $
+
+Avoid colliding with libc functions.
+
+--- unix/unix.cpp.orig 2018-12-16 17:04:59.000000000 +0000
++++ unix/unix.cpp
+@@ -156,7 +156,7 @@ bool S9xDisplayPollButton (uint32, bool 
+ bool S9xDisplayPollAxis (uint32, int16 *);
+ bool S9xDisplayPollPointer (uint32, int16 *, int16 *);
+ 
+-static long log2 (long);
++static long log2l (long);
+ static void SoundTrigger (void);
+ static void InitTimer (void);
+ static void NSRTControllerSetup (void);
+@@ -230,7 +230,7 @@ void _makepath (char *path, const char *
+       }
+ }
+ 
+-static long log2 (long num)
++static long log2l (long num)
+ {
+       long    n = 0;
+ 
+@@ -1324,7 +1324,7 @@ bool8 S9xOpenSoundDevice (void)
+               return (FALSE);
+       }
+ 
+-      J = log2(unixSettings.SoundFragmentSize) | (3 << 16);
++      J = log2l(unixSettings.SoundFragmentSize) | (3 << 16);
+       if (ioctl(so.sound_fd, SNDCTL_DSP_SETFRAGMENT, &J) == -1)
+               return (FALSE);
+ 



Home | Main Index | Thread Index | Old Index