Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2013 03:55:20 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r327217 - head/games/toycars/files
Message-ID:  <201309140355.r8E3tKqw011643@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Sat Sep 14 03:55:20 2013
New Revision: 327217
URL: http://svnweb.freebsd.org/changeset/ports/327217

Log:
  Fix build with clang/libc++

Added:
  head/games/toycars/files/patch-toycars-src-CarGame.cpp   (contents, props changed)
  head/games/toycars/files/patch-toycars-src-HotPotatoGame.cpp   (contents, props changed)

Added: head/games/toycars/files/patch-toycars-src-CarGame.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/toycars/files/patch-toycars-src-CarGame.cpp	Sat Sep 14 03:55:20 2013	(r327217)
@@ -0,0 +1,16 @@
+--- toycars/src/CarGame.cpp.orig	2009-03-28 16:37:48.000000000 +0300
++++ toycars/src/CarGame.cpp	2013-09-14 07:36:19.958228083 +0400
+@@ -48,13 +48,6 @@
+ 	return NULL;
+ }
+ #endif
+-#ifndef drand48
+-const double kInvRandomRange = 1.0 / RAND_MAX;
+-double drand48()
+-{
+-	return random() * kInvRandomRange;
+-}
+-#endif
+ 
+ #ifndef INFINITY
+ #define INFINITY 1e20

Added: head/games/toycars/files/patch-toycars-src-HotPotatoGame.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/toycars/files/patch-toycars-src-HotPotatoGame.cpp	Sat Sep 14 03:55:20 2013	(r327217)
@@ -0,0 +1,17 @@
+--- toycars/src/HotPotatoGame.cpp.orig	2009-03-21 14:17:43.000000000 +0300
++++ toycars/src/HotPotatoGame.cpp	2013-09-14 07:52:54.279227416 +0400
+@@ -18,13 +18,7 @@
+ #include "glf.h"
+ #include "TcPreferences.h"
+ 
+-/* When using MINGW (-mno-cygwin), srandom/random isn't defined */
+-#ifndef seed48
+-unsigned short * seed48(unsigned short xseed[3]);
+-#endif
+-#ifndef drand48
+-double drand48();
+-#endif
++#include <stdlib.h>
+ 
+ const double kExplosionSoundFrequency = 44.1e3;	// Hz
+ 



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