mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-18 16:33:01 +00:00
cleanup programs
Clean up the contents of programs, add more guards to includes, move all defines to the top of the top of files, remove some unused includes
This commit is contained in:
@@ -29,22 +29,25 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_printf printf
|
||||
#include <stdio.h>
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(POLARSSL_MD_C) && defined(POLARSSL_FS_IO)
|
||||
#include "polarssl/md.h"
|
||||
|
||||
#if !defined(POLARSSL_MD_C)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_MD_C) || !defined(POLARSSL_FS_IO)
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
((void) argc);
|
||||
((void) argv);
|
||||
|
||||
polarssl_printf("POLARSSL_MD_C not defined.\n");
|
||||
polarssl_printf("POLARSSL_MD_C and/or POLARSSL_FS_IO not defined.\n");
|
||||
return( 0 );
|
||||
}
|
||||
#else
|
||||
@@ -225,4 +228,4 @@ exit:
|
||||
|
||||
return( ret );
|
||||
}
|
||||
#endif /* POLARSSL_MD_C */
|
||||
#endif /* POLARSSL_MD_C && POLARSSL_FS_IO */
|
||||
|
||||
@@ -29,12 +29,13 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(POLARSSL_MD5_C)
|
||||
#include "polarssl/md5.h"
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_MD5_C)
|
||||
int main( int argc, char *argv[] )
|
||||
|
||||
@@ -29,15 +29,18 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_printf printf
|
||||
#include <stdio.h>
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(POLARSSL_MD5_C) && defined(POLARSSL_FS_IO)
|
||||
#include "polarssl/md5.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_MD5_C) || !defined(POLARSSL_FS_IO)
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
|
||||
@@ -29,15 +29,18 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_printf printf
|
||||
#include <stdio.h>
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(POLARSSL_SHA1_C) && defined(POLARSSL_FS_IO)
|
||||
#include "polarssl/sha1.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_SHA1_C) || !defined(POLARSSL_FS_IO)
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
|
||||
@@ -29,15 +29,18 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_printf printf
|
||||
#include <stdio.h>
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(POLARSSL_SHA256_C) && defined(POLARSSL_FS_IO)
|
||||
#include "polarssl/sha256.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_SHA256_C) || !defined(POLARSSL_FS_IO)
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user