Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 4.2.0-pre-1



On [02/03/04 12:14 +0000], Peter Stephenson wrote:
> Ibraheem Umaru-Mohammed wrote:
> > Hmmmn, sigcount.h seems to have unclosed quotes:
> > 
> > ,---- [ sigcount.h ]
> > | #define SIGCOUNT        59
> > | #define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : "unknown signal3)
> > `----
> 
> Yes, I can believe that's wrong...  Presumably it's also wrong in
> signames.c.
> 
> The problem must be in signames2.awk which generates this:
> 
>     printf "#define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : %c%s%c)", 34, "unknown signal", 34
> 
> My guess is your awk is truncating the input line in some weird way.
> (It can't be 80 characters, however, since you wouldn't get the `unknown
> signal' at all.)  Can you try altering that line as per the following
> patch and see if that helps?
> 
> If your awk is playing up, you might find other weirdness, in particular
> the `# ifdef USE_SUSPENDED' bit in signames.c.  So even if it looks like
> it works it would be worth checking (or posting) the resulting signames.c.
> Any fixes ought to be similarly trivial, but I wouldn't like to second
> guess what awk is actually getting up to.
> 
[...]

I think I've found what the problem is, but have no idea why it is happening.
Take a look at the following:

Linux:

	[ibraheem@sonic:~ ] 42 % uname -a
	Linux sonic 2.6.3-rc2-gentoo #2 SMP Wed Feb 18 09:12:33 GMT 2004 i686
	Pentium III (Coppermine) GenuineIntel GNU/Linux
	[ibraheem@sonic:~ ] 43 %  nawk 'BEGIN {printf "\n\n#define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : %c%s%c)\n", 34, "unknown signal", 34}'


	#define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : "unknown
	signal")
	[ibraheem@sonic:~ ] 44 %

AIX 4.3:
	
	[ibraheem@maserati:~ ] 45 % uname -a
	AIX maserati 3 4 0043CDDA4C00
	[ibraheem@maserati:~ ] 46 % nawk 'BEGIN {printf "\n\n#define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : %c%s%c)\n", 34, "unknown signal", 34}'


	#define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : "unknown signal")
	[ibraheem@maserati:~ ] 47 %

AIX 5.2

	ibraheem@md000002s:~ ] 48 % uname -a
	AIX md000002s 2 5 00541F5A4C00
	ibraheem@md000002s:~ ] 49 % nawk 'BEGIN {printf "\n\n#define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : %c%s%c)\n", 34, "unknown signal", 34}'


	#define sigmsg(sig) ((sig) <= SIGCOUNT ? sig_msg[sig] : "unknown signal3)
	ibraheem@md000002s: ~] 50 % 

However, it appears that /bin/nawk is the same as /bin/awk, and not a symlink as it should be.
I will attempt to compile up nawk, and use that. 

Cheers,

			--ibraheem.

-- 



Messages sorted by: Reverse Date, Date, Thread, Author