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: Avoid trailing whitespace in sysdeps/gnu/errlist.c


On Thu, 6 Jun 2013, Ondrej Bilka wrote:

> On Thu, Jun 06, 2013 at 12:38:50PM +0000, Joseph S. Myers wrote:
> > On Thu, 6 Jun 2013, Ondrej Bilka wrote:
> > 
> > > On Thu, Jun 06, 2013 at 12:19:23PM +0000, Joseph S. Myers wrote:
> > > > This patch avoids trailing whitespace in the generated file
> > > > sysdeps/gnu/errlist.c by adjusting the generator errlist.awk not to
> > > > generate it.  Tested x86_64.
> > > > 
> > > You should use single tool that does job perfectly than reimplement it.
> > > Please add pass to delete trailing whitespace.
> > 
> > I disagree.  I believe that when we check in generated files and control 
> > the generator program, we should make the generator program generate 
> > output in the form we want to check in, rather than postprocessing the 
> > output with a separate program.  I think postprocessing should only be a 
> > last resort for cases where we do not control the generator and do not 
> > want to require a fixed version of it (or a fixed release does not exist).
> > 
> If you want to maintain it then it is your decision. Duplicating
> functionality in five places while it would suffice in one is generaly
> bad so I pointed about this mistake.

Each generated file has its own makefile rules; if five files are 
affected, you can't avoid five places being involved.  And for each file, 
I think it's better to have the functionality "generate the contents that 
we want to check in for this file" in one place, rather than split between 
the makefile and a separate script generating output similar to but not 
the same as what is wanted.

A postprocessor to remove whitespace is covering up a bug elsewhere that 
generated the unwanted whitespace in the first place.  When the bug is in 
part of glibc, we should just fix it.

-- 
Joseph S. Myers
joseph@codesourcery.com


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