bug-coreutils
[Top][All Lists]
Advanced

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

Re: sync from gnulib to coreutils


From: Paul Eggert
Subject: Re: sync from gnulib to coreutils
Date: Thu, 10 Aug 2006 12:16:38 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Eric Blake <address@hidden> writes:

> Now that getaddrinfo has more module dependencies upstream, we need to
> pull in new files.

OK, I grabbed some more files and installed the following change into
coreutils along with these files.

This led me to look at the snprintf module for the first time.  It's
clearly busted.  I'll fix that in gnulib (in my next email).

This burned another hour of my time.  I suppose I should bump the
priority of getting bootstrapping to work with coreutils.  On the
other hand, even if I did that the resulting tarball would contain a
lot of mingw cruft that hinders maintenance.

Perhaps we should change things so that gnulib assumes by default that
you don't want to support mingw, and that you can use a new 'mingw'
module if you prefer to to support it.  That would help folks like me
who don't want to bother with mingw's porting hassles.


2006-08-10  Paul Eggert  <address@hidden>

        Accommodate new getaddrinfo implementation in gnulib.

        In lib/:
        * inet_ntop.c, inet_ntop.h, snprintf.c, snprintf.h, socket_.h:
        New files, from gnulib.
        * .cppi-disable: Add snprintf.h, socket_.h.
        * Makefile.am (libcoreutils_a_SOURCES): Add inet_ntop.h, snprintf.h.
        (MOSTLYCLEANDIRS): New macro.
        (BUILT_SOURCES): Add $(ARPA_INET_H), $(SYS_SOCKET_H), $(NETINET_IN_H).
        (arpa/inet.h, netinet/in.h, sys/socket.h): New rules.
        (MOSTLYCLEANFILES): Add arpa/inet.h, arpa/inet.h-t, netinet/in.h,
        netinet/in.h-t, sys/socket.h, sys/socket.h-t.
        (EXTRA_DIST): Add socket_.h.

        In m4/:
        * arpa_inet_h.m4, inet_ntop.m4, netinet_in_h.m4, snprintf.m4:
        New files, from gnulib.
        * prereq.m4 (gl_PREREQ): Require gl_FUNC_SNPRINTF, gl_GETADDRINFO,
        gl_HEADER_ARPA_INET, gl_HEADER_NETINET_IN, gl_HEADER_SYS_SOCKET,
        gl_INET_NTOP, gl_TYPE_SOCKEN_T.

Index: lib/.cppi-disable
===================================================================
RCS file: /fetish/cu/lib/.cppi-disable,v
retrieving revision 1.41
diff -p -u -r1.41 .cppi-disable
--- lib/.cppi-disable   4 Jul 2006 07:28:45 -0000       1.41
+++ lib/.cppi-disable   10 Aug 2006 19:08:29 -0000
@@ -29,6 +29,8 @@ regex.c
 regex.h
 regex_internal.c
 regex_internal.h
+snprintf.h
+socket_.h
 stat-time.h
 stdbool_.h
 stdint_.h
Index: lib/Makefile.am
===================================================================
RCS file: /fetish/cu/lib/Makefile.am,v
retrieving revision 1.248
diff -p -u -r1.248 Makefile.am
--- lib/Makefile.am     8 Aug 2006 22:12:21 -0000       1.248
+++ lib/Makefile.am     10 Aug 2006 19:08:29 -0000
@@ -37,12 +37,14 @@ libcoreutils_a_SOURCES = \
   full-write.c full-write.h \
   getaddrinfo.h \
   gettext.h \
+  inet_ntop.h \
   localcharset.c localcharset.h \
   mbchar.h \
   mbswidth.c mbswidth.h \
   mbuiter.h \
   readtokens0.c readtokens0.h \
   setenv.h \
+  snprintf.h \
   strcase.h \
   strnlen1.c strnlen1.h \
   strstr.h \
@@ -71,6 +73,7 @@ lib_OBJECTS = $(libcoreutils_a_OBJECTS)
 BUILT_SOURCES = getdate.c
 CLEANFILES =
 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
+MOSTLYCLEANDIRS =
 MOSTLYCLEANFILES =
 SUFFIXES =
 
@@ -189,6 +192,40 @@ MOSTLYCLEANFILES += fnmatch.h fnmatch.h-
 BUILT_SOURCES += $(GETOPT_H)
 EXTRA_DIST += getopt_.h getopt_int.h
 
+BUILT_SOURCES += $(ARPA_INET_H)
+
+# We need the following in order to create <arpa/inet.h> when the system
+# doesn't have one.
+arpa/inet.h:
+       test -d arpa || mkdir arpa
+       echo '#include <sys/socket.h>' >address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
+MOSTLYCLEANDIRS += arpa
+
+BUILT_SOURCES += $(SYS_SOCKET_H)
+EXTRA_DIST += socket_.h
+
+BUILT_SOURCES += $(NETINET_IN_H)
+
+# We need the following in order to create <netinet/in.h> when the system
+# doesn't have one.
+netinet/in.h:
+       test -d netinet || mkdir netinet
+       echo '#include <sys/socket.h>' >address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t
+MOSTLYCLEANDIRS += netinet
+
+# We need the following in order to create <sys/socket.h> when the system
+# doesn't have one that works with the given compiler.
+sys/socket.h: socket_.h
+       test -d sys || mkdir sys
+       cp $(srcdir)/socket_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
+MOSTLYCLEANDIRS += sys
+
 check: unit-test
 
 .PHONY: unit-test
Index: m4/prereq.m4
===================================================================
RCS file: /fetish/cu/m4/prereq.m4,v
retrieving revision 1.130
diff -p -u -r1.130 prereq.m4
--- m4/prereq.m4        9 Aug 2006 23:42:28 -0000       1.130
+++ m4/prereq.m4        10 Aug 2006 19:08:29 -0000
@@ -1,4 +1,4 @@
-#serial 71
+#serial 72
 
 dnl We use gl_ for non Autoconf macros.
 m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
@@ -79,6 +79,7 @@ AC_DEFUN([gl_PREREQ],
   AC_REQUIRE([gl_FUNC_RPMATCH])
   AC_REQUIRE([gt_FUNC_SETENV])
   AC_REQUIRE([gl_FUNC_SIG2STR])
+  AC_REQUIRE([gl_FUNC_SNPRINTF])
   AC_REQUIRE([gl_FUNC_STPCPY])
   AC_REQUIRE([gl_FUNC_STRCSPN])
   AC_REQUIRE([gl_FUNC_STRDUP])
@@ -98,6 +99,7 @@ AC_DEFUN([gl_PREREQ],
   AC_REQUIRE([gl_FUNC_VASNPRINTF])
   AC_REQUIRE([gl_FUNC_VASPRINTF])
   AC_REQUIRE([gl_FUNC_WCWIDTH])
+  AC_REQUIRE([gl_GETADDRINFO])
   AC_REQUIRE([gl_GETDATE])
   AC_REQUIRE([gl_GETHRXTIME])
   AC_REQUIRE([gl_GETNDELIM2])
@@ -108,8 +110,12 @@ AC_DEFUN([gl_PREREQ],
   AC_REQUIRE([gl_HARD_LOCALE])
   AC_REQUIRE([gl_HASH])
   AC_REQUIRE([gl_HASH_PJW])
+  AC_REQUIRE([gl_HEADER_ARPA_INET])
+  AC_REQUIRE([gl_HEADER_NETINET_IN])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
   AC_REQUIRE([gl_HUMAN])
   AC_REQUIRE([gl_IDCACHE])
+  AC_REQUIRE([gl_INET_NTOP])
   AC_REQUIRE([gl_INTTOSTR])
   AC_REQUIRE([gl_LINEBUFFER])
   AC_REQUIRE([gl_LOCALCHARSET])
@@ -157,6 +163,7 @@ AC_DEFUN([gl_PREREQ],
   AC_REQUIRE([gl_STRIPSLASH])
   AC_REQUIRE([gl_TIMESPEC])
   AC_REQUIRE([gl_TIME_R])
+  AC_REQUIRE([gl_TYPE_SOCKLEN_T])
   AC_REQUIRE([gl_UNICODEIO])
   AC_REQUIRE([gl_UNISTD_SAFER])
   AC_REQUIRE([gl_UNLINKDIR])




reply via email to

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