This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [PATCH] posix: fnmatch() support
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Peter Korsgaard <jacmet at sunsite dot dk>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Wed, 24 Jan 2007 11:55:46 +0100
- Subject: Re: [PATCH] posix: fnmatch() support
- References: <87mz48u3sk.fsf@slug.be.48ers.dk>
> Index: packages/compat/posix/current/cdl/posix.cdl
> ===================================================================
> --- packages.orig/compat/posix/current/cdl/posix.cdl
> +++ packages/compat/posix/current/cdl/posix.cdl
> @@ -329,6 +329,22 @@
> }
>
> # ----------------------------------------------------------------
> + # fnmatch component
> +
> + cdl_component CYGPKG_POSIX_FNMATCH {
> + display "POSIX fnmatch configuration"
> + flavor bool
> + default_value 1
> + requires { CYGBLD_ISO_FNMATCH_HEADER == \
> + "<cyg/posix/fnmatch.h>" }
> + description "
> + This component provides configuration controls for
> + the POSIX fnmatch() function."
> +
> + compile fnmatch.c
> + }
Hi Peter
You need both strings and ctype. I would make the CDL default value
dependent on both of these being implemented, or include requires
statements.
> +
> +/*
> + * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
> + * Compares a filename or pathname to a pattern.
> + */
> +
> +#include <cyg/infra/cyg_ass.h> // assertion macros
> +#include <ctype.h>
> +#include <fnmatch.h>
> +#include <string.h>
> +#include <ctype.h>
You only need ctype.h once.
Otherwise it looks O.K.
Andrew