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 35FB04238D; Fri, 13 Jan 2023 18:37:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81518410EF; Fri, 13 Jan 2023 18:37:20 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 628AC40E03 for ; Fri, 13 Jan 2023 18:37:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673631439; x=1705167439; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=mk3spPRGChrqt3+dx3frfMYb+vQM5e21VS4KgIMfxuw=; b=amG34YJY0MZiFYNcjS4HD64zHx5RLfd25Ci2O2su1lhoqNORicStMrlg 3wy2hmv2UyGYA/YmwXcwQMIeC84edkrzr9RNaxIv4ipVxpf+HJyCntNQP uOX9sesgeZTrLae0mpJ/yq39l1m1Q6oCR8dT6E6H4J6dhnsucwOng8MSN hJ01WpIFmJG80iIzoOtkQfm+TrL7d8Nb2SZeCHPkRW7C6/swisS5xEhIJ w9kIPAinRb5mnchcIYCkF4VIBbi8rBRmB6j96+sOJKknCWE7VlQoMpYsZ S5O6gY2/RCHDbQKR0Q3J81S5xcRJJJAaFwzcBUqcGPqFbSW+f+BhFHJ2M w==; X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="303746233" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="303746233" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 09:37:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="832135682" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="832135682" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP; 13 Jan 2023 09:37:18 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) 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:37:17 -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:37:17 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) 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:37:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HyOlWF6jDcdyW0afisskzsjZ2rLvEsuDu1A+OnRHbgohQjKvHju2xsCJVjnkJyxFA2RP7OLLwD1U2oShrgqwDcU5P3jp08tnfO7e85bYRpLMyeANQ3x0Hw6sE3kbOLDZj7ra+W+AOjCzxDK4jkpMJFYFxtEChp1r+MRtAAkmSwuLAzL3TvKAeEC9IswXGDx7PjS1u4oseANdUq4Zz0AXRhcAmsmZztYck9K5RYeIv/aMogS0Ds2PZU8cu0i5Va3yG7bDsoaI6+ns8l3KULB/jJ0d7EQ+N/Hqabagi0QwD1cCVsmSUx8GoUmL1KbxCeaC5INJMzFrFTm9kmPhzLSuWA== 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=O2oI3xl293Ul9HwZj3GUNXhIbS0P/XDpEAv82F4HGMk=; b=fplP4cxBDp9ftY5VUomTWzCyi6ZKxwVibxXL0ifAcCT3PVG8drIeiYJ/uwddgjvPT9M5VZ14sw+8nQ7ft6FjqA2sS1wNBMUD3hmRRHrX0igG2RMrT/FfJ/vcFO4Dc+iFaUnay3zBEfFzOz+fDXWlyiS+2RJyqrIqcgTSF7fUOvMUHSBYuTgKDElTdwrjMcsD303FGKyElzwCGd1N0lF4RWMMN5B7cIFGAgAOPX5Xy+WuzUeWLkW3vossXUMtpVlqdkwV5yNUHoYxA1IpV0rPNb1drOz3e9jrTb2Ed098sioULirP8C7VAjoXUgtqVFpZlBNRWYr/UgIro1XDlJUIeQ== 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 PH0PR11MB7614.namprd11.prod.outlook.com (2603:10b6:510:28f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Fri, 13 Jan 2023 17:37:16 +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:37:16 +0000 Date: Fri, 13 Jan 2023 17:37:09 +0000 From: Bruce Richardson To: Tyler Retzlaff CC: Morten =?iso-8859-1?Q?Br=F8rup?= , , 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> <20230113173126.GC28592@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230113173126.GC28592@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-ClientProxiedBy: LO4P123CA0550.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:319::20) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH0PR11MB7614:EE_ X-MS-Office365-Filtering-Correlation-Id: 14a3af20-a7ab-4b84-d291-08daf58ccfee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6ExiwLscm6tUvzvtDXjl10qQqYFi86vR9yqil2cv6JGQy8yJ3k4L6jNjt8nbvjRJd5tBn1N5VZqH2KcVAezCfxWXVbr67HxknQ89se3W9OGFUU755fBL075qE9FqQT6gBn4JaMuFTw7cWfnJtv37qhNpt7UcSTvi1sjGI4+eqA1D3fUt7MuqZ61Jlp3ekSjrD9iINoYyp4tmknR85vRvnoLdO792jTtkYxHYpX/panLb+O3+HsdU6Yi5+/NF4NkYmSKctZYQwwrQvTu52Us2ecfX7FsA5fDzNDh7vsxjkGsNcoybUEHzQKsqbaS4lkXW1f2rCk5DtCuj8ZePT6+rAvqkgZv3byoajUvSLvyevMjgX9limvAGDazY/fZYNovdtZJy2pqWB+rdhDoL/3m7ydkskDYBOpcp2uNQsOInsQPSa/SUpb9gpEKA1l90f/4AQVEsEWN9yWJ8MjElkA7jOjZLmA6AXT3uCT2XmEsS/viRhY9dzo12Nc42A8YzUUTgxf+xYOydVDVizUybGfi5asBd2omyvyqDcsNtt4xt1IVI+GlPwcXJlnfSQt8TXiMWedrd41AYAbpYtSu1qiQTD5MSftbRbYUDgyCRO2USTOjGhiI3pm6acmUaIyk1lBhkJjSnJTeVmHKe/Gh/0aGlIQ== 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)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199015)(4326008)(66946007)(8676002)(66556008)(6916009)(41300700001)(66476007)(38100700002)(82960400001)(86362001)(6666004)(6506007)(6486002)(186003)(316002)(66574015)(478600001)(26005)(5660300002)(8936002)(83380400001)(2906002)(44832011)(6512007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?76OKODjM941QEwqGjAbKdqJgSYEZ3Ogk2XISIenDjrdB+nfmq3B89c2cH0?= =?iso-8859-1?Q?CQKr6loAz8jln+eoDzKChnLzxCfcOUNlZ2OC0r8AVEw7rTbeuhYsfDi7pe?= =?iso-8859-1?Q?KwgITPEnAqPTlfpd6QOUAwDPaI+he87S65h08+tiaKrA16TLxIpCgSuZOz?= =?iso-8859-1?Q?J0y4obcTT55fY7FXJ4d9Ooj3CaBRVdSRJ0lVGRgmbrFOrjxLzdnTPf7q85?= =?iso-8859-1?Q?H7k9NQ43ENfjq+4xstJMpPHP7YhW9prBUxmJ3hzaQGxJBhoHz3X4X9GrV/?= =?iso-8859-1?Q?qkYkz4yRYA+N8J6qY6bN8jjp4uITadL4a6K6zCBmZK/crvtU3iDu9AVmRH?= =?iso-8859-1?Q?z4uXNY4hNGnLxd1c8CUJlg3VsF0pVV1X7uum40XghT9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1MdEW5FGHTzz36ScPx0ujadyHnYlBw0l2N+b/uXn8kI8zsojn?= =?iso-8859-1?Q?1H4e6/kffbbBFHSTj+4JVK8E+GrzTZsfCrR13fqB0Lud6N8n1pxhFMRVAs?= =?iso-8859-1?Q?WxGGahDebemkPcWLlHeKY+z2t2MO4b/Szf0VR4cyuBY21jeXyhTOe4b6O4?= =?iso-8859-1?Q?zx4vjn53ICF6v3isH9mwP0FS+PjT9KwKj87do21JB8FZERR5GSON5hO4cJ?= =?iso-8859-1?Q?vRVPAqqxf1GTckmNtZ5euPRThMiaSVtR1DnIIpsG4+dC5tMyJAdPwqHDFa?= =?iso-8859-1?Q?l35PheisQvIb1CHcfmjxz9rOeSN97pGWDOFC8VPRgpDFRMEa/t1JjWrI+7?= =?iso-8859-1?Q?dssxpeAcYFOTNpF16kApgYjfQ4zeW2ft0XQhbyPXxMalwtIhn6pD8atg?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 14a3af20-a7ab-4b84-d291-08daf58ccfee 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:37:16.1110 (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: hNLBADk3CdGtrFj3YDtDGaxAWXEPsyTyw4Nfc7SlMRyJzUodWy4x2pNavKmpzCQkOyLzXT+W8LYDgyuKdimj2uORFD2R7jCnRP3Xc4zCnVY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7614 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 09:31:26AM -0800, Tyler Retzlaff wrote: > On Fri, Jan 13, 2023 at 05:01:20PM +0000, Bruce Richardson wrote: > > 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. > > and if a future collision occurs we should be able to adapt without > compat break. you know for platforms that step on the application > namespace... *cough* legacy windows headers. > > thank you for doing this Bruce. > > Series-acked-by: Tyler Retzlaff Thanks. Seems there is some support for the changes in this set generally, so I'll clean it up a little more and send out v3 as a non-RFC version. Main gap I see right now (having fixed some checkpatch and build issues) is the docs. :-(