From patchwork Wed Jan 30 10:53:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 216824 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]) by ozlabs.org (Postfix) with SMTP id 601802C0095 for ; Wed, 30 Jan 2013 21:53:31 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1360148013; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Date:Message-ID:Subject:From:To:Cc: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=YpRTHNN VU83ZHPP2cJK/5Wi2cVA=; b=xrCfw3zgAwWI6YZCgNqHj2Ux9Hc7THM7r2Cwq9s AcUMzvHljVOMsVms50+reOuQ36T5jdFtYhw8/UgZxkI81uQOQR/aNkyErZhqcbym V5y7QM/OkoTJfLkVYBFUAIogA08o47GMMwAgB9tLCGyA9tttEYFl+HyFPonGNCM3 ZEYg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:X-Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=JsAk/Rzd+dqMIYBhd5Xy9DDmbpbkZLmHej5c182t5iN7vuxYv8kyFFhkYvn9Qn 4A84EiW5zwD4fhaaEydCUj8OpwYHbHRVZ2Q3jRkmYAECdwbjkbkO6GVcpHN+zY2T GbmiUGMj/S98CUDVIy+F9zcbSH74pbJ1zmccEnxp88iYA=; Received: (qmail 8573 invoked by alias); 30 Jan 2013 10:53:22 -0000 Received: (qmail 8551 invoked by uid 22791); 30 Jan 2013 10:53:21 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ie0-f170.google.com (HELO mail-ie0-f170.google.com) (209.85.223.170) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jan 2013 10:53:17 +0000 Received: by mail-ie0-f170.google.com with SMTP id c11so1168247ieb.29 for ; Wed, 30 Jan 2013 02:53:16 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.16.210 with SMTP id i18mr3187788igd.53.1359543196520; Wed, 30 Jan 2013 02:53:16 -0800 (PST) Received: by 10.64.34.172 with HTTP; Wed, 30 Jan 2013 02:53:16 -0800 (PST) Date: Wed, 30 Jan 2013 11:53:16 +0100 Message-ID: Subject: [patch libiberty's include]: Fixes PR 39064 and partial PR 54620 From: Kai Tietz To: GCC Patches Cc: Binutils , gdb X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, this patch fixes for targets with sys/types.h the issue that wrong assumptions about pointer-sizes are used. Instead it uses uintptr_t/intptr_t. ChangeLog /include 2013-01-30 Kai Tietz PR other/54620 PR target/39064 * md5.h: Include sys/types.h if HAVE_SYS_TYPES_H is defined. * sha1.h: Likewise. Tested for x86_64-unknown-linux-gnu, x86_64-w64-mingw32, and i686-w64-mingw32. Ok for apply? Regards, Kai Index: md5.h =================================================================== --- md5.h (Revision 195288) +++ md5.h (Arbeitskopie) @@ -36,7 +36,7 @@ the resulting executable. Locally running cross-compiled executables is usually not possible. */ -#ifdef _LIBC +#if defined (_LIBC) || defined (HAVE_SYS_TYPES_H) # include typedef u_int32_t md5_uint32; typedef uintptr_t md5_uintptr; Index: sha1.h =================================================================== --- sha1.h (Revision 195288) +++ sha1.h (Arbeitskopie) @@ -35,7 +35,7 @@ the resulting executable. Locally running cross-compiled executables is usually not possible. */ -#ifdef _LIBC +#if defined (_LIBC) || defined (HAVE_SYS_TYPES_H) # include typedef u_int32_t sha1_uint32; typedef uintptr_t sha1_uintptr;