changeset 12477:72b9e03189fd

math, unistd: avoid redundant includes * lib/math.in.h (isnan): No need to re-include <math.h>. * lib/unistd.in.h (getcwd): Likewise, for <stdlib.h>. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Mon, 21 Dec 2009 11:32:58 -0700
parents 4d9ecf602cb6
children 0c2e471e00e6
files ChangeLog lib/math.in.h lib/unistd.in.h
diffstat 3 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-12-22  Eric Blake  <ebb9@byu.net>
 
+	math, unistd: avoid redundant includes
+	* lib/math.in.h (isnan): No need to re-include <math.h>.
+	* lib/unistd.in.h (getcwd): Likewise, for <stdlib.h>.
+
 	getsubopt: work around cygwin bug
 	* lib/stdlib.in.h (includes): Move unistd inclusion sooner, to
 	avoid conflicting with system getsubopt.
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -411,7 +411,6 @@
 # if @HAVE_ISNANF@
 /* The original <math.h> included above provides a declaration of isnan macro
    or (older) isnanf function.  */
-#  include <math.h>
 #  if __GNUC__ >= 4
     /* GCC 4.0 and newer provides three built-ins for isnan.  */
 #   undef isnanf
@@ -434,7 +433,6 @@
    to 'double' numbers earlier but now is a type-generic macro.  */
 # if @HAVE_ISNAND@
 /* The original <math.h> included above provides a declaration of isnan macro.  */
-#  include <math.h>
 #  if __GNUC__ >= 4
     /* GCC 4.0 and newer provides three built-ins for isnan.  */
 #   undef isnand
@@ -455,7 +453,6 @@
 /* Test for NaN for 'long double' numbers.  */
 # if @HAVE_ISNANL@
 /* The original <math.h> included above provides a declaration of isnan macro or (older) isnanl function.  */
-#  include <math.h>
 #  if __GNUC__ >= 4
     /* GCC 4.0 and newer provides three built-ins for isnan.  */
 #   undef isnanl
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -346,9 +346,6 @@
 
 
 #if @GNULIB_GETCWD@
-/* Include the headers that might declare getcwd so that they will not
-   cause confusion if included after this file.  */
-# include <stdlib.h>
 # if @REPLACE_GETCWD@
 /* Get the name of the current working directory, and put it in SIZE bytes
    of BUF.