You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <pe...@famlundblad.se> on 2004/06/24 22:25:24 UTC

[PATCH) compile warnings from msgfmt

On Thu, 24 Jun 2004, Greg Hudson wrote:

> On Thu, 2004-06-24 at 13:58, Peter N. Lundblad wrote:
> > I'm not sure how to implement this portably. Is the make if construct
> > portable?
>
> Not particularly, no.
>
I found the POSIX specification for make. That was instructive to read...

> A common trick is to stick @SYMBOL@ in Makefile.in and define @SYMBOL@
> to either "#" or "" depending on whether the Makefile fragment should be
> enabled.
>
Yes, like automake does I think. I choose this trick. It looks ugly, but
it works.

Here is a patch that gets rid of the warnings if bind_textdomain_codeset
is available. This is Portabilityland, where I am a stranger, so please
could someone have a look.

Regards,
//Peter

Re: [PATCH) compile warnings from msgfmt

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Sun, 27 Jun 2004, Greg Hudson wrote:

> > About the long names: they are verbose, but consistent with what
> > autoconf uses (HAVE_functionname). I added IF_ for as a prefix when
> > the condition is true and IF_NOT_ when it is false.
>
> Uh, sure, you're consistent with the symbol names autoconf uses for C
> code, but I don't see why this matters.  But if you look at other
> real-life examples of people doing Makefile conditionalization using
> this approach, they almost always use short symbol names for
> conciseness.  (When they're not using automake, that is.)
>
> You aren't using AC_DEFINE on these symbols, so they won't affect the
> C code namespace, only the Makefile namespace.  I suggest using
> @NO_CHARSET@.
>
Thanks for the suggestion. I used GETTEXT_CODESET and NO_GETTEXT_CODESET.
Had to split the sed line anyway...

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH) compile warnings from msgfmt

Posted by Greg Hudson <gh...@MIT.EDU>.
> About the long names: they are verbose, but consistent with what
> autoconf uses (HAVE_functionname). I added IF_ for as a prefix when
> the condition is true and IF_NOT_ when it is false.

Uh, sure, you're consistent with the symbol names autoconf uses for C
code, but I don't see why this matters.  But if you look at other
real-life examples of people doing Makefile conditionalization using
this approach, they almost always use short symbol names for
conciseness.  (When they're not using automake, that is.)

You aren't using AC_DEFINE on these symbols, so they won't affect the
C code namespace, only the Makefile namespace.  I suggest using
@NO_CHARSET@.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH) compile warnings from msgfmt

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Thu, 24 Jun 2004, Greg Hudson wrote:

> On Thu, 2004-06-24 at 18:25, Peter N. Lundblad wrote:
> > Here is a patch that gets rid of the warnings if bind_textdomain_codeset
> > is available. This is Portabilityland, where I am a stranger, so please
> > could someone have a look.
>
> It looks functionally okay, but you should restrict lines to 80
> characters when possible, and @IF_NOT_HAVE_BIND_TEXTDOMAIN_CODESET@ is
> perhaps a bit verbose.
>
The only problematic line is the sed line to remove the Content-type
header. I don't know where it is safe to break this line.

About the long names: they are verbose, but consistent with what autoconf
uses (HAVE_functionname). I added IF_ for as a prefix when the condition
is true and IF_NOT_ when it is false.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH) compile warnings from msgfmt

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2004-06-24 at 18:25, Peter N. Lundblad wrote:
> Here is a patch that gets rid of the warnings if bind_textdomain_codeset
> is available. This is Portabilityland, where I am a stranger, so please
> could someone have a look.

It looks functionally okay, but you should restrict lines to 80
characters when possible, and @IF_NOT_HAVE_BIND_TEXTDOMAIN_CODESET@ is
perhaps a bit verbose.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org