Re: strings.h in argz.c?

2007-01-21 Thread Paul Eggert
Ralf Wildenhues <[EMAIL PROTECTED]> writes:

> We got a bug report about Libtool 1.5.22 and SunOS 4.1.x this year, so
> I'm not doing any C89 cleanup on branch-1-5.

"this year" meaning 2007?  Or in the last 12 months?

I searched for such a bug report and found only

which mentions m68k SunOS 4.1.1 and sparc sunos 4.1.4.  However, in

you asked "Does anybody actually use these systems outside of a
museum?", noting that Sun itself dropped support for these operating
systems long ago, and didn't get a response.

I just checked
,
and Sun stopped fixing bugs in SunOS 4.1.1 on 1997-01-06 and in SunOS
4.1.4 on 2000-09-30, and stopped giving advice about them on
2000-01-76 and 2003-09-30 respectively.

Obviously it's up to you as to whether to do C89 cleanup, but if that
bug report is what we're talking about, I wouldn't worry about it.

On the other hand, is libtool supposed to address the problem of
freestanding C compilers?  If so, the only headers it is allowed to
assume are , , , and .  If
memory serves, gnulib sometimes assumes freestanding, but more often
hosted.


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: strings.h in argz.c?

2007-01-21 Thread Ralf Wildenhues
Hello Simon,

Apologies for the long delay.

* Simon Josefsson wrote on Mon, Oct 30, 2006 at 01:46:30PM CET:
> Bruno Haible <[EMAIL PROTECTED]> writes:

> >> Is strings.h needed on any modern platform?
> >
> > No.

> I see that argz.c comes from libtool.  Would this patch be acceptable?
> I'm cc:ing bug-libtool in case they have some legacy priority that
> demand strings.h.

We got a bug report about Libtool 1.5.22 and SunOS 4.1.x this year, so
I'm not doing any C89 cleanup on branch-1-5.

* Bruno Haible wrote on Mon, Oct 30, 2006 at 03:06:54PM CET:
> Simon Josefsson wrote:
> > I assume that memory.h is a side-effect of using strings.h, and that
> > memory.h is not needed today either?
> 
> Yes. Even on older systems like Solaris 2.4, AIX 4.3, IRIX 6.5, HP-UX 11,
> OSF/1 4.0, the contents of  is also available through .

Thanks.  Here's a quick audit of Libtool CVS HEAD to assume more of C89.
I'm really not sure whether I should apply it: the mere prospect of
lessening testsuite exposure on older hosts seems to me that it could
easily be more of a problem than the few, half a decade old lines that
nobody has needed to touch in a long time.

OTOH, the change may eventually cause 2 less header checks in user code;
that is, once all other checks for string.h and strings.h are eliminated
from their configury.

WDYT?

Cheers,
Ralf

2007-01-21  Ralf Wildenhues  <[EMAIL PROTECTED]>

Assume C89.
* libltdl/argz.c: Do not include strings.h nor memory.h, include
string.h unconditionally.
Patch by Simon Josefsson <[EMAIL PROTECTED]>.
* libltdl/libltdl/lt__private.h: Likewise.
* libltdl/m4/ltdl.m4 (LTDL_INIT): Do not check for string.h,
strings.h, memory.h.
* tests/cdemo/configure.ac: Assume presence of math.h.
* tests/cdemo/foo.c: Likewise.
* tests/demo/configure.ac: Likewise for math.h, string.h.
Assume 'const'.  Drop obsolete AC_EXEEXT.
* tests/demo/dlmain.c: Likewise.
* tests/demo/foo.c: Likewise.
* tests/depdemo/configure.ac: Likewise.
* tests/depdemo/l4/l4.c: Likewise.
* tests/f77demo/configure.ac: Likewise.  Also drop obsolete
AC_OBJEXT.
* tests/fcdemo/configure.ac: Likewise.
* tests/mdemo/configure.ac: Likewise.
* tests/mdemo/foo1.c: Likewise.
* tests/mdemo/foo2.c: Likewise.
* tests/mdemo2/configure.ac: Likewise.
* tests/pdemo/configure.ac: Likewise.
* tests/pdemo/longer_file_name_dlmain.c:
* tests/pdemo/longer_file_name_foo.c: Likewise.
* tests/pdemo/longer_file_name_foo2.c: Likewise.
* tests/tagdemo/configure.ac: Likewise.
* tests/tagdemo/foo.cpp: Likewise.

Index: libltdl/argz.c
===
RCS file: /cvsroot/libtool/libtool/libltdl/argz.c,v
retrieving revision 1.9
diff -u -r1.9 argz.c
--- libltdl/argz.c  24 Oct 2006 20:33:38 -  1.9
+++ libltdl/argz.c  21 Jan 2007 15:49:45 -
@@ -1,5 +1,5 @@
 /* argz.c -- argz implementation for non-glibc systems
-   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
Originally by Gary V. Vaughan  <[EMAIL PROTECTED]>
 
NOTE: The canonical source of this file is maintained with the
@@ -40,15 +40,7 @@
 #include 
 #include 
 #include 
-
-#if defined(HAVE_STRING_H)
-#  include 
-#elif defined(HAVE_STRINGS_H)
-#  include 
-#endif
-#if defined(HAVE_MEMORY_H)
-#  include 
-#endif
+#include 
 
 #define EOS_CHAR '\0'
 
Index: libltdl/libltdl/lt__private.h
===
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__private.h,v
retrieving revision 1.10
diff -u -r1.10 lt__private.h
--- libltdl/libltdl/lt__private.h   26 Oct 2006 20:39:04 -  1.10
+++ libltdl/libltdl/lt__private.h   21 Jan 2007 15:49:47 -
@@ -1,5 +1,5 @@
 /* lt__private.h -- internal apis for libltdl
-   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Originally by Gary V. Vaughan  <[EMAIL PROTECTED]>
 
NOTE: The canonical source of this file is maintained with the
@@ -40,22 +40,12 @@
 #include 
 #include 
 #include 
+#include 
 
 #if defined(HAVE_UNISTD_H)
 #  include 
 #endif
 
-#if defined(HAVE_STRING_H)
-#  include 
-#else
-#  if defined(HAVE_STRINGS_H)
-#include 
-#  endif
-#endif
-#if defined(HAVE_MEMORY_H)
-#  include 
-#endif
-
 /* Import internal interfaces...  */
 #include "lt__alloc.h"
 #include "lt__dirent.h"
Index: libltdl/m4/ltdl.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/ltdl.m4,v
retrieving revision 1.30
diff -u -r1.30 ltdl.m4
--- libltdl/m4/ltdl.m4  25 Aug 2006 15:04:30 -  1.30
+++ libltdl/m4/ltdl.m4  21 Jan 2007 15:49:47 -
@@ -1,11 +1,11 @@
 # ltdl.m4 - Configure ltdl for