libtool-patches
[Top][All Lists]
Advanced

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

Re: new config-h module, to remove the need for -DHAVE_CONFIG_H


From: Ralf Wildenhues
Subject: Re: new config-h module, to remove the need for -DHAVE_CONFIG_H
Date: Mon, 28 Aug 2006 18:02:16 +0200
User-agent: Mutt/1.5.12 (2006-08-10)

[ no need to discuss this on libtool rather than -patches ]

* Eric Blake wrote on Mon, Aug 28, 2006 at 02:55:21PM CEST:
> According to Paul Eggert on 8/26/2006 12:43 AM:
> > 
> > The basic idea is that source files should include config.h
> > unconditionally, so that we needn't clutter "make" output with
> > -DHAVE_CONFIG_H.

> This doesn't work for the argz module, which uses "#if
> defined(HAVE_CONFIG_H)" from upstream libtool.  And projects using libtool
> also have this issue with lt__alloc.c.  Maybe the libtool headers need to
> be tweaked a bit?

I have applied the following patch to CVS HEAD Libtool, changing all
instances of HAVE_CONFIG_H.

Before syncinc argz* with gnulib: why does gnulib/config/srclist.txt
list these files as GPL, as do the gnulib file headers, but modules/argz
says LGPL, and libltdl is distributed with LGPL + special exception?

Cheers,
Ralf

        * libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
        sharing with gnulib.  Report by Eric Blake.
        * libltdl/lt__alloc.c, libltdl/libltdl/lt__dirent.h,
        libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
        libltdl/libltdl/lt__strl.h: Likewise.
        * HACKING: Update.

Index: HACKING
===================================================================
RCS file: /cvsroot/libtool/libtool/HACKING,v
retrieving revision 1.28
diff -u -r1.28 HACKING
--- HACKING     5 Feb 2006 17:06:39 -0000       1.28
+++ HACKING     28 Aug 2006 16:00:28 -0000
@@ -291,7 +291,7 @@
   to various system libc interfaces that differ between hosts supported
   by libtool.  Typically, the files that implement this layer begin:
 
-  #if defined(HAVE_CONFIG_H)
+  #ifdef HAVE_CONFIG_H
   #  if defined(LT_CONFIG_H)
   #    include LT_CONFIG_H
   #  else
@@ -300,6 +300,8 @@
   #endif
   #include "lt_system.h"
 
+  The `ifdef HAVE_CONFIG_H' helps facilitate code sharing with gnulib.
+
   Or if they are installed headers that must work outside the libtool
   source tree, simply:
 
@@ -615,7 +617,7 @@
 
 
 -- 
-Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
 
 The canonical source of this file is maintained with the
 GNU Libtool package.  Report bugs to address@hidden
Index: libltdl/argz.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/argz.c,v
retrieving revision 1.7
diff -u -r1.7 argz.c
--- libltdl/argz.c      17 Sep 2005 07:29:03 -0000      1.7
+++ libltdl/argz.c      28 Aug 2006 16:00:28 -0000
@@ -1,5 +1,5 @@
 /* argz.c -- argz implementation for non-glibc systems
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
    Originally by Gary V. Vaughan  <address@hidden>
 
    NOTE: The canonical source of this file is maintained with the
@@ -27,7 +27,7 @@
 
 */
 
-#if defined(HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #  if defined(LTDL) && defined LT_CONFIG_H
 #    include LT_CONFIG_H
 #  else
Index: libltdl/lt__alloc.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/lt__alloc.c,v
retrieving revision 1.6
diff -u -r1.6 lt__alloc.c
--- libltdl/lt__alloc.c 17 Sep 2005 07:29:03 -0000      1.6
+++ libltdl/lt__alloc.c 28 Aug 2006 16:00:28 -0000
@@ -1,5 +1,5 @@
 /* lt__alloc.c -- internal memory management interface
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
    Originally by Gary V. Vaughan  <address@hidden>
 
    NOTE: The canonical source of this file is maintained with the
@@ -27,7 +27,7 @@
 
 */
 
-#if defined(HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #  if defined(LT_CONFIG_H)
 #    include LT_CONFIG_H
 #  else
Index: libltdl/libltdl/lt__dirent.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__dirent.h,v
retrieving revision 1.4
diff -u -r1.4 lt__dirent.h
--- libltdl/libltdl/lt__dirent.h        22 Aug 2006 17:51:03 -0000      1.4
+++ libltdl/libltdl/lt__dirent.h        28 Aug 2006 16:00:29 -0000
@@ -30,7 +30,7 @@
 #if !defined(LT__DIRENT_H)
 #define LT__DIRENT_H 1
 
-#if defined(HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #  if defined(LT_CONFIG_H)
 #    include LT_CONFIG_H
 #  else
Index: libltdl/libltdl/lt__glibc.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__glibc.h,v
retrieving revision 1.4
diff -u -r1.4 lt__glibc.h
--- libltdl/libltdl/lt__glibc.h 17 Sep 2005 07:29:03 -0000      1.4
+++ libltdl/libltdl/lt__glibc.h 28 Aug 2006 16:00:29 -0000
@@ -1,5 +1,5 @@
 /* lt__glibc.h -- support for non glibc environments
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
    Originally by Gary V. Vaughan  <address@hidden>
 
    NOTE: The canonical source of this file is maintained with the
@@ -30,7 +30,7 @@
 #if !defined(LT__GLIBC_H)
 #define LT__GLIBC_H 1
 
-#if defined(HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #  if defined(LT_CONFIG_H)
 #    include LT_CONFIG_H
 #  else
Index: libltdl/libltdl/lt__private.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__private.h,v
retrieving revision 1.7
diff -u -r1.7 lt__private.h
--- libltdl/libltdl/lt__private.h       27 Sep 2005 10:03:51 -0000      1.7
+++ libltdl/libltdl/lt__private.h       28 Aug 2006 16:00:29 -0000
@@ -1,5 +1,5 @@
 /* lt__private.h -- internal apis for libltdl
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
    Originally by Gary V. Vaughan  <address@hidden>
 
    NOTE: The canonical source of this file is maintained with the
@@ -30,7 +30,7 @@
 #if !defined(LT__PRIVATE_H)
 #define LT__PRIVATE_H 1
 
-#if defined(HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #  if defined(LT_CONFIG_H)
 #    include LT_CONFIG_H
 #  else
Index: libltdl/libltdl/lt__strl.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__strl.h,v
retrieving revision 1.4
diff -u -r1.4 lt__strl.h
--- libltdl/libltdl/lt__strl.h  17 Sep 2005 07:29:03 -0000      1.4
+++ libltdl/libltdl/lt__strl.h  28 Aug 2006 16:00:29 -0000
@@ -1,5 +1,5 @@
 /* lt__strl.h -- size-bounded string copying and concatenation
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
    Written by Bob Friesenhahn <address@hidden>
 
    NOTE: The canonical source of this file is maintained with the
@@ -30,7 +30,7 @@
 #if !defined(LT__STRL_H)
 #define LT__STRL_H 1
 
-#if defined(HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #  if defined(LT_CONFIG_H)
 #    include LT_CONFIG_H
 #  else




reply via email to

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