From patchwork Mon Apr 28 17:38:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 730 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id CD992360075 for ; Mon, 28 Apr 2014 10:38:46 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14307373) id 801E941627BB5; Mon, 28 Apr 2014 10:38:46 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id 5D36741627B8F for ; Mon, 28 Apr 2014 10:38:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=EeNjl 6qrw1yFbFTB6HAa1h1c3QQ84x8ZTLrI21nyGrq/6OAgKk1UomXal/zPHbFN/l/I+ xsK/c1EV40DiOp5BvpbQ0s68sW5TJXdCmKrTacvaEQfmI7aWbs+gu4CbPBLECWIY +FHYYI8zau97OAJbHunmMIws/KOWQbXTZ3PvSw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=NIs/SgDlEg6 WOAcA54gPCFnPsLQ=; b=CfX0PcDq9Wg7npdoQZiVRm1+Ig5M02sYzFQF7Gd3TOc IpfSQf9JRhgnjiZPYlFV1lLQQJjFw9VkQ+OI6phQBskHitBT+pfVYn86+3ghbOAp v+zAXkp0Jhz3beEb2ZUKzELwF5c4ZMEVhMl4DGy7y56xnYPpL8NkavM03XqpMIrE = Received: (qmail 17763 invoked by alias); 28 Apr 2014 17:38:44 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 17751 invoked by uid 89); 28 Apr 2014 17:38:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com From: "Steve Ellcey " Date: Mon, 28 Apr 2014 10:38:35 -0700 To: Subject: [Patch] Fix ONE_DIRECTION undef warnings. User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: X-DH-Original-To: glibc@patchwork.siddhesh.in Here is another attempt to fix some undef warnings. The only use of ONE_DIRECTION is in iconv/skeleton.c and the only setting of it is in iconv/gconv_simple.c (where it is set to 1). This patch checks (in skeleton.c) to see if it is set and then sets it to 0 if it is not. The use of it, later in skeleton.c is already done with a '#if' so nothing needed to be changed there. Tested on mips-mti-linux-gnu, the only code change was to the line number info in the assert calls. Steve Ellcey sellcey@mips.com 2014-04-28 Steve Ellcey * iconf/skelenton.c (ONE_DIRECTION): Set default value if not set. diff --git a/iconv/skeleton.c b/iconv/skeleton.c index c3f161a..1908949 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -163,6 +163,10 @@ # endif #endif +#ifndef ONE_DIRECTION +# define ONE_DIRECTION 0 +#endif + /* How many bytes are needed at most for the from-charset. */ #ifndef MAX_NEEDED_FROM