From owner-svn-ports-all@freebsd.org Wed Feb 1 20:21:21 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3D98CCC6D8; Wed, 1 Feb 2017 20:21:21 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7E81E7B0; Wed, 1 Feb 2017 20:21:21 +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 v11KLKLi064779; Wed, 1 Feb 2017 20:21:20 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11KLKFL064776; Wed, 1 Feb 2017 20:21:20 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201702012021.v11KLKFL064776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 1 Feb 2017 20:21:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r433092 - head/palm/palm-db-tools/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-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 01 Feb 2017 20:21:21 -0000 Author: jbeich Date: Wed Feb 1 20:21:20 2017 New Revision: 433092 URL: https://svnweb.freebsd.org/changeset/ports/433092 Log: palm/palm-db-tools: unbreak with libc++ 3.9 DB.cpp:224:31: error: reinterpret_cast from 'const void *' to 'pi_char_t *' (aka 'unsigned char *') casts away qualifiers pi_char_t* null_ptr = reinterpret_cast ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ JFile3.cpp:470:20: error: reinterpret_cast from 'const void *' to 'pi_char_t *' (aka 'unsigned char *') casts away qualifiers null_ptr = reinterpret_cast (memchr(p, 0, 21)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JFile3.cpp:521:16: error: reinterpret_cast from 'const void *' to 'pi_char_t *' (aka 'unsigned char *') casts away qualifiers null_ptr = reinterpret_cast (memchr(p, 0, 16)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JFile3.cpp:529:16: error: reinterpret_cast from 'const void *' to 'pi_char_t *' (aka 'unsigned char *') casts away qualifiers null_ptr = reinterpret_cast (memchr(p, 0, 16)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JFile3.cpp:545:16: error: reinterpret_cast from 'const void *' to 'pi_char_t *' (aka 'unsigned char *') casts away qualifiers null_ptr = reinterpret_cast (memchr(p, 0, 12)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MobileDB.cpp:224:24: error: reinterpret_cast from 'const void *' to 'pi_char_t *' (aka 'unsigned char *') casts away qualifiers pi_char_t* q = reinterpret_cast ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported by: pkg-fallout Added: head/palm/palm-db-tools/files/patch-libflatfile_JFile3.cpp (contents, props changed) head/palm/palm-db-tools/files/patch-libflatfile_MobileDB.cpp (contents, props changed) Modified: head/palm/palm-db-tools/files/patch-libflatfile-DB.cpp (contents, props changed) Modified: head/palm/palm-db-tools/files/patch-libflatfile-DB.cpp ============================================================================== --- head/palm/palm-db-tools/files/patch-libflatfile-DB.cpp Wed Feb 1 20:21:10 2017 (r433091) +++ head/palm/palm-db-tools/files/patch-libflatfile-DB.cpp Wed Feb 1 20:21:20 2017 (r433092) @@ -1,5 +1,14 @@ --- libflatfile/DB.cpp.orig Thu Jun 19 16:37:46 2003 +++ libflatfile/DB.cpp +@@ -221,7 +221,7 @@ void PalmLib::FlatFile::DB::extract_list + throw PalmLib::error("list view is corrupt"); + + // Determine the length of the name string. +- pi_char_t* null_ptr = reinterpret_cast ++ const pi_char_t* null_ptr = reinterpret_cast + (memchr(chunk.data() + 4, 0, 32)); + if (null_ptr) + lv.name = std::string((char *) (chunk.data() + 4), @@ -511,7 +511,8 @@ f.type = PalmLib::FlatFile::Field::LIST; if (!field(j).argument().empty()) { Added: head/palm/palm-db-tools/files/patch-libflatfile_JFile3.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/palm/palm-db-tools/files/patch-libflatfile_JFile3.cpp Wed Feb 1 20:21:20 2017 (r433092) @@ -0,0 +1,47 @@ +--- libflatfile/JFile3.cpp.orig 2003-06-19 23:37:46 UTC ++++ libflatfile/JFile3.cpp +@@ -454,7 +454,7 @@ PalmLib::FlatFile::JFile3::getOptions(vo + void PalmLib::FlatFile::JFile3::JFileAppInfoType::unpack(const PalmLib::Block& block) + { + unsigned i; +- pi_char_t* null_ptr; ++ const pi_char_t* null_ptr; + + // Ensure that we have enough space to extract information from. + if (block.size() < ( (20 * (20+1)) + 20*2 + 2 + 2 + 20*2 + 2 +@@ -467,7 +467,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + // Extract the field names. + for (i = 0; i < 20; ++i) { + /* Find the trailing null byte and extract the string. */ +- null_ptr = reinterpret_cast (memchr(p, 0, 21)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 21)); + if (null_ptr) + fieldNames[i] = std::string((char *) p, null_ptr - p); + else +@@ -518,7 +518,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += sizeof(pi_uint16_t); + + // Extract the string used last by Find. +- null_ptr = reinterpret_cast (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 16)); + if (null_ptr) + findString = std::string((char *) p, null_ptr - p); + else +@@ -526,7 +526,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += 16; + + // Extract the string used last by Filter. +- null_ptr = reinterpret_cast (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 16)); + if (null_ptr) + filterString = std::string((char *) p, null_ptr - p); + else +@@ -542,7 +542,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += sizeof(pi_uint16_t); + + // Extract the password (if any). +- null_ptr = reinterpret_cast (memchr(p, 0, 12)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 12)); + if (null_ptr) + password = std::string((char *) p, null_ptr - p); + else Added: head/palm/palm-db-tools/files/patch-libflatfile_MobileDB.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/palm/palm-db-tools/files/patch-libflatfile_MobileDB.cpp Wed Feb 1 20:21:20 2017 (r433092) @@ -0,0 +1,11 @@ +--- libflatfile/MobileDB.cpp.orig 2003-06-19 23:37:46 UTC ++++ libflatfile/MobileDB.cpp +@@ -221,7 +221,7 @@ PalmLib::FlatFile::MobileDB::parse_recor + if (field + 1 > fields.size()) fields.resize(field + 1); + + // Now search for the end of the current field. +- pi_char_t* q = reinterpret_cast ++ const pi_char_t* q = reinterpret_cast + (memchr(p, 0, rec.end() - p)); + if (!q) + throw PalmLib::error("field terminiator is missing");