From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AFSGD/WO5Rwh0M7oxTPsuGowBA1tbpsWB75BppUyiFfurkYJSTYdqM1ShDrT4mtF8tD5sCGfpvF6VQ== 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 Cc: Ard Biesheuvel , Laszlo Ersek , Yonghong Zhu , Liming Gao , Bob Feng 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: [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: , X-List-Received-Date: Thu, 29 Nov 2018 12:31:38 -0000 Content-Transfer-Encoding: 8bit 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