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 78608423C5; Fri, 13 Jan 2023 17:41:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BAFB410EF; Fri, 13 Jan 2023 17:41:37 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 0B56240E03 for ; Fri, 13 Jan 2023 17:41:36 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [RFC PATCH v2 1/3] eal/windows: move fnmatch function to header file Date: Fri, 13 Jan 2023 17:41:29 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8766F@smartserver.smartshare.dk> In-Reply-To: <20230113162001.519534-2-bruce.richardson@intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC PATCH v2 1/3] eal/windows: move fnmatch function to header file Thread-Index: AdknavLnkUv50+KMQca387EOTq9jcQAAb8BA References: <20220829151901.376754-1-bruce.richardson@intel.com> <20230113162001.519534-1-bruce.richardson@intel.com> <20230113162001.519534-2-bruce.richardson@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Bruce Richardson" , Cc: 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 > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > Sent: Friday, 13 January 2023 17.20 >=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. >=20 > Signed-off-by: Bruce Richardson > --- [...] > #define FNM_CASEFOLD 0x10 > #define FNM_PREFIX_DIRS 0x20 >=20 > +#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=F8rup