From patchwork Fri Jun 6 19:50:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Metcalf X-Patchwork-Id: 357007 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 C50C01400BE for ; Sat, 7 Jun 2014 06:00:16 +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:message-id:from:date:subject:to:mime-version :content-type; q=dns; s=default; b=S5vy6Yxb6bX25QpRGPfbhUqw1c3N3 ZHWHOjQZp28JyMyPNZK8/V8cG9wQKxaI5Z76oy50Llb7s/Htb3cicKhJ6bPbkFyx 4fJHnOYFdukTLbIceZ2+Lgd2uSwyyRN/XQ/c1ySWs/1MeHa3YiY1AiqqxzydJJIR OgIRXNN5l9o3t8= 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:message-id:from:date:subject:to:mime-version :content-type; s=default; bh=Q54zL+chUWNS/Zn2lq0Ks1EOalM=; b=gCy yEB3ycADyeYbXAdVH5rHDaAkXjx7GeuW3rQZjmLiEFco4ZsByv28wvBgvr5lfzuW EH7IGjtwbviIVoTwn5HXbhWwuamR8jD7uzHIHKhmetZMwc8agEXk1IVtfiZTMmJT LAejlLdx6pwJrqX3CrvBW3CtjAPgCUFdFQpDhBSg= Received: (qmail 23519 invoked by alias); 6 Jun 2014 20:00:11 -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 23505 invoked by uid 89); 6 Jun 2014 20:00:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: USMAMAIL.TILERA.COM Message-ID: <201406062000.s56K06eu032548@farm-0002.internal.tilera.com> From: Chris Metcalf Date: Fri, 6 Jun 2014 15:50:31 -0400 Subject: [PATCH] crypt: don't include ufc-crypt.h multiple times To: , Konstantin Serebryany MIME-Version: 1.0 The file has no inclusion guards, and contains typedefs that cause errors when included multiple times with older (pre-C11) compilers such as gcc 4.4. Save the "#ifdef DOS" content to crypt-private.h even though it's likely not particularly useful. --- Konstantin Serebryany's commit 8747cd034a to remove a redundant nested function from the crypt code caused this problem but I think most folks are using newer compilers and so didn't notice it. 2014-06-06 Chris Metcalf * crypt/crypt-private.h [DOS]: Add some includes taken from the other files in the crypt directory. * crypt/crypt.c: Remove duplicate includes. * crypt/crypt-entry.c: Likewise. * crypt/crypt_util.c: Likewise. crypt/crypt-entry.c | 10 ---------- crypt/crypt-private.h | 9 +++++++++ crypt/crypt.c | 2 -- crypt/crypt_util.c | 11 ----------- diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c index 2a6e9504e365..f6444dfc14de 100644 --- a/crypt/crypt-entry.c +++ b/crypt/crypt-entry.c @@ -34,16 +34,6 @@ #define STATIC static #endif -#ifndef DOS -#include "ufc-crypt.h" -#else -/* - * Thanks to greg%wind@plains.NoDak.edu (Greg W. Wettstein) - * for DOS patches - */ -#include "ufc.h" -#endif -#include "crypt.h" #include "crypt-private.h" /* Prototypes for local functions. */ diff --git a/crypt/crypt-private.h b/crypt/crypt-private.h index ea46a7f949cd..b6a5e07b369e 100644 --- a/crypt/crypt-private.h +++ b/crypt/crypt-private.h @@ -28,7 +28,16 @@ #include #include +#ifndef DOS #include "ufc-crypt.h" +#else +/* + * Thanks to greg%wind@plains.NoDak.edu (Greg W. Wettstein) + * for DOS patches + */ +#include "pl.h" +#include "ufc.h" +#endif #include "crypt.h" /* crypt.c */ diff --git a/crypt/crypt.c b/crypt/crypt.c index 4fb25780fc8a..1919210daf2b 100644 --- a/crypt/crypt.c +++ b/crypt/crypt.c @@ -23,8 +23,6 @@ * */ -#include "ufc-crypt.h" -#include "crypt.h" #include "crypt-private.h" #ifdef _UFC_32_ diff --git a/crypt/crypt_util.c b/crypt/crypt_util.c index 9381d671940b..da0a5aa33b83 100644 --- a/crypt/crypt_util.c +++ b/crypt/crypt_util.c @@ -33,17 +33,6 @@ #define STATIC static #endif -#ifndef DOS -#include "ufc-crypt.h" -#else -/* - * Thanks to greg%wind@plains.NoDak.edu (Greg W. Wettstein) - * for DOS patches - */ -#include "pl.h" -#include "ufc.h" -#endif -#include "crypt.h" #include "crypt-private.h" /* Prototypes for local functions. */