From owner-svn-ports-head@FreeBSD.ORG Fri Sep 6 20:57:13 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6ACA3863; Fri, 6 Sep 2013 20:57:13 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4886523F0; Fri, 6 Sep 2013 20:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86KvDLn078954; Fri, 6 Sep 2013 20:57:13 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86KvBjx078939; Fri, 6 Sep 2013 20:57:11 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201309062057.r86KvBjx078939@svn.freebsd.org> From: Niclas Zeising Date: Fri, 6 Sep 2013 20:57:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r326546 - head/x11-wm/blackbox/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:57:13 -0000 Author: zeising Date: Fri Sep 6 20:57:11 2013 New Revision: 326546 URL: http://svnweb.freebsd.org/changeset/ports/326546 Log: Fix build with clang and libc++ Approved by: portmgr (bapt) Added: head/x11-wm/blackbox/files/patch-lib_Display.cc (contents, props changed) head/x11-wm/blackbox/files/patch-lib_Menu.cc (contents, props changed) head/x11-wm/blackbox/files/patch-lib_Texture.cc (contents, props changed) head/x11-wm/blackbox/files/patch-src_Window.cc (contents, props changed) head/x11-wm/blackbox/files/patch-src_blackbox.cc (contents, props changed) head/x11-wm/blackbox/files/patch-src_main.cc (contents, props changed) head/x11-wm/blackbox/files/patch-util_bsetroot.cc (contents, props changed) Added: head/x11-wm/blackbox/files/patch-lib_Display.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/blackbox/files/patch-lib_Display.cc Fri Sep 6 20:57:11 2013 (r326546) @@ -0,0 +1,36 @@ +--- lib/Display.cc.orig 2005-01-03 10:42:38.000000000 +0100 ++++ lib/Display.cc 2013-08-31 15:42:48.395906537 +0200 +@@ -25,6 +25,7 @@ + #include "Display.hh" + + #include ++#include + + #include + +@@ -32,7 +33,6 @@ + #include + #include + +- + namespace bt { + + void createBitmapLoader(const Display &display); +@@ -68,7 +68,7 @@ + if (!(xdisplay = XOpenDisplay(dpy_name))) { + fprintf(stderr, "bt::Display: failed to open display '%s'\n", + dpy_name ? dpy_name : ""); +- ::exit(2); ++ std::exit(2); + } + + #ifdef DEBUG +@@ -77,7 +77,7 @@ + + if (fcntl(XConnectionNumber(xdisplay), F_SETFD, 1) == -1) { + fprintf(stderr, "bt::Display: failed to mark connection close-on-exec\n"); +- ::exit(2); ++ std::exit(2); + } + + if (!multi_head || ScreenCount(xdisplay) == 1) { Added: head/x11-wm/blackbox/files/patch-lib_Menu.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/blackbox/files/patch-lib_Menu.cc Fri Sep 6 20:57:11 2013 (r326546) @@ -0,0 +1,71 @@ +--- lib/Menu.cc.orig 2013-08-31 15:45:50.982895002 +0200 ++++ lib/Menu.cc 2013-08-31 15:53:36.911861215 +0200 +@@ -30,6 +30,8 @@ + #include "PixmapCache.hh" + #include "Resource.hh" + ++#include ++ + #include + #include + +@@ -135,11 +137,11 @@ + + str = resource.read("menu.title.marginWidth", "Menu.Title.MarginWidth", "1"); + title_margin = +- static_cast(std::max(strtol(str.c_str(), 0, 0), 0l)); ++ static_cast(std::max(std::strtol(str.c_str(), 0, 0), 0l)); + + str = resource.read("menu.frame.marginWidth", "Menu.Frame.MarginWidth", "1"); + frame_margin = +- static_cast(std::max(strtol(str.c_str(), 0, 0), 0l)); ++ static_cast(std::max(std::strtol(str.c_str(), 0, 0), 0l)); + } + + +@@ -363,7 +365,7 @@ + } else { + index = std::min(static_cast(index), _items.size()); + it = _items.begin(); +- std::advance(it, index); ++ std::advance(it, index); + } + + it = _items.insert(it, item); +@@ -514,7 +516,7 @@ + + void bt::Menu::removeIndex(unsigned int index) { + ItemList::iterator it = _items.begin(); +- std::advance(it, index); ++ std::advance(it, index); + if (it == _items.end()) + return; // item not found + removeItemByIterator(it); +@@ -1035,7 +1037,7 @@ + const ItemList::const_iterator &end = _items.end(); + ItemList::const_iterator anchor = _items.begin(); + if (_active_index != ~0u) { +- std::advance(anchor, _active_index); ++ std::advance(anchor, _active_index); + + // go one paste the current active index + if (anchor != end && !anchor->separator) +@@ -1055,8 +1057,7 @@ + ItemList::const_reverse_iterator anchor = _items.rbegin(); + const ItemList::const_reverse_iterator &end = _items.rend(); + if (_active_index != ~0u) { +- std::advance +- (anchor, _items.size() - _active_index - 1); ++ std::advance(anchor, _items.size() - _active_index - 1); + + // go one item past the current active index + if (anchor != end && !anchor->separator) +@@ -1174,7 +1175,7 @@ + } + + fprintf(stderr, "Error: bt::Menu::verifyId: id %u already used\n", id); +- abort(); ++ std::abort(); + } + + std::vector::iterator it = Added: head/x11-wm/blackbox/files/patch-lib_Texture.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/blackbox/files/patch-lib_Texture.cc Fri Sep 6 20:57:11 2013 (r326546) @@ -0,0 +1,19 @@ +--- lib/Texture.cc.orig 2013-08-31 15:55:19.995853042 +0200 ++++ lib/Texture.cc 2013-08-31 15:55:47.288909835 +0200 +@@ -28,6 +28,7 @@ + #include "Resource.hh" + + #include ++#include + + #include + #include +@@ -184,7 +185,7 @@ + + const std::string bstr = + resource.read(name + ".borderWidth", className + ".BorderWidth", "1"); +- unsigned int bw = static_cast(strtoul(bstr.c_str(), 0, 0)); ++ unsigned int bw = static_cast(std::strtoul(bstr.c_str(), 0, 0)); + texture.setBorderWidth(bw); + } + Added: head/x11-wm/blackbox/files/patch-src_Window.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/blackbox/files/patch-src_Window.cc Fri Sep 6 20:57:11 2013 (r326546) @@ -0,0 +1,74 @@ +--- src/Window.cc.orig 2013-08-31 15:58:41.720845042 +0200 ++++ src/Window.cc 2013-08-31 16:00:13.671837757 +0200 +@@ -33,6 +33,8 @@ + #include "Workspace.hh" + #include "blackbox.hh" + ++#include ++ + #include + #include + #include +@@ -3699,14 +3701,14 @@ + wtop = y, + wbottom = y + height - 1, + // left, right, top + bottom are for rect, douterleft = left border of rect +- dinnerleft = abs(wleft - rect.left()), +- dinnerright = abs(wright - rect.right()), +- dinnertop = abs(wtop - rect.top()), +- dinnerbottom = abs(wbottom - rect.bottom()), +- douterleft = abs(wright - rect.left()), +- douterright = abs(wleft - rect.right()), +- doutertop = abs(wbottom - rect.top()), +- douterbottom = abs(wtop - rect.bottom()); ++ dinnerleft = std::abs(wleft - rect.left()), ++ dinnerright = std::abs(wright - rect.right()), ++ dinnertop = std::abs(wtop - rect.top()), ++ dinnerbottom = std::abs(wbottom - rect.bottom()), ++ douterleft = std::abs(wright - rect.left()), ++ douterright = std::abs(wleft - rect.right()), ++ doutertop = std::abs(wbottom - rect.top()), ++ douterbottom = std::abs(wtop - rect.bottom()); + + if ((wtop <= rect.bottom() && wbottom >= rect.top()) + || doutertop <= snap_distance +@@ -3749,8 +3751,8 @@ + const int cwy = y + height / 2; + const int crx = rect.x() + rect.width() / 2; + const int cry = rect.y() + rect.height() / 2; +- const int cdx = abs(cwx - crx); +- const int cdy = abs(cwy - cry); ++ const int cdx = std::abs(cwx - crx); ++ const int cdy = std::abs(cwy - cry); + if (cdx <= snap_distance) + // snap to horizontal center + *dx = x - (rect.x() + ((rect.width() - width) / 2)); +@@ -3773,13 +3775,13 @@ + if (edge_distance) { + collisionAdjust(&dx, &dy, *x, *y, frame.rect.width(), frame.rect.height(), + _screen->availableArea(), edge_distance, true); +- nx = (dx != init_dx && abs(dx) < abs(nx)) ? dx : nx; dx = init_dx; +- ny = (dy != init_dy && abs(dy) < abs(ny)) ? dy : ny; dy = init_dy; ++ nx = (dx != init_dx && std::abs(dx) < std::abs(nx)) ? dx : nx; dx = init_dx; ++ ny = (dy != init_dy && std::abs(dy) < std::abs(ny)) ? dy : ny; dy = init_dy; + if (!blackbox->resource().fullMaximization()) { + collisionAdjust(&dx, &dy, *x, *y, frame.rect.width(), frame.rect.height(), + _screen->screenInfo().rect(), edge_distance); +- nx = (dx != init_dx && abs(dx) < abs(nx)) ? dx : nx; dx = init_dx; +- ny = (dy != init_dy && abs(dy) < abs(ny)) ? dy : ny; dy = init_dy; ++ nx = (dx != init_dx && std::abs(dx) < std::abs(nx)) ? dx : nx; dx = init_dx; ++ ny = (dy != init_dy && std::abs(dy) < std::abs(ny)) ? dy : ny; dy = init_dy; + } + } + if (win_distance) { +@@ -3791,8 +3793,8 @@ + win->workspace() == _screen->currentWorkspace()) { + collisionAdjust(&dx, &dy, *x, *y, frame.rect.width(), + frame.rect.height(), win->frame.rect, win_distance); +- nx = (dx != init_dx && abs(dx) < abs(nx)) ? dx : nx; dx = init_dx; +- ny = (dy != init_dy && abs(dy) < abs(ny)) ? dy : ny; dy = init_dy; ++ nx = (dx != init_dx && std::abs(dx) < std::abs(nx)) ? dx : nx; dx = init_dx; ++ ny = (dy != init_dy && std::abs(dy) < std::abs(ny)) ? dy : ny; dy = init_dy; + } + } + } Added: head/x11-wm/blackbox/files/patch-src_blackbox.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/blackbox/files/patch-src_blackbox.cc Fri Sep 6 20:57:11 2013 (r326546) @@ -0,0 +1,28 @@ +--- src/blackbox.cc.orig 2013-08-31 16:03:04.354825567 +0200 ++++ src/blackbox.cc 2013-08-31 16:12:46.759944855 +0200 +@@ -27,6 +27,8 @@ + #include "Slit.hh" + #include "Window.hh" + ++#include ++ + #include + #include + #include +@@ -36,6 +38,7 @@ + #include + #include + #include ++#include + #include + + // #define FOCUS_DEBUG +@@ -422,7 +425,7 @@ + if (managed == 0) { + fprintf(stderr, "%s: no managable screens found, exiting...\n", + applicationName().c_str()); +- ::exit(3); ++ std::exit(3); + } + + screen_list_count = managed; Added: head/x11-wm/blackbox/files/patch-src_main.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/blackbox/files/patch-src_main.cc Fri Sep 6 20:57:11 2013 (r326546) @@ -0,0 +1,45 @@ +--- src/main.cc.orig 2013-08-31 16:15:04.709773262 +0200 ++++ src/main.cc 2013-08-31 16:15:45.604774045 +0200 +@@ -24,6 +24,8 @@ + + // #define PRINT_SIZES + ++#include ++ + #if defined(PRINT_SIZES) + # include "Screen.hh" + # include "Slit.hh" +@@ -69,7 +71,7 @@ + #endif // SHAPE + ); + +- ::exit(exitval); ++ std::exit(exitval); + } + + int main(int argc, char **argv) { +@@ -87,13 +89,13 @@ + "Copyright (c) 1997 - 2000, 2002 - 2005 Bradley T Hughes\n", + __blackbox_version); + +- ::exit(0); ++ std::exit(0); + } else if (! strcmp(argv[i], "-rc")) { + // look for alternative rc file to use + + if ((++i) >= argc) { + fprintf(stderr, "error: '-rc' requires and argument\n"); +- ::exit(1); ++ std::exit(1); + } + + rc_file = argv[i]; +@@ -103,7 +105,7 @@ + + if ((++i) >= argc) { + fprintf(stderr, "error: '-display' requires an argument\n"); +- ::exit(1); ++ std::exit(1); + } + + dpy_name = argv[i]; Added: head/x11-wm/blackbox/files/patch-util_bsetroot.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/blackbox/files/patch-util_bsetroot.cc Fri Sep 6 20:57:11 2013 (r326546) @@ -0,0 +1,42 @@ +--- util/bsetroot.cc.orig 2013-08-31 16:18:50.697762748 +0200 ++++ util/bsetroot.cc 2013-08-31 16:19:53.695753444 +0200 +@@ -28,6 +28,7 @@ + #include + + #include ++#include + + #include + #include +@@ -68,11 +69,11 @@ + } else if (! strcmp("-mod", argv[i])) { + if ((++i) >= argc) usage(); + +- mod_x = atoi(argv[i]); ++ mod_x = std::atoi(argv[i]); + + if ((++i) >= argc) usage(); + +- mod_y = atoi(argv[i]); ++ mod_y = std::atoi(argv[i]); + + if (mod_x < 1) mod_x = 1; + if (mod_y < 1) mod_y = 1; +@@ -336,7 +337,7 @@ + " -to gradient end color\n\n" + " -solid solid color\n\n" + " -help print this help text and exit\n"); +- exit(exit_code); ++ std::exit(exit_code); + } + + int main(int argc, char **argv) { +@@ -350,7 +351,7 @@ + if ((++i) >= argc) { + fprintf(stderr, "error: '-display' requires an argument\n"); + +- ::exit(1); ++ std::exit(1); + } + + display_name = argv[i];