Patch: remove nntp protocol constants from include/nntp.h in inn-CURRENT-20061121

Russ Allbery rra at stanford.edu
Wed Dec 13 04:38:15 UTC 2006


Adam J Richter <adam at yggdrasil.com> writes:

> 	Currently, include/nntp.h and include/inn/nntp.h each define
> a different set of symbol names for numeric NNTP response codes.  The
> following switches everything to use the codes from include/inn/nntp.h,
> replacing the definitions in include/nntp.h with a #include "inn/nntp.h".

I have *finally* had a chance to review this and apply it.  Thank you very
much for your work!  I'm sorry that it took me so long to apply.  I'm
still catching up on various life stuff and other committments, but I'm
getting closer to having time to spend on INN.

> 	If I compile without "-O2 -g", I get exactly the same .o files
> with and without this patch applied.  I have also verified that it builds
> with "./configure --prefix=/usr && make all && make install".

Thank you for this degree of verification!

> 	By the way, compiling with "-O2 generated different .o files
> under "-g -O2", even after stripping them, in the case of about six of
> the .o files in the tree.  From running diff on the generated
> x86 assembler code in for backends/nntpget.c, it appears that gcc -O2
> had moved some variable initializion that originally looked like this:

> 	  foo = 0;
> 	  bar = 0;
> 	  baz = 0;
> 	  if (func() == 0)
> 	     exit(1);

> 	...to...

> 	  if (func() == 0)
> 	     exit(1);
> 	  foo = 0;
> 	  bar = 0;
> 	  baz = 0;

> 	...presumably because it told that exit does not return.

Huh, interesting.  Surprising.  Some sort of weird artifact in the
optimizer, I suppose.  gcc does do different things depending on whether
debugging is enabled, occasionally, even though ideally it shouldn't.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list