bug-gnulib
[Top][All Lists]
Advanced

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

Re: size_max


From: Bruno Haible
Subject: Re: size_max
Date: Wed, 7 Oct 2009 00:33:01 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> > Hello? You propose to remove a file that is in use by other files in gnulib,
> > without explaining what to do with the other files. ?!
> 
> No.  Reread the proposal.  The size_max module stays, and the used file 
> m4/size_max.m4 remains available for use.  The unused file lib/size_max.h is 
> pruned (since nobody includes it, and since size_max.m4 impacts config.h, 
> rather than requiring clients to include yet another header).

Oh, thanks for correcting me. I had wanted to change xsize.h to
#include "size_max.h", but apparently never had done so.

I now have no objection against removing just size_max.h, if it's reasonably
documented how to use the m4/size_max.m4 macros. That essentially means to copy
its contents to the 'Include' section of the module description. Proposed
changed patch (plus the NEWS paragraph):


2009-10-06  Simon Josefsson  <address@hidden>
            Bruno Haible  <address@hidden>

        * lib/size_max.h: Remove file.
        * modules/size_max (Files): Remove lib/size_max.h.
        (Makefile.am): Don't add size_max.h to lib_SOURCES.
        (Include): Remove size_max.h. Add its essential contents instead.
        * lib/xsize.h: Add comments, originally from lib/size_max.h.
        * NEWS: Explain.

--- modules/size_max.orig       2009-10-07 00:28:24.000000000 +0200
+++ modules/size_max    2009-10-07 00:28:04.000000000 +0200
@@ -3,7 +3,6 @@
 
 Files:
 m4/size_max.m4
-lib/size_max.h
 
 Depends-on:
 
@@ -11,14 +10,19 @@
 gl_SIZE_MAX
 
 Makefile.am:
-lib_SOURCES += size_max.h
 
 Include:
-"size_max.h"
+/* Get SIZE_MAX declaration on systems like Solaris 7/8/9.  */
+#include <limits.h>
+/* Get SIZE_MAX declaration on systems like glibc 2.  */
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+/* On systems where these include files don't define it, SIZE_MAX is defined
+   in config.h.  */
 
 License:
 LGPLv2+
 
 Maintainer:
-Simon Josefsson
 Bruno Haible
--- lib/xsize.h.orig    2009-10-07 00:28:24.000000000 +0200
+++ lib/xsize.h 2009-10-07 00:27:38.000000000 +0200
@@ -1,6 +1,6 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008-2009 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
@@ -23,10 +23,14 @@
 #include <stddef.h>
 
 /* Get SIZE_MAX.  */
+/* Get SIZE_MAX declaration on systems like Solaris 7/8/9.  */
 #include <limits.h>
+/* Get SIZE_MAX declaration on systems like glibc 2.  */
 #if HAVE_STDINT_H
 # include <stdint.h>
 #endif
+/* On systems where these include files don't define it, SIZE_MAX is defined
+   in config.h.  */
 
 /* The size of memory objects is often computed through expressions of
    type size_t. Example:




reply via email to

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