Kalle Olavi Niemitalo <[EMAIL PROTECTED]> writes:

> The usual definition is:
> 
>      /* in <libintl.h> */
>      #define gettext_noop(String) (String)
> 
>      /* in the program */
>      #ifdef gettext_noop
>      # define N_(String) gettext_noop (String)
>      #else
>      # define N_(String) (String)
>      #endif
> 
> In other words, N_ should not affect compilation in any way; it
> only marks the string so xgettext can extract it from the source
> code.  It is meant to be used in initializers, which must be
> constant.  The actual gettext() call is then done somewhere else.
> This is explained in Info: (gettext)Special cases.
> 
> If the compiler complains about the initializer, either N_ or
> gettext_noop has been misdefined somewhere.  Or perhaps the
> compiler doesn't even accept:
> 
>      static const char msg[] = "hello";
> 
> in which case I'd say it's broken.

If I understood this correctly, the problem is that the system
compiler on IRIX doesn't accept

  static const char msg[] = ("hello");

If so, changing the definition to 

  #define N_(x) x

should solve the problem.

I'm not sure if the IRIX behaviour is proken. Does ANSI-C allow array
initializers in parenthesis? Like

  char s[] = ("foo");
  int a[] = ( {1, 2, 3} );

/Niels

Reply via email to