]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Change msgfmt to produce little-endian .mo files by default.
authorBruno Haible <bruno@clisp.org>
Wed, 13 Jan 2016 08:31:48 +0000 (09:31 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 15 Jan 2016 09:18:25 +0000 (10:18 +0100)
* 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.

NEWS
gettext-tools/doc/gettext.texi
gettext-tools/doc/msgfmt.texi
gettext-tools/src/msgfmt.c

diff --git a/NEWS b/NEWS
index b9507edf5d87e676fc3e1f49aa46375dbbfd2771..7ce5505e4ac9e31794ab580686a6706982e39926 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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:
index 204ab38a94ef8c9edd2811765af354eef4f81afb..c87fb72156e4cc0e90f04f016ff5a4a362828d0d 100644 (file)
@@ -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
index a6fefcdb93f96cb2016f5d88cf109fe47930bd13..90350cb05500413890226f6a31e96fc680a835d4 100644 (file)
@@ -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
index 7b48d2133eb18ab33b29d559379a9f573fc054d3..7055fa05ec700de59def0114dfc90224b8591d77 100644 (file)
@@ -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]);