[hipl-commit] [trunk] Rev 4550: the grand #include cleanup - part I: test/ and tools/ directories

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Tue, 18 May 2010 01:16:11 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 18/05/2010 at 01:16:11
Revision: 4550
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  the grand #include cleanup - part I: test/ and tools/ directories
  
  Add required headers, remove unnecessary headers, reorder #includes.

Modified:
  M  test/auth_performance.c
  M  test/certteststub.c
  M  test/dh_performance.c
  M  test/hc_performance.c
  M  tools/hipconf.c
  M  tools/pisacert.c

=== modified file 'test/auth_performance.c'
--- test/auth_performance.c     2010-05-12 10:04:40 +0000
+++ test/auth_performance.c     2010-05-17 22:14:29 +0000
@@ -10,19 +10,29 @@
  * @author Tobias Heer
  */
 
-#include <stdio.h>              /* printf & co */
-#include <stdlib.h>             /* exit & co */
+#include "config.h"
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
-
-#include "config.h"
+#include <sys/time.h>
+#include <openssl/aes.h>
+#include <openssl/dsa.h>
+#include <openssl/ecdsa.h>
+#include <openssl/hmac.h>
+#include <openssl/rand.h>
+#include <openssl/sha.h>
+
+#ifdef HAVE_EC_CRYPTO
+#include <openssl/ecdsa.h>
+#endif
+
+#include "lib/core/crypto.h"
+#include "lib/core/keylen.h"
+#include "lib/core/debug.h"
+#include "lib/core/protodefs.h"
 #include "lib/core/statistics.h"
-#include "lib/core/keylen.h"
-#include "lib/core/crypto.h"
-
-// only use ecdsa when available
-#ifdef HAVE_EC_CRYPTO
-#include <openssl/ecdsa.h>
-#endif
 
 #define PACKET_LENGTH 1280
 

=== modified file 'test/certteststub.c'
--- test/certteststub.c 2010-05-11 07:02:11 +0000
+++ test/certteststub.c 2010-05-17 22:14:29 +0000
@@ -15,15 +15,18 @@
  *
  */
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <arpa/inet.h>
-#include <sys/time.h>
-#include <time.h>
-#include <zlib.h>
-#include <stdio.h>
+#include <openssl/conf.h>
+#include <openssl/ossl_typ.h>
+#include <openssl/safestack.h>
+
+#include "lib/core/certtools.h"
+#include "lib/core/debug.h"
 #include "lib/core/ife.h"
-#include "lib/core/icomm.h"
-#include "lib/core/debug.h"
-#include "lib/core/certtools.h"
+#include "lib/core/protodefs.h"
 
 
 int main(int argc, char *argv[])

=== modified file 'test/dh_performance.c'
--- test/dh_performance.c       2010-05-17 22:11:11 +0000
+++ test/dh_performance.c       2010-05-17 22:14:29 +0000
@@ -12,19 +12,23 @@
  *
  */
 
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
-#include <stdio.h>              /* printf & co */
-#include <stdlib.h>             /* exit & co */
-#include <openssl/dh.h>         /* open ssl library for DH operations */
-#include <openssl/sha.h>        /* open ssl library for SHA operations */
-#include <openssl/dsa.h>        /* open ssl library for DSA operations */
+#include <openssl/dh.h>
+#include <openssl/dsa.h>
+#include <openssl/rsa.h>
 #include <openssl/sha.h>
+#include <sys/time.h>
 
-#include "config.h"
 #include "lib/core/crypto.h"
+#include "lib/core/debug.h"
 #include "lib/core/filemanip.h"
 #include "lib/core/hashchain.h"
 #include "lib/core/performance.h"
+#include "lib/tool/pk.h"
 
 
 /*! \brief Number of benchmark runs */

=== modified file 'test/hc_performance.c'
--- test/hc_performance.c       2010-05-12 10:04:40 +0000
+++ test/hc_performance.c       2010-05-17 22:14:29 +0000
@@ -3,16 +3,20 @@
  *
  * Distributed under <a href="http://www.gnu.org/licenses/gpl2.txt";>GNU/GPL</a>
  */
-#include <stdio.h>              /* printf & co */
-#include <stdlib.h>             /* exit & co */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <openssl/md5.h>
 #include <openssl/sha.h>
+#include <sys/time.h>
 
-#include "lib/core/statistics.h"
+#include "lib/core/debug.h"
 #include "lib/core/hashchain.h"
 #include "lib/core/hashtree.h"
-#include "lib/core/debug.h"
+#include "lib/core/statistics.h"
 
 const hash_function_t hash_functions[2] = {(hash_function_t) SHA1,
                                            (hash_function_t) MD5};

=== modified file 'tools/hipconf.c'
--- tools/hipconf.c     2010-05-17 14:56:20 +0000
+++ tools/hipconf.c     2010-05-17 22:14:29 +0000
@@ -6,9 +6,10 @@
  * @bug     makefile compiles prefix of debug messages wrong for hipconf in
  *          "make all"
  */
+
+#include "lib/core/conf.h"
+#include "lib/core/debug.h"
 #include "lib/core/ife.h"
-#include "lib/core/debug.h"
-#include "lib/core/conf.h"
 
 /**
  * Sets system log type and calls hipconf with command line arguments.

=== modified file 'tools/pisacert.c'
--- tools/pisacert.c    2010-04-13 15:47:28 +0000
+++ tools/pisacert.c    2010-05-17 22:14:29 +0000
@@ -7,17 +7,19 @@
  * @author Thomas Jansen <mithi@xxxxxxxxx>
  */
 
-#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <time.h>
-#include <zlib.h>
 #include <unistd.h>
 #include <sys/types.h>
+
+#include "lib/core/builder.h"
+#include "lib/core/certtools.h"
 #include "lib/core/ife.h"
-#include "lib/core/icomm.h"
-#include "lib/core/debug.h"
-#include "lib/core/certtools.h"
-#include "lib/core/builder.h"
 #include "lib/core/message.h"
+#include "lib/core/protodefs.h"
+
 
 /**
  * Get the default hit of the local HIPD.

Other related posts:

  • » [hipl-commit] [trunk] Rev 4550: the grand #include cleanup - part I: test/ and tools/ directories - Diego Biurrun