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 9008A4238D; Fri, 13 Jan 2023 18:01:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4864B410EF; Fri, 13 Jan 2023 18:01:55 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 99BE040E03 for ; Fri, 13 Jan 2023 18:01:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673629313; x=1705165313; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=AcU2qLwMGgCWwrt+mE8IeqKEVYma2/53krY3hfBPqk0=; b=jRbigjL0TC79jOOMjo5uL0XCtytyyaHs4sSSq79lg3W4ZNvJtwqA8Cwa l/GltHGbzNHkifAHjNJPJsmEPYQ2khbmkNk/AInlFixBfX0UYcn+wver/ toquSy+PP5JDeDn0zFyLjyr1BVn/W2rBOOX+bfW7JY6YnGHjwPVXgFvHI H3AtQMreRkim+4bCh4d3sdXxUmpqPUf1DVmXrt1a4OdJoElf6SgOG9l8Y 9ky6A6cDhb/hdUIUO3Wh0+IQZDQzkiEV8jH2Xb2L4Thp/WGJjfNJ3nQWx DLFOaLVu0f57laI8bm25hIWSeXngnSljigE2I7EW9qUnshwxeldxXlaSa Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="326097891" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="326097891" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 09:01:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="903623654" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="903623654" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP; 13 Jan 2023 09:01:28 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 13 Jan 2023 09:01:27 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 13 Jan 2023 09:01:27 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 13 Jan 2023 09:01:27 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P5rB/eFFIP64EWsE+CtYfW2eyTIW7vElwF01zIdL3o350RYB50C/fOwmlodWMYuMm+ERoeQ4IANCOb6jCvtaVrzcBC++W1j90ZgR0r1oPQqeLC3R8+cSHWsrKS/JRpj8KF9lI8sDXufo+4E6nQRWw4Hp3oIjlyhOtPDanr2KFkkUu3+NNBfCCHNmwpxn8lP+pE1aimThVEVqyiIPT7o7OuVaY0AxUHoGTOGWAe0e21EKatmuQXZ0CxPkxNYzNUf558gsiyqel5kNo/XVgUHaZx7jWugsOoECxq5MTc9/sUUS9jBtQWCANRp8Az3xoPt28xnhBDE0BZK9eILikRIf0Q== 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=lDD2UizhoeFB2touNWNggd3WRkeuzxAXuKRtOq0zVC8=; b=YPqnCEjZw2G8Ycn2tjdj1CKqVd5r6LLAhkFms47XIvulxxsS2lvsdk+4Uy8bwX/g8UOzLNyZwxfK3m9m7SGCZ9AqA9Rpb5oojqm5Th3wQk/2rfrSKNtm6pawjqPjrOXfhTj5ImH90QJAnmFVVZug8VDflY4mMrrU7Ga3tNBn8UbzyksdRyP1ecg2zYEsFX5WQd514MhViRukyCEg4TD+FlrcT40vUXLT6z3LYJ+MNd2rFV6hIAgQgcWu8w2IV1YEANxZwdYm2h9PGwki+LPL3eVRHZEG3aX2nq3BwixjvQlQbKz5kztjbz5Oi8Yx5vFvEfnZbKpxFI0AAg+zvHXQWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by MW4PR11MB6960.namprd11.prod.outlook.com (2603:10b6:303:226::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Fri, 13 Jan 2023 17:01:25 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee%8]) with mapi id 15.20.5986.018; Fri, 13 Jan 2023 17:01:25 +0000 Date: Fri, 13 Jan 2023 17:01:20 +0000 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: , Subject: Re: [RFC PATCH v2 1/3] eal/windows: move fnmatch function to header file Message-ID: References: <20220829151901.376754-1-bruce.richardson@intel.com> <20230113162001.519534-1-bruce.richardson@intel.com> <20230113162001.519534-2-bruce.richardson@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D8766F@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8766F@smartserver.smartshare.dk> X-ClientProxiedBy: LO2P265CA0461.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|MW4PR11MB6960:EE_ X-MS-Office365-Filtering-Correlation-Id: bc7ec7d8-9f7a-48b0-c5b6-08daf587ce05 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9kyiszrU9AEZiSXtBOR4wl9RXPk2Og8aiGhrlAs3J5w0V6rnhvwOcZhgsq8aQpo410xstfipWAMT9d/i0d7M3/gYOkgngVQ+zKoVVyFraC5316RELt+l6F+3g/Fg5BzH4sNw1QKm6mrKEiYHjhbJIGNu3kK8MOhYHlomcldwdofELQQ74mQmiz9EOV1m1HIPjZrbrl8NjLX35hXRDY4dbaIWeFavL0njF2W9Zy/2jsOgQ+kTeoD/yI1p6IqqOAMuZfrZlsUnHUph3XZb8xdfv8dApGYfmsJ3ZisNHhSaayZpUx3UIV16YCmbte9WWEbxc1lECJiEAyRKl/yyaQltDVSUlpDZOiXtcee8JdTapmOVqYrVNDMPqE61+pAJH3M6ZbOIdDe5LpdbGJ4TgPVjTb+MVfWvK2hk3c9nEWne+YxQT5par5Q5BXRflTGv36LLpzu0zwFKdXk8dHUcjxJ9hsxRyeWI5MnycZmUiLm8FjnS+xHBvuDEI/x1NBss9TvoJFkhi8QnDBcLfIpkbLgsEvRaSZqkY0VVRoFPKfkLngruoDlHLiPX5+rjhISRKcKThuHmtSGPbOjn8SkUafr6CemlW/sCBsmscjiSeu+zbmaX4ETphKHpOcDw52FaJKoWGqCfsV8esoRvZPMiaIejHQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(346002)(136003)(376002)(396003)(366004)(39860400002)(451199015)(83380400001)(66574015)(82960400001)(38100700002)(86362001)(2906002)(44832011)(41300700001)(5660300002)(8936002)(6666004)(478600001)(6506007)(186003)(26005)(6486002)(6512007)(316002)(8676002)(6916009)(4326008)(66476007)(66946007)(66556008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?TFgwlPsWH+NNcFArNc7wHN+IS/RY0PnItUGhdlXTrjI+Iqz7bLTonErXmH?= =?iso-8859-1?Q?+ggiGIiQ4xroUcWn1DYHaGdFhwX2V/p8F6Lv8PFEZ/Y12sI+XUvxEUKYWr?= =?iso-8859-1?Q?S5qAUb7DiD5AktRaFTNbROHjUMKjEgzyyQePwUZ0LIgQrXdWWH+HFK/68w?= =?iso-8859-1?Q?0eq6/Q7XtQ6O7cWUexRc5iemLV8NRoSi6NucFK2umabPk4fbpr/uaTgCyq?= =?iso-8859-1?Q?QtxT6ilKmR+m7FX0FUHTjFAvqtF8Shmx1ELKuA22auQ+g7KDi2aTgAM4d8?= =?iso-8859-1?Q?T59FU8Flf4g8fjzirPVspKwQ1EDkM9a2+/OVanm1zNDja/6l9Z3MooEpai?= =?iso-8859-1?Q?udBNBYGsHyber7ck3AiQ/gwyFca1uggjWoxsqhPZfdOGkMT+fbulGwrqmW?= =?iso-8859-1?Q?InsfkvpjK5SEEjo3shGLEWB0xLbpK41La1FpIGgsB1gIrfHSmw0x0i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5eCI4Kqw4E5xaPT2JdSnCJwX5Cf?= =?iso-8859-1?Q?AU3cBQoPkePDbTYD2NmlvQtubcb1bzZmMBEST6S3uX8E9imvUGN440tWGk?= =?iso-8859-1?Q?yuh5s2MqPnLbjBLO2uEo1ho3eFM02UEtyeEl82FgORaXRWO3yuVkN6qfS3?= =?iso-8859-1?Q?dBsujD63CX32xJjVsK9INM6G0AAndkj9NwO4kKDVIzuFG20/Ajwt+qFaDo?= =?iso-8859-1?Q?9rVuMy/QmE3iX0HV2VRDqIj1D9PZgIJoRa/2ZUaokxnItLcm0sPrEs77mX?= =?iso-8859-1?Q?fg/p5TxlulchAaFFm5X1P0DYD+tpMTjeAF833g0Hs3Xhb2GOASNd26oA?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bc7ec7d8-9f7a-48b0-c5b6-08daf587ce05 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2023 17:01:25.4877 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pD2QhBBsYKwyW6WCMNKRChcrSzCH/PN2B5Q8XD68gumglaCkrGlDi4Tr5vk1uO5iwG6azka0exQ7LANwogOW2Kk2TquIYDbw8P4LfdligCs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6960 X-OriginatorOrg: intel.com 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 On Fri, Jan 13, 2023 at 05:41:29PM +0100, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > Sent: Friday, 13 January 2023 17.20 > > > > To allow the fnmatch function to be shared between libraries, without > > having to export it into the public namespace (since it's not prefixed > > with "rte"), we can convert fnmatch.c to replace fnmatch.h. This allows > > fnmatch function to be static and limited in scope to the current file, > > preventing duplicate definitions if it is used by two libraries, while > > also not requiring export for sharing. > > > > Signed-off-by: Bruce Richardson > > --- > > [...] > > > #define FNM_CASEFOLD 0x10 > > #define FNM_PREFIX_DIRS 0x20 > > > > +#define EOS '\0' > > Careful about names in header files. Perhaps EOS should also have the FNM_ name space prefix to reduce the risk of collision. Or even better: just use '\0' in the code instead of defining a special name for it. > > > + > > +static const char *rangematch(const char *, char, int); > > I don't think rangematch() is a POSIX function, so similar comment here. Prefix with fnm_ to reduce risk of collision. > > With those fixes... > > Series-acked-by: Morten Brørup > Sure, I can prefix those. However, since this is a non-published header, private to the DPDK build, the only chances of collision come from the DPDK files which include the header. The objective of making it a header was so that none of this ever leaks outside of the DPDK libs that use the functions internally. That said, there is no harm in prefixing either, so I'll do so in any future version.