Commit 24d72a1b0b3d7227000a8b9a54f3513f99c7fe4e

Werner Lemberg 2009-01-13T17:34:48

Don't use stdlib.h and friends directly. Reported by Mickey Gabel <mickey@monfort.co.il>. * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/. * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h: s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/. * src/autofit/aftypes.h, src/autofit/afhints.c, src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/ * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.

diff --git a/ChangeLog b/ChangeLog
index 2bd1d1b..cf2d54e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2009-01-13  Werner Lemberg  <wl@gnu.org>
+
+	Don't use stdlib.h and friends directly.
+	Reported by Mickey Gabel <mickey@monfort.co.il>.
+
+	* src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
+
+	* src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h:
+	s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
+
+	* src/autofit/aftypes.h, src/autofit/afhints.c,
+	src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/
+
+	* src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
+
 2009-01-12  Werner Lemberg  <wl@gnu.org>
 
 	Avoid compiler warnings.
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index 43c7440..8ab1761 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -127,7 +127,7 @@
 
 #ifdef AF_DEBUG
 
-#include <stdio.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H
 
   static const char*
   af_dir_str( AF_Direction  dir )
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index bb59e1b..626a388 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter types (specification only).                              */
 /*                                                                         */
-/*  Copyright 2003, 2004, 2005, 2006, 2007, 2008 by                        */
+/*  Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by                  */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -58,7 +58,8 @@ FT_BEGIN_HEADER
 
 #ifdef AF_DEBUG
 
-#include <stdio.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
 #define AF_LOG( x )  do { if ( _af_debug ) printf x; } while ( 0 )
 
 extern int    _af_debug;
diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c
index 9eca841..8b2a330 100644
--- a/src/base/ftdbgmem.c
+++ b/src/base/ftdbgmem.c
@@ -33,8 +33,7 @@
                     * memory, however.
                     */
 
-#include <stdio.h>
-#include <stdlib.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H
 
   FT_BASE_DEF( const char* )  _ft_debug_file   = 0;
   FT_BASE_DEF( long )         _ft_debug_lineno = 0;
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index af2022d..b0f054a 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
 /*  parse compressed PCF fonts, as found with many X11 server              */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2004, 2005, 2006 by                              */
+/*  Copyright 2002, 2003, 2004, 2005, 2006, 2009 by                        */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -25,7 +25,7 @@
 #include FT_INTERNAL_STREAM_H
 #include FT_INTERNAL_DEBUG_H
 #include FT_GZIP_H
-#include <string.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H
 
 
 #include FT_MODULE_ERRORS_H
diff --git a/src/lzw/ftlzw.c b/src/lzw/ftlzw.c
index 45fbf7b..a00bd50 100644
--- a/src/lzw/ftlzw.c
+++ b/src/lzw/ftlzw.c
@@ -8,7 +8,7 @@
 /*  be used to parse compressed PCF fonts, as found with many X11 server   */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2005, 2006 by                                          */
+/*  Copyright 2004, 2005, 2006, 2009 by                                    */
 /*  Albert Chin-A-Young.                                                   */
 /*                                                                         */
 /*  Based on code in src/gzip/ftgzip.c, Copyright 2004 by                  */
@@ -27,8 +27,7 @@
 #include FT_INTERNAL_STREAM_H
 #include FT_INTERNAL_DEBUG_H
 #include FT_LZW_H
-#include <string.h>
-#include <stdio.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H
 
 
 #include FT_MODULE_ERRORS_H
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 5d7e2f4..f9ab3da 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript hinting algorithm (body).                                 */
 /*                                                                         */
-/*  Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by            */
+/*  Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
@@ -898,7 +898,7 @@
 
 #ifdef DEBUG_ZONES
 
-#include <stdio.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H
 
   static void
   psh_print_zone( PSH_Zone  zone )
diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h
index c5dbd50..d9d73e3 100644
--- a/src/raster/ftmisc.h
+++ b/src/raster/ftmisc.h
@@ -5,7 +5,7 @@
 /*    Miscellaneous macros for stand-alone rasterizer (specification       */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 2005 by                                                      */
+/*  Copyright 2005, 2009 by                                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
@@ -27,7 +27,8 @@
 #ifndef __FTMISC_H__
 #define __FTMISC_H__
 
-#include <string.h> /* memset */
+  /* memset */
+#include FT_CONFIG_STANDARD_LIBRARY_H
 
 #define FT_BEGIN_HEADER
 #define FT_END_HEADER