From owner-freebsd-ports@FreeBSD.ORG Tue Mar 10 22:52:21 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEC03F3B for ; Tue, 10 Mar 2015 22:52:21 +0000 (UTC) Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [IPv6:2607:f8b0:4001:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A41C7E0E for ; Tue, 10 Mar 2015 22:52:21 +0000 (UTC) Received: by iecvj10 with SMTP id vj10so34436495iec.0 for ; Tue, 10 Mar 2015 15:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=YF7MM4g4u0w27ysE65fbiK5WZTXDjHAnW/Z5kS8/gns=; b=wcNt7MKh90esI1OwOOD8W8FIot1aX6HxnPt1Giqn1YpUx79rGRWuLoMUpxGdomSo5k b0EgfgqkaKxmuiBtBsYhqwMbDd1LtAT4pIDEsi9/Ivf7PbOjX5Thp7s+qKz/pBypit5B FAeB6L8LSeaA/0YKjh0NRP9FDAKJ9MgaurjM17Naa+ulOf6ZLR9hDZEdXnALiT9VyqC4 xy6Gwn7UD4+UgcJBeNCd4b7/h017IjacwsRD6b/xwJOGSRZdIilLo7V1L7034HcyTjK7 GxQtj2nHCCL9BMgKzURnAueZl1SnpRbYRHKHlGOPi0lKms/f9hmvZTb6MB/doLe+YjqA 3Exw== X-Received: by 10.50.50.142 with SMTP id c14mr59992938igo.42.1426027941144; Tue, 10 Mar 2015 15:52:21 -0700 (PDT) Received: from [10.0.1.155] (d205-206-84-235.abhsia.telus.net. [205.206.84.235]) by mx.google.com with ESMTPSA id ik7sm1347297igb.1.2015.03.10.15.52.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 15:52:20 -0700 (PDT) Message-ID: <54FF75A2.4020803@gmail.com> Date: Tue, 10 Mar 2015 16:52:18 -0600 From: Scott Furry User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: converters/iconv versioning Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2015 22:52:22 -0000 I am running into in a situation with other C code where a call to iconv and passing in a non-const source buffer would result in a build warning. Others who use the same code on other platforms do not report this warning. In tracking down the issue, I have discovered that there may be a difference in the iconv.h header file used on FreeBSD versus Mac/Linux et al. http://www.opensource.apple.com/source/libiconv/libiconv-30/install/iconv.h line 48 shows that call to iconv ----- size_t iconv (iconv_t /*cd*/, char ** __restrict /*inbuf*/, size_t * __restrict /*inbytesleft*/, char ** __restrict /*outbuf*/, size_t * __restrict /*outbytesleft*/); ---- /usr/local/include/iconv.h, line 83, shows something rather different. Even the commentary around the code is different. ----- extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); ----- My question is this, are we using a different or FreeBSD-specific version of iconv? S