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 v3 4/7] manual: Refactor errno @comments.


On 05/16/2017 09:44 PM, Rical Jasan wrote:
> On 05/16/2017 04:06 AM, Joseph Myers wrote:
>> On Tue, 16 May 2017, Rical Jasan wrote:
>>> errno.texi contains a large number of standards annotations which also
>>> document the error string on the same line.  The surrounding
>>> commentary indicates this information should be retained, so it is
>>> moved to the subsequent comment documenting the error code value.  In
>>> many cases, there was a redundant "@c DO NOT REMOVE" comment, which
>>> was relocated to the front.  Additionally, a number of "Linux???"
>>> standards appeared under a section of the manual stating the following
>>> errors came from Linux, so the question marks were removed.
>>
>> Have you made sure that the generated sysdeps/gnu/errlist.c is unchanged 
>> by this patch?
> 
> No.
> 
>> And sysdeps/mach/hurd/bits/errno.h (you might need to 
>> figure out what commands to run by hand for that one, in the absence of a 
>> way to build a cross compiler and glibc for Hurd).  (NaCl also generates 
>> bits/errno.h - not checked in for NaCl - from errno.texi, but that port 
>> should be going away soon.)
> 
...
> After hacking on this a bit, I think this patch should be rescinded.
...
> like to propose an @errno{} macro to handle these, and then update the
> errlist.awks accordingly.  Something like:
> 
>   @errno{EPERM, 1, Operation not permitted}

After pursuing the @errno approach, to address the Hurd issue, I cloned
the Mach sources and added (relative to the Mach repo):

  include/mach/message.h
  include/mach/kern_return.h
  include/mach/mig_errors.h
  include/device/device_types.h

along with errno.texi to the errnos.awk command-line.  (Those filenames
sans-include/ are hardcoded in errnos.awk.)  The resultant diff was:

--- sysdeps/mach/hurd/bits/errno.h
+++ /tmp/errno.h
@@ -278,6 +278,8 @@
 	EKERN_MEMORY_PRESENT            = 23,
 	EKERN_WRITE_PROTECTION_FAILURE  = 24,
 	EKERN_TERMINATED                = 26,
+	EKERN_TIMEDOUT                  = 27,
+	EKERN_INTERRUPTED               = 28,

 	/* Errors from <mach/mig_errors.h>.  */
 	EMIG_TYPE_ERROR         = -300  /* client type check failure */,

so it seems to be equivalent, aside from some new errors (looks like
they were added last month).

errlist.awk only uses errno.texi, and its output is unchanged.  Since
NaCl is slated for removal, I haven't touched it.

I'll post a v4 soon.

Rical


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