Blame gettext-0.17-open-args.patch
|
|
49d7ad6 |
2007-11-07 Jim Meyering <meyering@redhat.com>
|
|
|
49d7ad6 |
Bruno Haible <bruno@clisp.org>
|
|
|
49d7ad6 |
|
|
|
49d7ad6 |
* write-catalog.c (msgdomain_list_print): Fix open() call.
|
|
|
49d7ad6 |
|
|
|
49d7ad6 |
--- gettext-tools/src/write-catalog.c 7 Oct 2007 19:35:31 -0000 1.4
|
|
|
49d7ad6 |
+++ gettext-tools/src/write-catalog.c 7 Nov 2007 11:43:15 -0000
|
|
|
49d7ad6 |
@@ -1,5 +1,5 @@
|
|
|
49d7ad6 |
/* GNU gettext - internationalization aids
|
|
|
49d7ad6 |
- Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
|
|
|
49d7ad6 |
+ Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
|
|
|
49d7ad6 |
|
|
|
49d7ad6 |
This program is free software: you can redistribute it and/or modify
|
|
|
49d7ad6 |
it under the terms of the GNU General Public License as published by
|
|
|
49d7ad6 |
@@ -220,7 +220,9 @@
|
|
|
49d7ad6 |
/* Open the output file. */
|
|
|
49d7ad6 |
if (!to_stdout)
|
|
|
49d7ad6 |
{
|
|
|
49d7ad6 |
- fd = open (filename, O_WRONLY | O_CREAT);
|
|
|
49d7ad6 |
+ fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
|
|
|
49d7ad6 |
+ /* 0666 in portable POSIX notation: */
|
|
|
49d7ad6 |
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
|
|
49d7ad6 |
if (fd < 0)
|
|
|
49d7ad6 |
{
|
|
|
49d7ad6 |
const char *errno_description = strerror (errno);
|