File gettext-open_missing_mode.patch of Package gettext-runtime

2007-11-07  Jim Meyering  <meyering@redhat.com>
            Bruno Haible  <bruno@clisp.org>

	* 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);

openSUSE Build Service is sponsored by