From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 081E5A034F; Sun, 21 Feb 2021 10:00:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E977422A290; Sun, 21 Feb 2021 10:00:04 +0100 (CET) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mails.dpdk.org (Postfix) with ESMTP id 472F922A282 for ; Sun, 21 Feb 2021 10:00:03 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 21 Feb 2021 01:00:02 -0800 Received: from HQMAIL107.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Sun, 21 Feb 2021 01:00:02 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Sun, 21 Feb 2021 01:00:02 -0800 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 21 Feb 2021 09:00:01 +0000 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 21 Feb 2021 08:59:52 +0000 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 21 Feb 2021 08:59:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L8bF6ySKx9xRmQCkQb518TocbFo0eDWkrZXbmX+qrIDFVpfglif0NLuG7d3x/ex+8vj0Z3NtEI5ZOrBqIIe4tnE23eDyKg2Dh/MM3cPVXqF6a2dEyXSOHmolcCY6iYhDDA/N1IE+uXRuWKGV12pFruXNwpfxoVbaDBKhqdZY9I13h1Gp4zPKf89SbIQE/QuXLofy5NMAEWxXCA7Db6Wh5cBsKraz1FGhIYXnc/JIEX9AlKemmC4vtfvmDCfGHRC2D1I0P0hTHuz8wU7ovsOgfKIf3dCHJMkaaNCeqi8DFq+zlkcHsudrsiSPO1f5REOC+9ztKXCGxrtRNETSaEXvpw== 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-SenderADCheck; bh=jZyBYrV2ABBGf7Ls9cHIJzNHLvTNFFMsstf7UA4vxQ4=; b=PARysN+jRDRTc5cFvXf/2O/ykPbBRPbB7t1PrKXz2hlGUSqprPWEqmMEnQ0AiZSJ6oxITXASuhB7NRPZu1XEIT2zoh8OT4U7Mpq3s5Oe86AGhBBEMH6vF9rtD0NIxGhQJe4iBBiFiTdUi+mT7Rcke/TOi3cA2Ti4ogZLi2tJMRkvNEkp2NcPRT8d75vs+vwLJtnlSmvw0hRyFPIh1v+SxzMzFDHs7UTHIvr+vyKgDryscSfcwyjZGtCsyxXehr5RXm9CGfkLFsUCoulLtkqz/jUgZtIvFaPNFakzDjt0Yb0k1Bn6UIGSYrSleg+I3kSeM7vlZZvFTyy9uXHXws8wfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3945.namprd12.prod.outlook.com (2603:10b6:5:1c2::27) by DM6PR12MB4169.namprd12.prod.outlook.com (2603:10b6:5:215::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Sun, 21 Feb 2021 08:59:50 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df%7]) with mapi id 15.20.3846.041; Sun, 21 Feb 2021 08:59:50 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk , "dev@dpdk.org" CC: Tyler Retzlaff , Nick Connolly , Bruce Richardson , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam Thread-Topic: [dpdk-dev] [PATCH v2 7/7] eal/windows: do not expose POSIX symbols Thread-Index: AQHXB/EOT8IRXXdVdEK3E9rW6NxulqpiTUew Date: Sun, 21 Feb 2021 08:59:50 +0000 Message-ID: References: <20210220232910.772-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-1-dmitry.kozliuk@gmail.com> <20210221012831.14643-8-dmitry.kozliuk@gmail.com> In-Reply-To: <20210221012831.14643-8-dmitry.kozliuk@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.56.206] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6da93122-849b-46fb-1292-08d8d6470c02 x-ms-traffictypediagnostic: DM6PR12MB4169: x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:923; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UnVgQvy7XUEe2bf7VdtA8B1QjzqUALwAREhPf0pDe3Bw9DOJyu5XGSUboJaBBa10m5gEqrzR4Cn1uugiyW+MqvPNopSTce3KR9xysqFCrF3La6CTNEG5xCNA85fBI1j+FJiUo9cM9Nl1UiyLiJVdn+n7BTyJ+fLFpXrdBKmXTs/yIipfUpGzgw8dCcKDL+0WypZxZxyYbcFt+ZGcR6rrzHdo+Mshg0r/xk1lAS4OxyIjMKMSKG0/Wq/vE00fcEEoQnjbyZLejDzx53nv7GqZIxrpxR2YSM5nn0VIr5Nrd8+24zwd2rvE9ipMwq2LYAxv6bbslVv99QwuKY22EXo2fEnxOgSywQEVsoRxaVQCaq1cTNcZ2GHLP8oxELTrkB+CjmjpZl81hkuFWQLisWjzxuUvff/OETrg8L8uHnW2QOjwXurC55EKiENzeZRlyXZkS0WFQI6a0By8GRUs24NrfLXq5Z5HEv9hWRxe+tKw8A9zJBNCBLFusOT4jeL77Fk5+F40QbyvFLs1zteCfOFN+Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3945.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(396003)(346002)(376002)(66946007)(66476007)(66446008)(66556008)(64756008)(8676002)(6506007)(71200400001)(55016002)(9686003)(8936002)(52536014)(4326008)(186003)(2906002)(5660300002)(26005)(33656002)(86362001)(316002)(54906003)(110136005)(478600001)(76116006)(45080400002)(83380400001)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Lz95u3dkRXvH3vw2YlL3D9MR4onDZS2fU5URombRA9U0JZ7YqupaQiNpM6Dj?= =?us-ascii?Q?yb373xM+jHnrWBgTw7O0nn8oR7JPzRCkf3z4yZZq2iCcGzhE+w63d12zVQc8?= =?us-ascii?Q?LUqsZVntR8NzAGTPziHX1BFzgMzkTsIQTLvdVpuiHraDKJ8Own361wejpiff?= =?us-ascii?Q?CBP66FRDTvDRV2bbTZXmv1l1gKlNyieiOopW2BRFWdssN15Dm9VaTt/tHqXJ?= =?us-ascii?Q?heHQqzjc7mro5eT1HaE4hiF77kv87te+8/KmfQ7b6i+Z+cEtPuc2hz6o2WKr?= =?us-ascii?Q?k5yu22E1sNkW1fGfK4Ky9rEor47pfb2eH8caPUEbYQyRMvqhfYSI+2HQeCGv?= =?us-ascii?Q?+OfBjfhHUnvbxauag/mvcKNZvlxaAWWCQxB3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gecFU4gmZyjtwQ07QJVQSBZARTZ0DKSsdcwwawx068F?= =?us-ascii?Q?Ydv42FqTH8Bk43632LoJXBo8?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3945.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6da93122-849b-46fb-1292-08d8d6470c02 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2021 08:59:50.4630 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YlwWAr6sGGnGmRyNVj70JCgiBzTNw4vZTWqjqX7j6TxOdunpfRP5ubru7VO3iqW3ZTjtxz9/oRJPRqarG2oJMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4169 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1613898002; bh=jZyBYrV2ABBGf7Ls9cHIJzNHLvTNFFMsstf7UA4vxQ4=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs:x-header: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: x-ms-exchange-transport-forked:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=Ilr+GctaALsMEE5UPwekemIwEnw1H824h5PFQyKMZjxjCW8iWlrcYzUgL0u+mJu0d hRQPjTSGElX+ERkggUSic6jSSUghGefIMgC8KDT39u94MgQ2ZLZ9mVNXiHJgVazOl8 Yjo1T4TZSK97Nt4jONc2HJ2IBqyLRt8mcKk0GOpxYq/bkZcaLwvd3yzP1fFZ/Al4pU NsMWP1tS/SNWl+g0wuWR5p8ayy29K9VzTEZ/8tuJJ//Rjyt3Z91A3N26JMKKOTEQSx EqSOo8cpzZjPUF3kj0MSxQXh42m8Fz4cO5RxD+uWM95YE4J03vcRj5OSSzHZGH2EIS RfMpj4Aw0UmNA== Subject: Re: [dpdk-dev] [PATCH v2 7/7] eal/windows: do not expose POSIX symbols X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > Subject: [dpdk-dev] [PATCH v2 7/7] eal/windows: do not expose POSIX > symbols >=20 > External email: Use caution opening links or attachments >=20 >=20 > Exposing POSIX symbols could break consumer POSIX compatibility code. >=20 > * Make renaming of close() and unlink() private to EAL. >=20 > * Remove renaming of strncasecmp(), strtok_r(), and sleep() > in favor of using EAL wrappers. Similarly remove PATH_MAX macro. >=20 > * Replace index(3p), which is not available on Windows, with strchr(3), > as recommended by POSIX.1-2008. strerror_r() is only used inside EAL, > rename it only where it's needed. Same for asprintf(), it has an > internal EAL wrapper and is removed from public API. >=20 > Signed-off-by: Dmitry Kozlyuk > --- [snip] > diff --git a/lib/librte_eal/windows/include/rte_os.h > b/lib/librte_eal/windows/include/rte_os.h > index edca11bd2..9c9c31214 100644 > --- a/lib/librte_eal/windows/include/rte_os.h > +++ b/lib/librte_eal/windows/include/rte_os.h > @@ -6,15 +6,11 @@ > #define _RTE_OS_H_ >=20 > /** > - * This is header should contain any function/macro definition > - * which are not supported natively or named differently in the > - * Windows OS. It must not include Windows-specific headers. > + * This header should contain any function/macro definition > + * which are not supported natively or named differently in Windows OS. > */ >=20 > -#include > -#include > #include > -#include >=20 > #ifdef __cplusplus > extern "C" { > @@ -22,101 +18,18 @@ extern "C" { >=20 > #define RTE_PATH_MAX _MAX_PATH >=20 > -/* limits.h replacement, value as in */ -#ifndef PATH_MAX - > #define PATH_MAX _MAX_PATH -#endif > - > -#ifndef sleep > -#define sleep(x) Sleep(1000 * (x)) > -#endif > - > -#ifndef strerror_r > -#define strerror_r(a, b, c) strerror_s(b, c, a) -#endif > - > -#ifndef strdup > -/* strdup is deprecated in Microsoft libc and _strdup is preferred */ - > #define strdup(str) _strdup(str) -#endif > - > -#ifndef strtok_r > -#define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr) -#en= dif > - > -#ifndef index > -#define index(a, b) strchr(a, b) > -#endif > - > -#ifndef rindex > -#define rindex(a, b) strrchr(a, b) > -#endif > - > -#ifndef strncasecmp > -#define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count) > -#endif > - > -#ifndef close > -#define close _close > -#endif mlx5 uses close() in mlx5.c and is broken after this change above, BTW why = not add an rte_close instead of local definition? > - > -#ifndef unlink > -#define unlink _unlink > -#endif > - [snip]