svn commit: r327217 - head/games/toycars/files

Dmitry Marakasov amdmi3 at FreeBSD.org
Sat Sep 14 03:55:21 UTC 2013


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
+ 


More information about the svn-ports-all mailing list