emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: HP-UX: link error]


From: Christoph Bauer
Subject: Re: address@hidden: HP-UX: link error]
Date: Thu, 23 Mar 2006 12:51:53 +0100

> 
>     So <sys/_mbstate_t.h> is not included (_LIBC in not defined).
>     When I define MULTIBYTE_IS_FORMAT_SAFE in config.h, the build
>     succeeds.

This was just a stupid test. As formerly written with  
-D_INCLUDE__STDC_A1_SOURCE the definition of MULTIBYTE_IS_FORMAT_SAFE
isn't necessary. 
> 
> That does not necessarily mean it is correct to define that
> symbol.  Here's the explanation of it:
> 
>     /* Do multibyte processing if multibytes are supported, unless
>        multibyte sequences are safe in formats.  Multibyte sequences are
>        safe if they cannot contain byte sequences that look like format
>        conversion specifications.  The GNU C Library uses UTF8 multibyte
>        encoding, which is safe for formats, but strftime.c can be used
>        with other C libraries that use unsafe encodings.  */
>     #define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_FORMAT_SAFE)
> 
> So, are multibyte sequences safe on your system?

man page of printf(3S) says:

Locale
      The LC_CTYPE category affects the following features:

           +  Plain characters within format strings are interpreted as
              single byte and/or multibyte characters.

           +  Field width is given in terms of bytes.  As characters are
              placed on the output stream, they are interpreted as single
              byte or multibyte characters and the field width is
              decremented by the length of the character.

           +  Precision is given in terms of bytes.  As characters are
              placed on the output stream, they are interpreted as single
              byte or multibyte characters and the precision is decremented
              by the length of the character.

           +  The return value is given in terms of bytes.  As characters
              are placed on the output stream, they are interpreted as
              single byte or multibyte characters and the byte count that
              makes up the return value is incremented by the length of the
              character.

      The LC_NUMERIC category determines the radix character used to print
      floating-point numbers, and the thousands' grouping characters if the
      grouping flag ' is on.

    International Code Set Support
      Single byte character code sets are supported.  Multibyte character
      code sets are also supported as described in the LC_CTYPE category
      above.

So it depends on LC_CTYPE.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]