From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B7650AC16DE for ; Mon, 11 Dec 2023 15:40:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LISKKA8Goe8eFKoOxqMG/EedvznZp+TpUIlQabFKbnk=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1702309202; v=1; b=nqOfewNL6/vkLhLazB2/LmS8aRb/l8TJNVklTvAXiIgOKkECwDwoMhGmzygiwnkZCu/4n6kU dzL8A50XQ4Ug0nBpllA4QhYpy/QMXN3wCSa/+E8FR4LsSJc8vrSXAjl3oOTt7jewtY6cP845Rsl 17mKsvebEl659VhFsq6R75lE= X-Received: by 127.0.0.2 with SMTP id TxlaYY7687511xCFjU2qzuNi; Mon, 11 Dec 2023 07:40:02 -0800 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.73]) by mx.groups.io with SMTP id smtpd.web11.11396.1702309201533518806 for ; Mon, 11 Dec 2023 07:40:01 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zk9GyRYhG/5R57avhtJ09DN0vEpwZU6XKv+AfQJWNnZNDPtPmH58oZOVclKwMFKzcQlXzBqSQIn/PslEJhskJdHXW3XDcdYewk9ioXzEbaFErIBPJb6Kktgqgr+g1xb7zsIZv6DIuciiGytjqrCjv8X5cI0q9VcHK8U3W30thp9Mo1tgjjXzsz6hvjAbc87oQ/XiJlYyTgLvBBeY92a/dpDKbe7vfjlNyaAnNI7Ky4/8e4oWsDLVwkV1sZOqlWGnRnoB2JMpa/5iq62d3rb1d95/vmHUvEVwGnAoYW5M5bneYroMT38CFzGRkM/TmaRNlCC+tlLpAtD4Eo2SA6+cxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZTxGEpHylM8gEnXV49dhwAV62eX55YTCDURFELHcp58=; b=NvGqq8OTAjUA9GtoLGOG5rN0IFyHCM7Da62SE2rKhaRJxa8f2Qg04I0Owf2ugtSrkGu5fDj2BOettu/vuG3ahlS0YoGIadQwkM+X52jpck5LaEqNj9nFzw1LGV9xIF4+Kc4ITzqyzTB8huS59czQetnCFAM/8imARm2xEHIbJx41/HQ47SNq08Zl5cHezyZtVKMVunxT4tdFm9GK3nGnubI3FipYzkCg6K8kDu6HHQcYwXt7E6b+WU2wqzLFTcpj6MHvoVfjFgDJPohrMS8lp0NvI6AQClPVvsGD826Xh/aDv6pprL8xT1lofRWeiRrZMKC2A0bmdpqMJoduIQ7rrQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from BL0PR1501CA0012.namprd15.prod.outlook.com (2603:10b6:207:17::25) by IA0PR12MB7508.namprd12.prod.outlook.com (2603:10b6:208:440::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Mon, 11 Dec 2023 15:39:58 +0000 X-Received: from BL02EPF0001A0FA.namprd03.prod.outlook.com (2603:10b6:207:17::4) by BL0PR1501CA0012.outlook.office365.com (2603:10b6:207:17::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.28 via Frontend Transport; Mon, 11 Dec 2023 15:39:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0001A0FA.mail.protection.outlook.com (10.167.242.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.18 via Frontend Transport; Mon, 11 Dec 2023 15:39:57 +0000 X-Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 11 Dec 2023 07:39:47 -0800 X-Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 11 Dec 2023 07:39:46 -0800 X-Received: from 9365154cdc6c.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Mon, 11 Dec 2023 07:39:46 -0800 From: "Jeff Brasen via groups.io" To: CC: Jeff Brasen Subject: [edk2-devel] [PATCH] MdePkg/BaseFdtLib: Rename standard functions Date: Mon, 11 Dec 2023 07:39:44 -0800 Message-ID: <2c864678a4ae43a9cec9825b7f408c140ba1f18e.1702309158.git.jbrasen@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0FA:EE_|IA0PR12MB7508:EE_ X-MS-Office365-Filtering-Correlation-Id: d400e358-7139-4e4e-b41e-08dbfa5f6e34 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 863RPMDON7hhrmIKj8cUD24pA367qJx9HtPmjeXX0FD5P47/JyRwar/yyLqiDYRMHRYbcAfIhp7AGJiREAdCVLpEiqdVC/HXmktotDVYqDBhR9o8phyTlOUhWerH1DdpZdJ20ifsVhnsUZ1eyn+6/3ObQG1kLfi+0rTEJSkRk6GTtd1NgQmeqaxNxS+T2hmqwoImT3QuIYxS5EptGdV61rJ2NF0o3IxcctmyTJ2syPEZzeM9RRbqlCwWzXRfc+DXCPKvCcw3m/IaHkF1UK+7wfmgOVJ/Ux7BI6u9xh2bdmYQDPCG+RtA0oKCpvlwRl3BEcgF4mRchLAkbv5+8j3wgKLwFZepqh4skmH3fRZ9hWIDZUusMEq+bOQgXdjq+bkUSWDQXlsLFEipJrte9Tq7xZuxMi0wviI+dab13TD/OM+E6m70YuDkY/NDMTDNXWcZC/Rk+yw0oWqg+D94KYjyXg+QGPNo/MJoKLfUWiYQEYhnyZVgZGBMSinLWnaaEQwDt4IAnDAW0gf9riwGLEMbjsQznCvjJHdowk0ayUKw1dz9FzFLExmSX9jhadFcyc0TY0WqzZ8h2/d12IRizk5TG7c6jXJrqXT07UCa/XHQ7qX3qQc+VK/FvcTHMzYVGRYLgGEfC2WT4mdbJoLk0DORVyE80zPWSzi6VcNjbjXmELaJauxJz+2E1cdI/3XPYntwsmGeVfHdh7MEfQKMAT6XGL0TqF6FEDbge8dVTzEv834= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2023 15:39:57.8967 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d400e358-7139-4e4e-b41e-08dbfa5f6e34 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A0FA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7508 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: X1vzDfwKGGEL5XQ8sGCbxbWZx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=nqOfewNL; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Rename the standard functions in the LibFdtSupport to remove conflicts with other libraries that define them. Signed-off-by: Jeff Brasen --- MdePkg/Library/BaseFdtLib/LibFdtSupport.h | 16 +++++++++++++++ MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 25 ++--------------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/MdePkg/Library/BaseFdtLib/LibFdtSupport.h b/MdePkg/Library/Bas= eFdtLib/LibFdtSupport.h index 393019324b..47beac9fac 100644 --- a/MdePkg/Library/BaseFdtLib/LibFdtSupport.h +++ b/MdePkg/Library/BaseFdtLib/LibFdtSupport.h @@ -68,6 +68,12 @@ strrchr ( int ); =20 +char * +fdt_strrchr ( + const char *, + int + ); + unsigned long strtoul ( const char *, @@ -75,6 +81,13 @@ strtoul ( int ); =20 +unsigned long +fdt_strtoul ( + const char *, + char **, + int + ); + char * strcpy ( char *strDest, @@ -93,7 +106,10 @@ strcpy ( #define strnlen(str, count) (size_t)(AsciiStrnLenS(str, co= unt)) #define strncpy(strDest, strSource, count) AsciiStrnCpyS(strDest, MAX_STR= ING_SIZE, strSource, (UINTN)count) #define strcat(strDest, strSource) AsciiStrCatS(strDest, MAX_STRI= NG_SIZE, strSource) +#define strchr(str, ch) ScanMem8(str, AsciiStrSize (st= r), (UINT8)ch) #define strcmp(string1, string2, count) (int)(AsciiStrCmp(string1, str= ing2)) #define strncmp(string1, string2, count) (int)(AsciiStrnCmp(string1, st= ring2, (UINTN)(count))) +#define strrchr(str, ch) fdt_strrchr(str, ch) +#define strtoul(ptr, end_ptr, base) fdt_strtoul(ptr, end_ptr, base= ) =20 #endif /* FDT_LIB_SUPPORT_H_ */ diff --git a/MdePkg/Library/BaseFdtLib/LibFdtWrapper.c b/MdePkg/Library/Bas= eFdtLib/LibFdtWrapper.c index ef6452914f..1a4cd573fd 100644 --- a/MdePkg/Library/BaseFdtLib/LibFdtWrapper.c +++ b/MdePkg/Library/BaseFdtLib/LibFdtWrapper.c @@ -18,28 +18,7 @@ // so the code gets a bit clunky to handle that case specifically. =20 char * -strchr ( - const char *Str, - int Char - ) -{ - char *S; - - S =3D (char *)Str; - - for ( ; ; S++) { - if (*S =3D=3D Char) { - return S; - } - - if (*S =3D=3D '\0') { - return NULL; - } - } -} - -char * -strrchr ( +fdt_strrchr ( const char *Str, int Char ) @@ -71,7 +50,7 @@ __isspace ( } =20 unsigned long -strtoul ( +fdt_strtoul ( const char *Nptr, char **EndPtr, int Base --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112308): https://edk2.groups.io/g/devel/message/112308 Mute This Topic: https://groups.io/mt/103110792/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-