This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Kill regexp.h


On 07/24/2015 11:59 PM, Carlos O'Donell wrote:
> On 07/15/2015 09:56 AM, Zack Weinberg wrote:
>> +* The header <regexp.h> is deprecated, and will be removed in a future
>> +  release.  (It was removed from POSIX long ago, and it has bugs we cannot
>> +  easily fix.  See BZ#18681 for more details.)  We suspect that no one has
>> +  used this header in many years, but if you have code that does use it,
>> +  you will need to update it to use <regex.h> instead.
> 
> Suggest:
> 
> * The header <regexp.h> is deprecated, and will be removed in a future
>   release.  As of 1997, SUSv2 marked this interface as legacy and recommended
>   applications migrate. Application developers are expected to update to
>   <regex.h> instead. Use of the <regexp.h> header will trigger a
>   deprecation warning.

I'd like to keep the bug number in there, how's this?

* The header <regexp.h> is deprecated, and will be removed in a future
  release.  Use of this header will trigger a deprecation warning.
  Application developers should update their code to use <regex.h>
  instead.

  This header was formerly part of SUSv2, but was deprecated in 1997 and
  removed from the standard in 2001.  Also, the glibc implementation
  leaks memory.  See BZ#18681 for more details.

>> -/* The contents of this header file was first standardized in X/Open
>> +/* The contents of this header file were first standardized in X/Open
>>     System Interface and Headers Issue 2, originally coming from SysV.
>> -   In issue 4, version 2, it is marked as TO BE WITDRAWN, and it has
>> -   been withdrawn in SUSv3.
>> +   In issue 4, version 2, it was marked as TO BE WITHDRAWN, and it was
>> +   duly withdrawn in issue 6.
> 
> Issue 6 of what? I assume you mean POSIX issue 6? Please clarify.

Yes, POSIX issue 6.  ("The Open Group Base Specifications Issue 6, IEEE
Std 1003.1, 2004 Edition", which is the version more commonly known as
POSIX.1-2001.)  I tried to do some more research; unfortunately, the
*previous* version of SUS (corresponding to POSIX.1-1996) identifies
itself as "The Single Unix Specification, Version 2".  I have not been
able to pin down exactly what "issue 4, version 2" was, or find an
"issue 5" anywhere; regexp.h is completely gone from "issue 6" and there
is no overall change log; "version 2" already says

NAME

    regexp.h - regular-expression declarations (LEGACY)

...

APPLICATION USAGE

    This header is kept for historical reasons. New applications should
    use the regcomp(), regexec(), regerror() and regfree() functions,
    and the <regex.h> header ...

and I would have to give them money to get my hands on "version 1."

Given all that, how about this wording?

+/* The contents of this header file were standardized in the
+   Single Unix Specification, Version 2 (1997) but marked as
+   LEGACY; new applications were already being encouraged to
+   use <regex.h> instead.  POSIX.1-2001 removed this header.  */


>> +   This header is provided only for backward compatibility, and it will
>> +   be removed in the next release of GNU libc.  New code should use
> 
> s/GNU libc/GNU C Library/g

OK.

>> +   <regex.h> instead.  */
>> +
>> +#warning "regexp.h is obsolete and buggy."
>> +#warning "It will be removed in the next release of GNU libc."
>> +#warning "Please update your code to use regex.h instead (no trailing
>> 'p')."
> 
> Suggest:
> 
> #warning "Use of the <regexp.h> header is deprecated."
> #warning "It will be removed in the next release of the GNU C Library."
> #warning "Please use <regex.h> instead (no trailing 'p')"

Actually, how about just

#warning "<regexp.h> will be removed in the next release of the GNU C
Library."
#warning "Please update your code to use regex.h instead (no trailing 'p')."


> Can you do a v3 with those changes for a final check?

Coming up as soon as I complete some smoke tests.

zw

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]