mirror of
https://github.com/openharmony/third_party_gettext.git
synced 2026-07-19 13:17:36 -04:00
Change msgfmt to produce little-endian .mo files by default.
* gettext-tools/src/msgfmt.c (main): Initialize 'byteswap' so as to produce little-endian .mo files by default. * gettext-tools/doc/gettext.texi: Update documentation. * gettext-tools/doc/msgfmt.texi (--endianness): Likewise.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
* Support for reproducible builds:
|
||||
- msgfmt now produces little-endian .mo files by default.
|
||||
|
||||
Version 0.19.7 - December 2015
|
||||
|
||||
* Programming languages support:
|
||||
|
||||
@@ -5325,8 +5325,8 @@ which appears below.
|
||||
@cindex magic signature of MO files
|
||||
The first two words serve the identification of the file. The magic
|
||||
number will always signal GNU MO files. The number is stored in the
|
||||
byte order of the generating machine, so the magic number really is
|
||||
two numbers: @code{0x950412de} and @code{0xde120495}.
|
||||
byte order used when the MO file was generated, so the magic number
|
||||
really is two numbers: @code{0x950412de} and @code{0xde120495}.
|
||||
|
||||
The second word describes the current revision of the file format,
|
||||
composed of a major and a minor revision number. The revision numbers
|
||||
|
||||
@@ -382,14 +382,13 @@ Align strings to @var{number} bytes (default: 1).
|
||||
@item --endianness=@var{byteorder}
|
||||
@opindex --endianness@r{, @code{msgfmt} option}
|
||||
Write out 32-bit numbers in the given byte order. The possible values are
|
||||
@code{big} and @code{little}. The default depends on the platform, namely
|
||||
on the endianness of the CPU.
|
||||
@code{big} and @code{little}. The default is @code{little}.
|
||||
|
||||
MO files of any endianness can be used on any platform. When a MO file has
|
||||
an endianness other than the platform's one, the 32-bit numbers from the MO
|
||||
file are swapped at runtime. The performance impact is negligible.
|
||||
|
||||
This option can be useful to produce MO files that are independent of the
|
||||
This option can be useful to produce MO files that are optimized for one
|
||||
platform.
|
||||
|
||||
@item --no-hash
|
||||
|
||||
@@ -251,6 +251,7 @@ main (int argc, char *argv[])
|
||||
|
||||
/* Set default value for global variables. */
|
||||
alignment = DEFAULT_OUTPUT_ALIGNMENT;
|
||||
byteswap = 0 ^ ENDIANNESS;
|
||||
|
||||
/* Set program name for messages. */
|
||||
set_program_name (argv[0]);
|
||||
|
||||
Reference in New Issue
Block a user