]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix open() call.
authorBruno Haible <bruno@clisp.org>
Wed, 7 Nov 2007 11:44:43 +0000 (11:44 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:32 +0000 (12:15 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/write-catalog.c

index 6d33fd6f4d1c20baa0f13995ac3e695102268380..500e65cedc437b087260e80e96730fa72ddd38da 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-07  Jim Meyering  <meyering@redhat.com>
+            Bruno Haible  <bruno@clisp.org>
+
+       * write-catalog.c (msgdomain_list_print): Fix open() call.
+
 2007-11-07  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.17 released.
index 0447744e3aa397394c2f0dd6d7daf8ed4e25d47d..635f8c1369bc26e5a98cd992e41cf1b9f78cebcf 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -220,7 +220,9 @@ message catalog has plural form translations, but the output format does not sup
       /* Open the output file.  */
       if (!to_stdout)
        {
-         fd = open (filename, O_WRONLY | O_CREAT);
+         fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
+                    /* 0666 in portable POSIX notation: */
+                    S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
          if (fd < 0)
            {
              const char *errno_description = strerror (errno);