bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] Re: factored integer properties into intprops.h


From: Jim Meyering
Subject: [bug-gnulib] Re: factored integer properties into intprops.h
Date: Thu, 10 Mar 2005 00:19:06 +0100

Paul Eggert <address@hidden> wrote:
> I factored out various places in gnulib that refer to integer
> properties like TYPE_MAXIMUM and INT_STRLEN_BOUND, and put them
> into a common file intprops.h.  I installed this patch into
> gnulib and will do the same to coreutils shortly.
>
> The only developer-visible change should be the new file lib/intprops.h.
>
> I used 146/485 by popular request.  However, I didn't have
> INT_STRLEN_BOUND refer to TYPE_SIGNED, as that broke some code in
> coreutils that applied INT_STRLEN_BOUND to a value, not to a type.  I
> think this usage is useful enough that we should continue to support
> it, so I documented it.

Thanks for all of that.
I've made the following additional changes (only in coreutils for now),
any one of which would have been enough to ensure that intprops.h is
included in the coreutils distribution:

2005-03-10  Jim Meyering  <address@hidden>

        * human.m4 (gl_HUMAN): Add intprops.h.
        * inttostr.m4 (gl_INTTOSTR): Likewise
        * sig2str.m4 (gl_FUNC_SIG2STR): Likewise.
        * userspec.m4 (gl_USERSPEC): Likewise.
        * utimecmp.m4 (gl_UTIMECMP): Likewise.
        * xnanosleep.m4 (gl_XNANOSLEEP): Likewise.

        * xstrtol.m4 (gl_XSTRTOL): Use AC_LIBSOURCES and AC_LIBOBJ
        to list the required files.

Index: m4/human.m4
===================================================================
RCS file: /fetish/cu/m4/human.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -u -r1.6 -r1.7
--- m4/human.m4 29 Jan 2005 00:16:39 -0000      1.6
+++ m4/human.m4 9 Mar 2005 23:02:25 -0000       1.7
@@ -1,4 +1,4 @@
-# human.m4 serial 8
+#serial 9
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_HUMAN],
 [
-  AC_LIBSOURCES([human.c, human.h])
+  AC_LIBSOURCES([human.c, human.h, intprops.h])
   AC_LIBOBJ([human])
 
   dnl Prerequisites of lib/human.h.
Index: m4/inttostr.m4
===================================================================
RCS file: /fetish/cu/m4/inttostr.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -u -r1.4 -r1.5
--- m4/inttostr.m4      11 Feb 2005 20:27:16 -0000      1.4
+++ m4/inttostr.m4      9 Mar 2005 23:03:42 -0000       1.5
@@ -1,4 +1,4 @@
-# inttostr.m4 serial 4
+#serial 5
 dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_INTTOSTR],
 [
-  AC_LIBSOURCES([inttostr.c, inttostr.h])
+  AC_LIBSOURCES([inttostr.c, inttostr.h, intprops.h])
 
   dnl We don't technically need to list the following .c files, since their
   dnl functions are named in the AC_LIBOBJ calls, but this is an unusual
Index: m4/sig2str.m4
===================================================================
RCS file: /fetish/cu/m4/sig2str.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -u -r1.3 -r1.4
--- m4/sig2str.m4       29 Jan 2005 00:16:39 -0000      1.3
+++ m4/sig2str.m4       9 Mar 2005 23:04:47 -0000       1.4
@@ -1,4 +1,4 @@
-# sig2str.m4 serial 3
+#serial 4
 dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_FUNC_SIG2STR],
 [
-  AC_LIBSOURCES([sig2str.c, sig2str.h])
+  AC_LIBSOURCES([sig2str.c, sig2str.h, intprops.h])
 
   AC_REPLACE_FUNCS(sig2str)
   if test $ac_cv_func_sig2str = no; then
Index: m4/userspec.m4
===================================================================
RCS file: /fetish/cu/m4/userspec.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -u -r1.5 -r1.6
--- m4/userspec.m4      29 Jan 2005 00:16:39 -0000      1.5
+++ m4/userspec.m4      9 Mar 2005 23:05:32 -0000       1.6
@@ -1,4 +1,4 @@
-# userspec.m4 serial 6
+#serial 7
 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_USERSPEC],
 [
-  AC_LIBSOURCES([userspec.c, userspec.h])
+  AC_LIBSOURCES([userspec.c, userspec.h, intprops.h])
   AC_LIBOBJ([userspec])
 
   dnl Prerequisites of lib/userspec.c.
Index: m4/utimecmp.m4
===================================================================
RCS file: /fetish/cu/m4/utimecmp.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -u -r1.3 -r1.4
--- m4/utimecmp.m4      29 Jan 2005 00:16:39 -0000      1.3
+++ m4/utimecmp.m4      9 Mar 2005 23:06:16 -0000       1.4
@@ -1,3 +1,4 @@
+#serial 1
 dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -5,7 +6,7 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_UTIMECMP],
 [
-  AC_LIBSOURCES([utimecmp.c, utimecmp.h])
+  AC_LIBSOURCES([utimecmp.c, utimecmp.h, intprops.h])
   AC_LIBOBJ([utimecmp])
 
   dnl Prerequisites of lib/utimecmp.c.
Index: m4/xnanosleep.m4
===================================================================
RCS file: /fetish/cu/m4/xnanosleep.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -u -r1.2 -r1.3
--- m4/xnanosleep.m4    1 Mar 2005 17:26:16 -0000       1.2
+++ m4/xnanosleep.m4    9 Mar 2005 23:06:55 -0000       1.3
@@ -1,4 +1,4 @@
-# xnanosleep.m4 serial 2
+#serial 3
 dnl Copyright (C) 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,6 @@ dnl Written by Paul Eggert.
 
 AC_DEFUN([gl_XNANOSLEEP],
 [
-  AC_LIBSOURCES([xnanosleep.c, xnanosleep.h])
+  AC_LIBSOURCES([xnanosleep.c, xnanosleep.h, intprops.h])
   AC_LIBOBJ([xnanosleep])
 ])
Index: m4/xstrtol.m4
===================================================================
RCS file: /fetish/cu/m4/xstrtol.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -u -r1.4 -r1.5
--- m4/xstrtol.m4       23 Jan 2005 09:07:57 -0000      1.4
+++ m4/xstrtol.m4       9 Mar 2005 23:01:36 -0000       1.5
@@ -1,11 +1,14 @@
-# xstrtol.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+#serial 6
+dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_XSTRTOL],
 [
+  AC_LIBSOURCES([xstrtol.c, xstrtol.h, intprops.h])
+  AC_LIBOBJ([xstrtol])
+
   AC_REQUIRE([gl_PREREQ_XSTRTOL])
   AC_REQUIRE([gl_PREREQ_XSTRTOUL])
 ])




reply via email to

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