From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28287 invoked by alias); 6 Sep 2005 20:03:31 -0000 Mailing-List: contact glibc-bugs-regex-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-regex-owner@sources.redhat.com Received: (qmail 28183 invoked by uid 48); 6 Sep 2005 20:03:15 -0000 Date: Tue, 06 Sep 2005 20:03:00 -0000 Message-ID: <20050906200315.28182.qmail@sourceware.org> From: "drepper at redhat dot com" To: glibc-bugs-regex@sources.redhat.com In-Reply-To: <20050824222100.1236.eggert@gnu.org> References: <20050824222100.1236.eggert@gnu.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug regex/1236] regex.h violates POSIX name space rules in several places X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00047.txt.bz2 List-Id: ------- Additional Comments From drepper at redhat dot com 2005-09-06 20:03 ------- There is no reason to rename REG_NOERROR etc. The definitions are correct. There is also no requirement to have them as macros. And stop making gratuitous changes like -#define RE_DUP_MAX (0x7fff) +/* Maximum number of duplicates an interval can allow. This is + distinct from RE_DUP_MAX, to conform to POSIX name space rules and + to avoid collisions with . */ +#define REG_DUP_MAX 32767 Broken code which tries to use the macro in preprocessor arithmetic cannot mysteriously start working. Likewise -#define REG_ICASE (REG_EXTENDED << 1) +#define REG_ICASE (1 << 1) Nobody asked you for your opinion on how to write that code. What you think is irrelevant. Leave the code alone. +/* In the traditional GNU implementation, regex.h defined member names + like `buffer' that POSIX does not allow. These members now have + names with leading `re_' (e.g., `re_buffer'). Support the old + names only if _REGEX_SOURCE is defined. New programs should use + the new names. */ While true that this violates the name space, no other names are reserved either. It makes no sense to changed this until the specification is changed. + unsigned char *_REG_RE_NAME (buffer); - /* Number of bytes to which `buffer' points. */ - unsigned long int allocated; + /* Number of bytes to which `re_buffer' points. */ The new comments are more confusing. Just leave them as they are. People reading the header only see _REG_RE_NAME(buffer) which mentions 'buffer' but no 're_buffer'. +#define REG_UNALLOCATED 0 +#define REG_REALLOCATE 1 +#define REG_FIXED 2 No. Add a REG_ prefix if anything has to be done. REG_REGS_UNALLOCATED. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |WAITING http://sourceware.org/bugzilla/show_bug.cgi?id=1236 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.