diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_add.c openssl-1.0.0-beta5-headers/crypto/bn/bn_add.c
--- openssl-1.0.0-beta5/crypto/bn/bn_add.c	2008-11-11 21:57:53.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_add.c	2010-01-22 15:03:36.000000000 -0600
@@ -56,7 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_asm.c openssl-1.0.0-beta5-headers/crypto/bn/bn_asm.c
--- openssl-1.0.0-beta5/crypto/bn/bn_asm.c	2008-12-16 01:28:38.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_asm.c	2010-01-22 15:03:36.000000000 -0600
@@ -61,7 +61,6 @@
 # define NDEBUG
 #endif
 
-#include <stdio.h>
 #include <assert.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_blind.c openssl-1.0.0-beta5-headers/crypto/bn/bn_blind.c
--- openssl-1.0.0-beta5/crypto/bn/bn_blind.c	2008-08-06 10:54:10.000000000 -0500
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_blind.c	2010-01-22 15:03:36.000000000 -0600
@@ -109,7 +109,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_ctx.c openssl-1.0.0-beta5-headers/crypto/bn/bn_ctx.c
--- openssl-1.0.0-beta5/crypto/bn/bn_ctx.c	2009-06-14 05:23:29.000000000 -0500
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_ctx.c	2010-01-22 15:03:36.000000000 -0600
@@ -60,7 +60,6 @@
 #endif
 #endif
 
-#include <stdio.h>
 #include <assert.h>
 
 #include "cryptlib.h"
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_div.c openssl-1.0.0-beta5-headers/crypto/bn/bn_div.c
--- openssl-1.0.0-beta5/crypto/bn/bn_div.c	2009-06-17 06:26:09.000000000 -0500
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_div.c	2010-01-22 15:03:36.000000000 -0600
@@ -56,7 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include <openssl/bn.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_lib.c openssl-1.0.0-beta5-headers/crypto/bn/bn_lib.c
--- openssl-1.0.0-beta5/crypto/bn/bn_lib.c	2008-12-29 06:44:33.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_lib.c	2010-01-22 15:03:36.000000000 -0600
@@ -61,9 +61,7 @@
 # define NDEBUG
 #endif
 
-#include <assert.h>
 #include <limits.h>
-#include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_mont.c openssl-1.0.0-beta5-headers/crypto/bn/bn_mont.c
--- openssl-1.0.0-beta5/crypto/bn/bn_mont.c	2008-05-02 13:47:48.000000000 -0500
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_mont.c	2010-01-22 15:03:36.000000000 -0600
@@ -116,7 +116,9 @@
  * sections 3.8 and 4.2 in http://security.ece.orst.edu/koc/papers/r01rsasw.pdf
  */
 
+#ifdef BN_COUNT
 #include <stdio.h>
+#endif
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_mul.c openssl-1.0.0-beta5-headers/crypto/bn/bn_mul.c
--- openssl-1.0.0-beta5/crypto/bn/bn_mul.c	2009-12-02 09:28:05.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_mul.c	2010-01-22 15:03:36.000000000 -0600
@@ -61,7 +61,9 @@
 # define NDEBUG
 #endif
 
+#ifdef BN_COUNT
 #include <stdio.h>
+#endif
 #include <assert.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_recp.c openssl-1.0.0-beta5-headers/crypto/bn/bn_recp.c
--- openssl-1.0.0-beta5/crypto/bn/bn_recp.c	2008-11-11 21:57:55.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_recp.c	2010-01-22 15:03:36.000000000 -0600
@@ -56,7 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_shift.c openssl-1.0.0-beta5-headers/crypto/bn/bn_shift.c
--- openssl-1.0.0-beta5/crypto/bn/bn_shift.c	2008-10-28 08:46:14.000000000 -0500
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_shift.c	2010-01-22 15:03:36.000000000 -0600
@@ -56,7 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_sqr.c openssl-1.0.0-beta5-headers/crypto/bn/bn_sqr.c
--- openssl-1.0.0-beta5/crypto/bn/bn_sqr.c	2005-08-28 17:49:49.000000000 -0500
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_sqr.c	2010-01-22 15:03:36.000000000 -0600
@@ -56,7 +56,9 @@
  * [including the GNU Public Licence.]
  */
 
+#ifdef BN_COUNT
 #include <stdio.h>
+#endif
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/bn/bn_word.c openssl-1.0.0-beta5-headers/crypto/bn/bn_word.c
--- openssl-1.0.0-beta5/crypto/bn/bn_word.c	2008-11-11 21:57:55.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/bn/bn_word.c	2010-01-22 15:03:36.000000000 -0600
@@ -56,7 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
diff -Nur openssl-1.0.0-beta5/crypto/rand/rand.h openssl-1.0.0-beta5-headers/crypto/rand/rand.h
--- openssl-1.0.0-beta5/crypto/rand/rand.h	2008-11-11 21:58:04.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/rand/rand.h	2010-01-22 15:04:46.000000000 -0600
@@ -59,7 +59,7 @@
 #ifndef HEADER_RAND_H
 #define HEADER_RAND_H
 
-#include <stdlib.h>
+#include <stddef.h>
 #include <openssl/ossl_typ.h>
 #include <openssl/e_os2.h>
 
diff -Nur openssl-1.0.0-beta5/crypto/rsa/rsa_eay.c openssl-1.0.0-beta5-headers/crypto/rsa/rsa_eay.c
--- openssl-1.0.0-beta5/crypto/rsa/rsa_eay.c	2008-09-14 08:51:44.000000000 -0500
+++ openssl-1.0.0-beta5-headers/crypto/rsa/rsa_eay.c	2010-01-22 15:03:36.000000000 -0600
@@ -109,7 +109,6 @@
  *
  */
 
-#include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
 #include <openssl/rsa.h>
diff -Nur openssl-1.0.0-beta5/crypto/rsa/rsa_none.c openssl-1.0.0-beta5-headers/crypto/rsa/rsa_none.c
--- openssl-1.0.0-beta5/crypto/rsa/rsa_none.c	2000-11-06 16:34:17.000000000 -0600
+++ openssl-1.0.0-beta5-headers/crypto/rsa/rsa_none.c	2010-01-22 15:03:36.000000000 -0600
@@ -56,7 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/bn.h>
 #include <openssl/rsa.h>
