bug-gnulib
[Top][All Lists]
Advanced

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

acl: fix link error due to libintl


From: Bruno Haible
Subject: acl: fix link error due to libintl
Date: Wed, 11 Jun 2008 02:38:52 +0200
User-agent: KMail/1.5.4

This fixes a link error of the test-file-has-acl program on Solaris 10 with
gettext installed, with Sun cc. The reason of the link error was that
  - gettext.h contains inline functions pgettext_aux etc. which link against
    libintl's dcgettext() function.
  - Sun cc did not optimize away this inline function when it is not used.
  - So file-has-acl.o depended on libintl_dcgettext.
  - But test-file-has-acl should not need to link against libintl.


2008-06-10  Bruno Haible  <address@hidden>

        * lib/acl-internal.h: Don't include gettext.h here.
        * lib/set-mode-acl.c: Include gettext.h here.
        * lib/copy-acl.c: Likewise.

*** lib/acl-internal.h.orig     2008-06-11 02:30:55.000000000 +0200
--- lib/acl-internal.h  2008-06-11 01:23:33.000000000 +0200
***************
*** 46,54 ****
  # define ENOTSUP (-1)
  #endif
  
- #include "gettext.h"
- #define _(msgid) gettext (msgid)
- 
  #ifndef HAVE_FCHMOD
  # define HAVE_FCHMOD false
  # define fchmod(fd, mode) (-1)
--- 46,51 ----
*** lib/copy-acl.c.orig 2008-06-11 02:30:55.000000000 +0200
--- lib/copy-acl.c      2008-06-11 01:23:52.000000000 +0200
***************
*** 23,28 ****
--- 23,31 ----
  
  #include "acl-internal.h"
  
+ #include "gettext.h"
+ #define _(msgid) gettext (msgid)
+ 
  
  /* Copy access control lists from one file to another. If SOURCE_DESC is
     a valid file descriptor, use file descriptor operations, else use
*** lib/set-mode-acl.c.orig     2008-06-11 02:30:55.000000000 +0200
--- lib/set-mode-acl.c  2008-06-11 01:23:48.000000000 +0200
***************
*** 23,28 ****
--- 23,32 ----
  
  #include "acl-internal.h"
  
+ #include "gettext.h"
+ #define _(msgid) gettext (msgid)
+ 
+ 
  /* If DESC is a valid file descriptor use fchmod to change the
     file's mode to MODE on systems that have fchown. On systems
     that don't have fchown and if DESC is invalid, use chown on





reply via email to

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