[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing open call in write-catalog.c: address@hidden
From: |
Bruno Haible |
Subject: |
Re: Fixing open call in write-catalog.c: address@hidden |
Date: |
Tue, 4 Dec 2007 10:33:13 +0100 |
User-agent: |
KMail/1.5.4 |
Philipp Thomas wrote:
> The next version of glibc will be pickier and rejects the call to open in
> msgdomain_list_print:
>
> inlined from 'msgdomain_list_print' at write-catalog.c:223:
> /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode'
> declared with attribute error:
> open with O_CREAT in second argument needs 3 arguments
>
> What mode should I pass in order to fix this?:
Please use the patch that was already committed into the gettext CVS,
see http://savannah.gnu.org/cvs/?group=gettext . You find it attached here
for convenience.
2007-11-07 Jim Meyering <address@hidden>
Bruno Haible <address@hidden>
* write-catalog.c (msgdomain_list_print): Fix open() call.
*** gettext-tools/src/write-catalog.c.bak 2007-10-07 21:37:39.000000000
+0200
--- gettext-tools/src/write-catalog.c 2007-11-07 12:39:29.000000000 +0100
***************
*** 1,5 ****
/* GNU gettext - internationalization aids
! Copyright (C) 1995-1998, 2000-2006 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
--- 1,5 ----
/* GNU gettext - internationalization aids
! 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,226 ****
/* Open the output file. */
if (!to_stdout)
{
! fd = open (filename, O_WRONLY | O_CREAT);
if (fd < 0)
{
const char *errno_description = strerror (errno);
--- 220,228 ----
/* Open the output file. */
if (!to_stdout)
{
! 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);