From owner-svn-ports-all@freebsd.org Sat Jul 7 00:40:37 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA77910422EE; Sat, 7 Jul 2018 00:40:36 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AFF877AAF; Sat, 7 Jul 2018 00:40:36 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CDCB10199; Sat, 7 Jul 2018 00:40:36 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w670eaqo029970; Sat, 7 Jul 2018 00:40:36 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w670eZKk029963; Sat, 7 Jul 2018 00:40:35 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201807070040.w670eZKk029963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sat, 7 Jul 2018 00:40:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r474049 - head/games/openbor/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/games/openbor/files X-SVN-Commit-Revision: 474049 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2018 00:40:37 -0000 Author: jbeich Date: Sat Jul 7 00:40:34 2018 New Revision: 474049 URL: https://svnweb.freebsd.org/changeset/ports/474049 Log: games/openbor: regen patches Modified: head/games/openbor/files/patch-openbor.c (contents, props changed) head/games/openbor/files/patch-sdl_menu.c (contents, props changed) head/games/openbor/files/patch-sdl_sdlport.c (contents, props changed) head/games/openbor/files/patch-source_gamelib_packfile.c (contents, props changed) head/games/openbor/files/patch-source_ramlib_ram.c (contents, props changed) head/games/openbor/files/patch-source_utils.c (contents, props changed) Modified: head/games/openbor/files/patch-openbor.c ============================================================================== --- head/games/openbor/files/patch-openbor.c Sat Jul 7 00:40:09 2018 (r474048) +++ head/games/openbor/files/patch-openbor.c Sat Jul 7 00:40:34 2018 (r474049) @@ -1,9 +1,9 @@ Fix potential crashes found by ASan/Clang/GCC Fix an infinite loop in lcmScriptDeleteMain() ---- openbor.c.orig 2017-04-22 14:20:08 UTC +--- openbor.c.orig 2018-07-06 15:13:16 UTC +++ openbor.c -@@ -5747,17 +5747,17 @@ s_collision_attack *collision_alloc_attack_instance(s_ +@@ -6259,17 +6259,17 @@ s_collision_attack *collision_alloc_attack_instance(s_ // // Allocate an empty collision attack list. s_collision_attack **collision_alloc_attack_list() @@ -22,7 +22,7 @@ Fix an infinite loop in lcmScriptDeleteMain() memset(result, 0, alloc_size); // return result. -@@ -5796,17 +5796,17 @@ s_collision_body *collision_alloc_body_instance(s_coll +@@ -6308,17 +6308,17 @@ s_collision_body *collision_alloc_body_instance(s_coll // // Allocate an empty collision attack list. s_collision_body **collision_alloc_body_list() @@ -41,7 +41,7 @@ Fix an infinite loop in lcmScriptDeleteMain() memset(result, 0, alloc_size); // return result. -@@ -8204,7 +8204,8 @@ size_t lcmScriptCopyBuffer(ArgList *argl +@@ -8743,7 +8743,8 @@ size_t lcmScriptCopyBuffer(ArgList *arglist, char *buf size_t lcmScriptDeleteMain(char **buf) { @@ -51,15 +51,15 @@ Fix an infinite loop in lcmScriptDeleteMain() ptrdiff_t pos = 0; char *newbuf = NULL; -@@ -15210,6 +15210,11 @@ void bar(int x, int y, int value, int ma +@@ -15920,6 +15921,11 @@ void bar(int x, int y, int value, int maxvalue, s_bars + else + { return; - } - ++ } ++ + if (value < 0) + { + value = 0; -+ } -+ + } + if (value > maxvalue) - { - value = maxvalue; Modified: head/games/openbor/files/patch-sdl_menu.c ============================================================================== --- head/games/openbor/files/patch-sdl_menu.c Sat Jul 7 00:40:09 2018 (r474048) +++ head/games/openbor/files/patch-sdl_menu.c Sat Jul 7 00:40:34 2018 (r474049) @@ -1,8 +1,8 @@ Don't crash with empty Paks/ directory. ---- sdl/menu.c.orig 2015-04-18 21:21:56 UTC +--- sdl/menu.c.orig 2018-07-06 15:13:16 UTC +++ sdl/menu.c -@@ -747,7 +747,7 @@ void Menu() +@@ -753,7 +753,7 @@ void Menu() } freeAllLogs(); termMenu(); Modified: head/games/openbor/files/patch-sdl_sdlport.c ============================================================================== --- head/games/openbor/files/patch-sdl_sdlport.c Sat Jul 7 00:40:09 2018 (r474048) +++ head/games/openbor/files/patch-sdl_sdlport.c Sat Jul 7 00:40:34 2018 (r474049) @@ -1,6 +1,6 @@ Store settings under ~/.openbor instead of current directory ---- sdl/sdlport.c.orig 2015-04-18 21:21:56 UTC +--- sdl/sdlport.c.orig 2018-07-06 15:13:16 UTC +++ sdl/sdlport.c @@ -11,6 +11,8 @@ #include "ram.h" @@ -11,8 +11,8 @@ Store settings under ~/.openbor instead of current dir #include #include -@@ -103,6 +105,16 @@ int main(int argc, char *argv[]) - #ifdef ANDROID +@@ -135,6 +137,16 @@ int main(int argc, char *argv[]) + } dirExists(rootDir, 1); chdir(rootDir); +#else @@ -26,5 +26,5 @@ Store settings under ~/.openbor instead of current dir + err(1, "cannot cd to $HOME/.openbor"); + } #endif + dirExists(paksDir, 1); - dirExists(savesDir, 1); Modified: head/games/openbor/files/patch-source_gamelib_packfile.c ============================================================================== --- head/games/openbor/files/patch-source_gamelib_packfile.c Sat Jul 7 00:40:09 2018 (r474048) +++ head/games/openbor/files/patch-source_gamelib_packfile.c Sat Jul 7 00:40:34 2018 (r474049) @@ -1,9 +1,9 @@ Reset seek position for BGM with more than 128 tracks Don't crash with more than 256 tracks. ---- source/gamelib/packfile.c.orig 2018-02-19 15:02:50 UTC +--- source/gamelib/packfile.c.orig 2018-07-06 15:13:16 UTC +++ source/gamelib/packfile.c -@@ -1408,7 +1408,7 @@ void packfile_music_read(fileliststruct *filelist, int +@@ -1407,7 +1407,7 @@ void packfile_music_read(fileliststruct *filelist, int getBasePath(packfile, filelist[i].filename, 1); if(stristr(packfile, ".pak")) { @@ -12,7 +12,7 @@ Don't crash with more than 256 tracks. filelist[i].nTracks = 0; fd = fopen(packfile, "rb"); if(fd == NULL) -@@ -1440,7 +1440,7 @@ void packfile_music_read(fileliststruct *filelist, int +@@ -1439,7 +1439,7 @@ void packfile_music_read(fileliststruct *filelist, int { goto nextpak; } Modified: head/games/openbor/files/patch-source_ramlib_ram.c ============================================================================== --- head/games/openbor/files/patch-source_ramlib_ram.c Sat Jul 7 00:40:09 2018 (r474048) +++ head/games/openbor/files/patch-source_ramlib_ram.c Sat Jul 7 00:40:34 2018 (r474049) @@ -1,6 +1,6 @@ Implement Linux-like memory stats for BSDs ---- source/ramlib/ram.c.orig 2017-04-22 14:20:08 UTC +--- source/ramlib/ram.c.orig 2018-07-06 15:13:16 UTC +++ source/ramlib/ram.c @@ -25,6 +25,21 @@ #include @@ -36,7 +36,7 @@ Implement Linux-like memory stats for BSDs static unsigned long elfOffset = 0x00000000; static unsigned long stackSize = 0x00000000; #endif -@@ -56,7 +74,10 @@ static unsigned long stackSize = 0x00000 +@@ -56,7 +74,10 @@ static unsigned long stackSize = 0x00000000; ///////////////////////////////////////////////////////////////////////////// // Symbols @@ -97,7 +97,7 @@ Implement Linux-like memory stats for BSDs #elif LINUX struct sysinfo info; sysinfo(&info); -@@ -133,11 +197,29 @@ void setSystemRam() +@@ -133,11 +196,29 @@ void setSystemRam() stat.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&stat); systemRam = stat.ullTotalPhys; @@ -132,7 +132,7 @@ Implement Linux-like memory stats for BSDs #elif LINUX struct sysinfo info; sysinfo(&info); -@@ -183,7 +265,10 @@ void setSystemRam() +@@ -183,7 +264,10 @@ void setSystemRam() stackSize = 0x00000000; systemRam = getFreeRam(BYTES); #endif @@ -144,7 +144,7 @@ Implement Linux-like memory stats for BSDs stackSize = (int)&_end - (int)&_start + ((int)&_start - elfOffset); #endif getRamStatus(BYTES); -@@ -212,6 +297,42 @@ u64 getUsedRam(int byte_size) +@@ -215,6 +299,42 @@ u64 getUsedRam(int byte_size) return 0; } return info.resident_size / byte_size; Modified: head/games/openbor/files/patch-source_utils.c ============================================================================== --- head/games/openbor/files/patch-source_utils.c Sat Jul 7 00:40:09 2018 (r474048) +++ head/games/openbor/files/patch-source_utils.c Sat Jul 7 00:40:34 2018 (r474049) @@ -6,9 +6,9 @@ source/utils.c:303:64: error: member reference base ty writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena); ~~~~~~~~~~^~~~~~ ---- source/utils.c.orig 2017-04-22 14:20:08 UTC +--- source/utils.c.orig 2018-07-06 15:13:16 UTC +++ source/utils.c -@@ -299,7 +299,7 @@ void *checkAlloc(void *ptr, size_t size, const char *f +@@ -303,7 +303,7 @@ void *checkAlloc(void *ptr, size_t size, const char *f "\n* Shutting Down *\n\n"); writeToLogFile("Out of memory!\n"); writeToLogFile("Allocation of size %i failed in function '%s' at %s:%i.\n", size, func, file, line); @@ -16,4 +16,4 @@ source/utils.c:303:64: error: member reference base ty +#if defined(__GLIBC__) || defined(ANDROID) || defined(VITA) writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena); #endif - exit(2); + borExit(2);