public inbox for glibc-bugs-regex@sourceware.org help / color / mirror / Atom feed
From: "drepper at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs-regex@sources.redhat.com Subject: [Bug regex/1236] regex.h violates POSIX name space rules in several places Date: Tue, 06 Sep 2005 20:03:00 -0000 [thread overview] Message-ID: <20050906200315.28182.qmail@sourceware.org> (raw) In-Reply-To: <20050824222100.1236.eggert@gnu.org> ------- 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 <limits.h>. */ +#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.
next prev parent reply other threads:[~2005-09-06 20:03 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-08-24 22:21 [Bug regex/1236] New: " eggert at gnu dot org 2005-08-24 22:21 ` [Bug regex/1236] " eggert at gnu dot org 2005-08-24 22:23 ` eggert at gnu dot org 2005-08-24 23:08 ` eggert at gnu dot org 2005-08-24 23:21 ` eggert at gnu dot org 2005-09-06 20:03 ` drepper at redhat dot com [this message] 2006-04-11 6:58 ` eggert at gnu dot org 2006-04-11 6:58 ` eggert at gnu dot org 2006-04-11 7:06 ` eggert at gnu dot org 2010-09-02 14:42 ` schwab at linux-m68k dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050906200315.28182.qmail@sourceware.org \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs-regex@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).