zsh-workers
 help / color / mirror / code / Atom feed
* bug in zsh/system : `syserror ENOENT` doesn't work
@ 2006-09-08 17:01 arno.
  2006-09-08 17:53 ` Dan Nelson
  0 siblings, 1 reply; 3+ messages in thread
From: arno. @ 2006-09-08 17:01 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

Hi,

In module, zsh/system, some symbolic names are not recognized, but are 
recognized otherwise by my system (Debian testing)

? zmodload zsh/system                                                                                              
? syserror ENOENT
? echo $?                                                                                           
2                                             

So, I have to refer to them with their number

? syserror E2   
No such file or directory
? syserror 2   
No such file or directory

errnos are defined on my system in /usr/include/asm-generic/errno.h
and that file contains the line :
#include <asm-generic/errno-base.h>

/usr/include/asm-generic/errno-base contains a few (about 30) errnos 
definitions (for example, ENOENT is among them)

At compile time, /usr/include/asm-generic/errno.h is recognized as ERRNO_H
When Src/Modules/errnames1.awk parses it, it outputs errnames only from that file.
If I modify Src/Modules/Makefile by hand 

$(AWK) -f $(sdir)/errnames1.awk /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h >errtmp.c; \

instead of

$(AWK) -f $(sdir)/errnames1.awk /usr/include/asm-generic/errno.h >errtmp.c; \

that works, ENOENT and others are recognized

I don't known awk scripting, but may be it is possible to make 
errnames1.awk recognize include directives and parse also the second 
file ?
Hope that helps

arno

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-08 21:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-08 17:01 bug in zsh/system : `syserror ENOENT` doesn't work arno.
2006-09-08 17:53 ` Dan Nelson
2006-09-08 21:50   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).