cleanup library and some basic tests. Includes, add guards to includes
diff --git a/library/error.c b/library/error.c
index a4e6fc3..1be54e8 100644
--- a/library/error.c
+++ b/library/error.c
@@ -28,10 +28,13 @@
#if defined(POLARSSL_ERROR_C) || defined(POLARSSL_ERROR_STRERROR_DUMMY)
#include "polarssl/error.h"
+#include <string.h>
#endif
#if defined(POLARSSL_ERROR_C)
+#include <stdio.h>
+
#if defined(POLARSSL_AES_C)
#include "polarssl/aes.h"
#endif
@@ -172,9 +175,6 @@
#include "polarssl/xtea.h"
#endif
-#include <stdio.h>
-#include <string.h>
-
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#define snprintf _snprintf
@@ -746,8 +746,6 @@
#if defined(POLARSSL_ERROR_STRERROR_DUMMY)
-#include <string.h>
-
/*
* Provide an non-function in case POLARSSL_ERROR_C is not defined
*/