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: 343505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id EEFFF14008E for ; Tue, 29 Apr 2014 03:38:49 +1000 (EST) 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=iukQe F0jLNkTyJZ7Zzqs0vV8uRRiz8Y9XU+P228pLZPYqtn1crrJSGVu8PyEJmHuFo3BV eknSMkQYRqR2DOChPdd3N5I/2VX42MgMwgkD8TAukg3nTLJczX62s5xrIZQlCvKF Wm63TkzxDdavtGCaui0lJRS5py24DQeKkpltWg= 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=qrDoZPnytn+XhOok9dJK+XfhIuu2wzCVUhgAfz1ZeH7 mtuH2AiZjGg8B7aDD8IJSzRAnapiu76B51F72RIqJOg1F4URb8vsXR9o7MjCv0JG lf2nupbB91i672MOt48hD6w4WsJeX4KxhYxrnJbPVm0hsQYFmfo3+KaOWD2QAEqo = 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: 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