From patchwork Thu Nov 29 12:31:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152396 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2320658ljp; Thu, 29 Nov 2018 04:31:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/UMccupjmnEOo+txlYE7MHaByGo1AFpQH/zhMfKyupK4yQTi/qAm7r6nrtDcj0VIQZ84JJI X-Received: by 2002:a17:902:24a2:: with SMTP id w31mr1271262pla.216.1543494700494; Thu, 29 Nov 2018 04:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543494700; cv=none; d=google.com; s=arc-20160816; b=Ue9ZpCMJ6+wmWeaJ2PMo6I+nWC8ziQpJeRKZlhobK/6nXJvFy9SsxQ3u08kqqnzu5J HZhSfIjk0kjeDFBUH88+xBPZT4vBxql/vS3uY3ixQTyUsJbbXZFQ4WPHhw+/Wnimg7oP IA8RRuHneL8kNS4nqLRBGB7XvNn1XVFqqUAwayVely9QnfqTWp4kPvnwJTS4hlUhCve5 BdSiaa97Q0otFF1aj86LyMdG5VOhq++2qppKk0IPLz5G6xUPc/xEx9PWfgi/BekEJLL6 FansiUNR3XJTi/+uPN3h4TMLEVvuGD/sSvn3HRcMmWbWFCp8IlXISci9GnnjNBaEkXnE ivew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=GhJ+L4UQe0ZlIGmycbhFHA0y1sKdbskPrOkeM6JZ4kc=; b=JQMZw22RJKTx9W2A08RBc2rVF1oEtSZUf2LARw3/3HD/jTmxB/vrsRwPQLlr46CWHR vV0tfF4jAdWWd1eBMKPkbvt6FvF1qJTunHw67eIJ79oTj/RoBz1qxSi/EFmmU+7SQgrj PZ+Z2f1rVWQhugiHRFLhLDmFIo2IkhttkwTY3nmnuN1Pucm4mikiv7Hp+MQfpkPLgpEs 1o6UCy9nGypSPnzWxrR92c5bX65YxPOfC35+M3s0C22mzcl/YQeQrsOY5yj+OOc2PpK9 mPXEo9miEYXZ3Dq2pf6UanFw32Vddjuay3V1CeuLqmrZn+tE63JVbYPDALpGkNhzJVyr vjHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GASbuKcJ; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id g6si1898828pgn.57.2018.11.29.04.31.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 04:31:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GASbuKcJ; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 40E61211963EC; Thu, 29 Nov 2018 04:31:39 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::344; helo=mail-wm1-x344.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8BD87211963CA for ; Thu, 29 Nov 2018 04:31:36 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id y139so2052851wmc.5 for ; Thu, 29 Nov 2018 04:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Sj5tlUQPMyiJOPBnmFSauyD34CFQ6NQFVRE2rSYkK0c=; b=GASbuKcJ2vkHVeha84X9RyOf+ivcaCagETxbGB4ixaYoZVULwtd/TCYqibAS7I4h0s DR21IBlvEzGtzR8lfKXIQf34Qqwxppl4A2He2R7rzlr9knhDSE5ty0ZItH7m1dpjIMIS fyCKop8VLTjPgKEXn3cko7W2Yac5hZxU2B/4Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Sj5tlUQPMyiJOPBnmFSauyD34CFQ6NQFVRE2rSYkK0c=; b=Z9rLqpSY9LxMdcITOZ/NKS04+KHR59897haFxdpjr1wCc4WxBJvIhY0LQR/YTr2hxx aMiJs3EAlqM6ystyQ7oNRU1kN93KozORLCyxNobhYSmiTvZ843WsZvuekZyEKXY3ScD1 Zbm3e95GJGoCWL3OUvXqTddjwM9saqs5EhOgh41nTRtFednYXyA+fJPntq4sB5dWrtFL HF7gz4Ww5FqDxu6Pbzs/NNL2/Z7glQ5zw3HUtiALCHaZFZQQm9YeW7ZNMyvB9tvI/OK9 W9Z6gnMK1Ym354p9Z0JpKi24mrL4pA3uaDuuIMN0YIctrG5EuBGf56TafE3COIi6e/YI bxAw== X-Gm-Message-State: AA+aEWbQQ5l0TZBwxSHd8ujtzlrz2glIblvkpZhJ+YCbavx58+/vvQou m9rqWnSHpG0lr+6gSF7zWfMhukEzd6c= X-Received: by 2002:a1c:1f81:: with SMTP id f123mr1453189wmf.64.1543494694339; Thu, 29 Nov 2018 04:31:34 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:3580:6f80:40a7:5bdd]) by smtp.gmail.com with ESMTPSA id c7sm3089525wre.64.2018.11.29.04.31.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 04:31:33 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 29 Nov 2018 13:31:23 +0100 Message-Id: <20181129123129.25095-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [edk2] [PATCH 0/6] BaseTools: get rid of MAX_UINTN X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laszlo Ersek , Liming Gao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" There should be no reason for the build tools to care about the native word size of a particular target, so relying on a definition of MAX_UINTN is definitely wrong, and most likely inaccurate on 32-bit build hosts. So refactor the code in CommonLib and DevicePath so we no longer rely on this definition. Cc: Laszlo Ersek Cc: Yonghong Zhu Cc: Liming Gao Cc: Bob Feng Ard Biesheuvel (6): BaseTools/CommonLib: avoid using 'native' word size in IP address handling BaseTools/CommonLib: use explicit 64-bit type in Strtoi() BaseTools/DevicePath: use explicit 64-bit number parsing routines BaseTools/DevicePath: use MAX_UINT16 as default device path max size BaseTools/CommonLib: get rid of 'native' type string parsing routines BaseTools/CommonLib: drop definition of MAX_UINTN BaseTools/Source/C/Common/CommonLib.h | 25 --- BaseTools/Source/C/Common/CommonLib.c | 206 ++---------------- .../Source/C/DevicePath/DevicePathFromText.c | 4 +- .../Source/C/DevicePath/DevicePathUtilities.c | 4 +- 4 files changed, 25 insertions(+), 214 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel