This is the mail archive of the mailing list for the Cygwin 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] Setup: Fix erroneous quoting of __LINE__ and __FILE__

On Sat, 12 Jul 2003, Max Bowsher wrote:

> Igor Pechtchanski wrote:
> > Umm, what can I say except "Oops!"?  Would you believe I redirected the
> > make output to one file, and looked at another?  Bizarre, isn't it?  I've
> > attached a (verified) working patch.
> Yes, confirmed.
> > As for the commit rights, I do have them for some directories in the
> > cygwin-apps repository, but I was under the impression that those rights
> > were on a per-directory basis.
> [Resolved in another sub-thread]
> So, once Robert OKs the new patch, you can commit it yourself, or ask me to,
> whichever is more convenient.

Ok.  I've just set up a writeable repository, and should be able to
commit.  If not, I'll let you know.

> ============================================================================
> > 2003-07-11  Igor Pechtchanski  <>
> >
> > * String++.h (TOSTRING): New macro.
> > [snip]
> Do we need __TOSTRING__ and TOSTRING? Since they are defined in the same
> file, it isn't really making the namespace cleaner.
> Max.

Yes, we do need two macros.  The helper macro (__TOSTRING__) can be named
something else, but it's needed to force parameter expansion.  Otherwise,
TOSTRING(__LINE__) would have produced "__LINE__", not the stringified
value of __LINE__.  This is straight from the K&R book...

However, I just looked, and this kind of macro seems to be defined already
in /usr/include/symcat.h (XSTRING).  I'm not sure whether it's better to
use the pre-existing macro, or to to define our own (with a more intuitive
name, IMO).  The macro is simple enough.  Opinions?
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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