bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] valloc()?


From: Bruno Haible
Subject: Re: [bug-gnulib] valloc()?
Date: Thu, 3 Mar 2005 17:31:56 +0100
User-agent: KMail/1.5

> Do you still see some nits that could be improved?

Oops, there was one more nit: The error messages were not internationalized.
I did this:

diff -c -3 -r1.2 pagealign_alloc.c
*** lib/pagealign_alloc.c       3 Mar 2005 16:21:00 -0000       1.2
--- lib/pagealign_alloc.c       3 Mar 2005 16:36:58 -0000
***************
*** 44,49 ****
--- 44,52 ----
  #include "exit.h"
  #include "getpagesize.h"
  #include "xalloc.h"
+ #include "gettext.h"
+ 
+ #define _(str) gettext (str)
  
  
  #if HAVE_MMAP || ! HAVE_POSIX_MEMALIGN
***************
*** 129,135 ****
      {
        fd = open ("/dev/zero", O_RDONLY, 0666);
        if (fd < 0)
!       error (EXIT_FAILURE, errno, "Failed to open /dev/zero for read");
      }
  # endif /* HAVE_MAP_ANONYMOUS */
    ret = mmap (NULL, size, PROT_READ | PROT_WRITE, flags, fd, 0);
--- 132,138 ----
      {
        fd = open ("/dev/zero", O_RDONLY, 0666);
        if (fd < 0)
!       error (EXIT_FAILURE, errno, _("Failed to open /dev/zero for read"));
      }
  # endif /* HAVE_MAP_ANONYMOUS */
    ret = mmap (NULL, size, PROT_READ | PROT_WRITE, flags, fd, 0);
diff -c -3 -r1.1 pagealign_alloc
*** modules/pagealign_alloc     3 Mar 2005 14:07:04 -0000       1.1
--- modules/pagealign_alloc     3 Mar 2005 16:36:58 -0000
***************
*** 11,16 ****
--- 11,17 ----
  error
  exit
  getpagesize
+ gettext
  xalloc
  
  configure.ac:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]