From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95897 invoked by alias); 6 Sep 2017 13:04:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 95886 invoked by uid 89); 6 Sep 2017 13:04:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=reserved, HContent-Transfer-Encoding:8bit X-HELO: mail-qk0-f176.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7EkeYVrrI4a5/vzxA9l57TB+dawaqDOaL4v2x1hb/as=; b=JGiGe4JyuwJ/zgpelL9BrZvnr1GMR/puj/1GvTG6J16xFXQotu0Kc0XeJBRe5b5bYa 9VVHrSZW49+bOzC1t3yyWEnIj07zzR1z0+8goZNNui6ISSt9jTdr467zZFlUoUYLKrB+ Vx99KPbAxQHyispxMvNJaMrj3FFDyX9m9oYgAzDBO0wRWBocZ2vAgl18RojTdrj9N/5E WGTuYGvCWLv3aji+F7FDwddtUm80smstwkyMX/4M9BdnXvqUghmU494PmEfpEfhAa6+k hAl0YJL7BKEmpRnqOQZlts9ZqbcYntbr/mh1k/kdl86+jIR5SxNbJwYqv4275zkgH7JF vxuA== X-Gm-Message-State: AHPjjUjtCtbwJLZmPzsR4xLu+tEGOcKejRT7ZN0dPU84Uo4P9+C4NAlS 1mzK+buSES4daKCz2gMG/Q== X-Google-Smtp-Source: ADKCNb6SqIK8UWuESzzneHHoT4wRSwrk0bJp0S6V/KT9tO1I++bvpod/iIhQmKN8fCTU2zsvHVJmDA== X-Received: by 10.55.31.80 with SMTP id f77mr3104591qkf.95.1504703039256; Wed, 06 Sep 2017 06:03:59 -0700 (PDT) Subject: Re: [PATCH 8/9] posix: Use enum for __glob_pattern_type result To: Paul Eggert , libc-alpha@sourceware.org, Gnulib bugs References: <1504643122-14874-1-git-send-email-adhemerval.zanella@linaro.org> <1504643122-14874-9-git-send-email-adhemerval.zanella@linaro.org> <018ac06d-cb0a-edb9-7de5-560f614fda80@cs.ucla.edu> From: Adhemerval Zanella Message-ID: Date: Wed, 06 Sep 2017 13:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <018ac06d-cb0a-edb9-7de5-560f614fda80@cs.ucla.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2017-09/txt/msg00244.txt.bz2 On 06/09/2017 01:18, Paul Eggert wrote: > 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. Ack. > > 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. My understanding was double underscore identifiers are reserved for implementation (C99 7.1.3 Reserved identifiers). But I do not have a strong opinion here, I am ok with your approach.