[PATCH 8/9] posix: Use enum for __glob_pattern_type result
Paul Eggert
eggert@cs.ucla.edu
Wed Sep 6 04:18:00 GMT 2017
Adhemerval Zanella wrote:
> +enum glob_pattern_type_t
> +{
> + __GLOB_NONE = 0x0,
> + __GLOB_SPECIAL = 0x1,
> + __GLOB_BACKSLASH = 0x2,
> + __GLOB_BRACKET = 0x4
> +};
The identifier glob_pattern_type_t is not used elsewhere, so let's omit it. This
makes it clearer that we're merely defining handy names for int constants, as
opposed to defining a new type.
Also, names like __GLOB_NONE could cause problems when Gnulib is used on non-GNU
platforms, which might use those names for other purposes. As glob_internal.h is
not user-visible, let's use ordinary names. I suggest GLOBPAT_NONE,
GLOBPAT_SPECIAL, etc., as done in the attached patch, which I installed into Gnulib.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-glob-Use-enum-for-__glob_pattern_type-result.patch
Type: text/x-patch
Size: 4510 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170906/f3a7d5be/attachment.bin>
More information about the Libc-alpha
mailing list