Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Aug 2017 11:19:24 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r447202 - head/games/openttd/files
Message-ID:  <201708031119.v73BJOlk084055@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Thu Aug  3 11:19:24 2017
New Revision: 447202
URL: https://svnweb.freebsd.org/changeset/ports/447202

Log:
  Update of LLVM components in -head to version 5.0.0 apparently had broken
  OpenTTD due to a conflict of ``type'' being defined (differently) and used
  in both libc++ and the game itself:
  
    In file included from /usr/include/c++/v1/math.h:310:
    /usr/include/c++/v1/limits:234:95: error: member reference base type 'int'
    is not a structure or union
      _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN()
      _NOEXCEPT {return type(0);}
  
    .../openttd-1.7.1/src/3rdparty/squirrel/squirrel/sqobject.h:99:25: note:
    expanded from macro 'type'
      #define type(obj) ((obj)._type)
  
  Mend the problem by #includ'ing <math.h> prior to Squirrel's (programming
  language OpenTTD uses internally for scripting).
  
  Reported by:	pkg-fallout

Added:
  head/games/openttd/files/patch-src_3rdparty_squirrel_squirrel_sqvm.cpp   (contents, props changed)

Added: head/games/openttd/files/patch-src_3rdparty_squirrel_squirrel_sqvm.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/openttd/files/patch-src_3rdparty_squirrel_squirrel_sqvm.cpp	Thu Aug  3 11:19:24 2017	(r447202)
@@ -0,0 +1,13 @@
+--- src/3rdparty/squirrel/squirrel/sqvm.cpp.orig	2017-06-13 18:34:58 UTC
++++ src/3rdparty/squirrel/squirrel/sqvm.cpp
+@@ -4,9 +4,9 @@
+ 
+ #include "../../../stdafx.h"
+ 
++#include <math.h>
+ #include <squirrel.h>
+ #include "sqpcheader.h"
+-#include <math.h>
+ #include "sqopcodes.h"
+ #include "sqfuncproto.h"
+ #include "sqvm.h"



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