[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: conflict between 'canonicalize' and 'canonicalize-lgpl'
From: |
Bruno Haible |
Subject: |
Re: conflict between 'canonicalize' and 'canonicalize-lgpl' |
Date: |
Sun, 20 Apr 2008 14:28:35 +0200 |
User-agent: |
KMail/1.5.4 |
Last week, I did:
> 2008-04-13 Bruno Haible <address@hidden>
>
> Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl'.
> * lib/canonicalize-lgpl.c: Elide the contents if the 'canonicalize'
> module is also used and while not building the reloc-wrapper.
This was incorrect. It caused link failures of the programs
test-binary-io, test-lseek, test-open, test-stat-time on mingw.
Reason: These programs need open(), which has a replacement defined in
lib/fchdir.c, which needs canonicalize_file_name() and depends on
canonicalize-lgpl. But through the above patch, the definition from
lib/canonicalize.c is used, which requires xalloc, which requires xalloc-die,
which requires error, which requires gettext-h - and the functions from libintl
are not found.
This should be a better fix. Jim, ok to apply? For coreutils, nothing will
change, since it uses --avoid=canonicalize-lgpl.
Bruno
2008-04-20 Bruno Haible <address@hidden>
Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl',
take 2.
* lib/canonicalize.c (canonicalize_file_name): Elide if the
'canonicalize-lgpl' module is also used.
* lib/canonicalize-lgpl.c: Undo last change.
* modules/canonicalize-lgpl (configure.ac): Invoke gl_MODULE_INDICATOR.
--- lib/canonicalize.c.orig 2008-04-20 14:26:29.000000000 +0200
+++ lib/canonicalize.c 2008-04-20 14:11:39.000000000 +0200
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-2008 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
@@ -48,7 +48,7 @@
#include "pathmax.h"
#include "areadlink.h"
-#if !HAVE_CANONICALIZE_FILE_NAME
+#if !(HAVE_CANONICALIZE_FILE_NAME || GNULIB_CANONICALIZE_LGPL)
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any `.', `..' components nor any repeated file name
separators ('/') or symlinks. All components must exist.
--- lib/canonicalize-lgpl.c.orig 2008-04-20 14:26:29.000000000 +0200
+++ lib/canonicalize-lgpl.c 2008-04-20 14:11:36.000000000 +0200
@@ -21,7 +21,7 @@
<stdlib.h> on Solaris 2.5.1. */
#undef realpath
-#if !(HAVE_CANONICALIZE_FILE_NAME || (GNULIB_CANONICALIZE && !defined
IN_RELOCWRAPPER)) || defined _LIBC
+#if !HAVE_CANONICALIZE_FILE_NAME || defined _LIBC
#include <alloca.h>
--- modules/canonicalize-lgpl.orig 2008-04-20 14:26:29.000000000 +0200
+++ modules/canonicalize-lgpl 2008-04-20 14:18:10.000000000 +0200
@@ -14,6 +14,7 @@
configure.ac:
gl_CANONICALIZE_LGPL
+gl_MODULE_INDICATOR([canonicalize-lgpl])
Makefile.am: