From patchwork Fri Nov 30 22:45:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152608 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4211826ljp; Fri, 30 Nov 2018 14:45:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/UDzgnMsn/yyWUV46VdC+3moMC+a/0iimXX44V0dNziS/EdfvY8HK2VcChwQ5fST5r8FDHt X-Received: by 2002:a17:902:708b:: with SMTP id z11mr7258500plk.203.1543617946927; Fri, 30 Nov 2018 14:45:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543617946; cv=none; d=google.com; s=arc-20160816; b=1GyeICnPzaXM59Fqujea/NitVae+dS5kwLfNOWHPM5PFqxnqMpuzOVo9YuqBks4p2P 3oRGt/gZrVkqlRgUn3IgXjfUFY8WdqUcuKuONFnwKQ+YxQcCdccCnAGk1ZUeScK+bQrg CEO/14rwfQTHV3I4br1VQole5C8Qhjpsyds5sT4RYoTeGjM0/AgA40umEDLOwexCgs02 TWX4ifr53gZeh7Tnqe5/6ig2ELYhDNDucfAPFvX9LmACsAK/QdRMLMQpE2zAZ6b/Y07+ XyU9jk/dp3MNNV4pywWfLXOqk+BPaACf9iPstXymKWbxIM+LbIwfWpBduP+bs3EF+1UD UIgA== 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=NY0U4cwXjh3gs/Lq4SVlpJtKFhGSHKtNoA+UzSpaMh0=; b=PFfE+BMBFzeIfm0q40TpCCjDpcQEN4j7PxUWUlQthYTR2trfWVvBdgRRLw7EYURXbh jBOHQnMYC8uGH2zmd33q2o/aX+FRqiTZ6qTIozgwbFo7N5OHZA6FcGGGJ5H5vhVMPcWD TF/5lIuM8wR63nDPnO8Bm63mDR28HBnnWg+WjOiSo3Gh1zpb4vd7u3HGz/WXLubCVla7 TK5OvbUvK0MGkWaCb4QjVsDXrVtLBlYNFp0ev0sq8I+szLmhedLhehQgL00RcoCX2ZYg TzCYgz6YfMKzkGb1PyjQ+uArBn3285EqL7a06KMFPDj8aUNOb/ny/cea0nVWjwVcl5uA aeWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DlOop96t; 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 i5si5176795pgg.279.2018.11.30.14.45.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 14:45:46 -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=DlOop96t; 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 3B10E21196804; Fri, 30 Nov 2018 14:45:46 -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::444; helo=mail-wr1-x444.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 AC214211963D9 for ; Fri, 30 Nov 2018 14:45:43 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id z5so6703646wrt.11 for ; Fri, 30 Nov 2018 14:45:43 -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=4Uy8Bp4M8idmWCFRJIYIS2dQLLVPHhT3WBpuTEGJi6I=; b=DlOop96tj7B+HsOX2f+bVCO0ttz7uK+rNxiO6qImApKlzb7Cztyw7IkW6YT3IrS9n5 8RG3pw3uIhZakrjCTFGJoW8u2Py5Kvfh7mayfm7Osih5n3MSkFIc7iPmEl0th5oYx8Gk g9wtM5s+OkfcRIPMEeLwvcUDWsjuBf7Oybuo8= 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=4Uy8Bp4M8idmWCFRJIYIS2dQLLVPHhT3WBpuTEGJi6I=; b=Cgd28eWBXIpeY/jLRkb4yuFgpoGCMucpw362dVhVFfwAtC5Ewvf8RwQcxLHMN39sFc T4E7hWToko8a2f7OkpIJ1F8vtxSRzkVsBFCa+8w5SLjwtOc5EKF8RM3fg0R8DB/eXAIU 77qUvXF9FHU6c7oGEOw50cAAKC3ZHcwX7UFN0N4C64EoTvrPMkre9XUn3A/l+ToYV2zm JUwGOy5+O/okx8xGhagnQOBxZ9SE6V0WU0J8IViZ18r98oRyTG7Gra335nJUg3l5Zn/v musZDvxID5Lx94A+3uCBiLs+0PNpbph3HRp7i2yYMwy0PKOG25eZCTjZujgBB+Snf4u5 uQKA== X-Gm-Message-State: AA+aEWY7gbeLio+l7Y91hDSpaLIfnABNBY2t/iIY/lL+0jLupYefPF2R ng0iVHADFOOaxXuGo+iOmjWsBvFXu/8= X-Received: by 2002:adf:c44a:: with SMTP id a10mr6511645wrg.145.1543617941548; Fri, 30 Nov 2018 14:45:41 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:d895:e032:7b00:86cd]) by smtp.gmail.com with ESMTPSA id m6sm10561195wrv.24.2018.11.30.14.45.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 14:45:40 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 30 Nov 2018 23:45:31 +0100 Message-Id: <20181130224537.18936-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [edk2] [PATCH v2 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: Liming Gao , Jaben Carsey , Laszlo Ersek 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. Changes since v1: - miss type change in #1 causing a build failure on MSVC - add acks from Jaben Cc: Laszlo Ersek Cc: Yonghong Zhu Cc: Liming Gao Cc: Bob Feng Cc: Jaben Carsey 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 Reviewed-by: Liming Gao for this serials.