pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/dhewm3 Use __builtin_alloca instead of alloca. F...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b475f0d10851
branches:  trunk
changeset: 410059:b475f0d10851
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Sat Jan 25 14:38:51 2020 +0000

description:
Use __builtin_alloca instead of alloca. Fixes build w/ gcc8.

diffstat:

 games/dhewm3/distinfo                                   |   4 +++-
 games/dhewm3/patches/patch-neo_renderer_Image__init.cpp |  15 +++++++++++++++
 games/dhewm3/patches/patch-neo_sys_platform.h           |  17 +++++++++++++++++
 3 files changed, 35 insertions(+), 1 deletions(-)

diffs (53 lines):

diff -r f13590ab372e -r b475f0d10851 games/dhewm3/distinfo
--- a/games/dhewm3/distinfo     Sat Jan 25 13:53:36 2020 +0000
+++ b/games/dhewm3/distinfo     Sat Jan 25 14:38:51 2020 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.1 2019/12/14 19:16:39 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/01/25 14:38:51 jmcneill Exp $
 
 SHA1 (dhewm3-1.5.0-src.tar.xz) = 4dd50a0d046565f17ca7737c922f9510f3cf0e21
 RMD160 (dhewm3-1.5.0-src.tar.xz) = c9b376d22381e8cfd5657c079ba26eb07c9f1217
 SHA512 (dhewm3-1.5.0-src.tar.xz) = 0a52744818205f842bf5d32d27310acb890999555258a94b589d8369f3804c0d4888fb594261791abff193e8d6b853b5d818205e66ef3928a2d1d361135e9a5d
 Size (dhewm3-1.5.0-src.tar.xz) = 3815488 bytes
+SHA1 (patch-neo_renderer_Image__init.cpp) = 1c84e961325650dda89af8942781aa9282a55d69
+SHA1 (patch-neo_sys_platform.h) = 111981dd6176600ad6851193402486c9e427d3d7
diff -r f13590ab372e -r b475f0d10851 games/dhewm3/patches/patch-neo_renderer_Image__init.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dhewm3/patches/patch-neo_renderer_Image__init.cpp   Sat Jan 25 14:38:51 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-neo_renderer_Image__init.cpp,v 1.1 2020/01/25 14:38:51 jmcneill Exp $
+
+Use the _alloca define from neo/sys/platform.h
+
+--- neo/renderer/Image_init.cpp.orig   2018-12-15 04:49:59.000000000 +0000
++++ neo/renderer/Image_init.cpp
+@@ -1197,7 +1197,7 @@ void R_ListImages_f( const idCmdArgs &ar
+ 
+       totalSize = 0;
+ 
+-      sortedImage_t   *sortedArray = (sortedImage_t *)alloca( sizeof( sortedImage_t ) * globalImages->images.Num() );
++      sortedImage_t   *sortedArray = (sortedImage_t *)_alloca( sizeof( sortedImage_t ) * globalImages->images.Num() );
+ 
+       for ( i = 0 ; i < globalImages->images.Num() ; i++ ) {
+               image = globalImages->images[ i ];
diff -r f13590ab372e -r b475f0d10851 games/dhewm3/patches/patch-neo_sys_platform.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dhewm3/patches/patch-neo_sys_platform.h     Sat Jan 25 14:38:51 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-neo_sys_platform.h,v 1.1 2020/01/25 14:38:51 jmcneill Exp $
+
+Use __builtin_allocate on Unix
+
+--- neo/sys/platform.h.orig    2018-12-15 04:49:59.000000000 +0000
++++ neo/sys/platform.h
+@@ -136,8 +136,8 @@ If you have questions concerning this li
+ // Unix
+ #ifdef __unix__
+ 
+-#define _alloca                                               alloca
+-#define _alloca16( x )                                ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15))
++#define _alloca                                               __builtin_alloca
++#define _alloca16( x )                                ((void *)((((uintptr_t)__builtin_alloca( (x)+15 )) + 15) & ~15))
+ 
+ #ifdef GAME_DLL
+ #define ID_GAME_API                                   __attribute__((visibility ("default")))



Home | Main Index | Thread Index | Old Index