mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	benchmark application also works without POLARSSL_ERROR_C
This commit is contained in:
		
							parent
							
								
									12895d15f8
								
							
						
					
					
						commit
						0c5e4290e1
					
				@ -121,6 +121,15 @@ do {                                                                    \
 | 
				
			|||||||
                    ( hardclock() - tsc ) / ( j * BUFSIZE ) );          \
 | 
					                    ( hardclock() - tsc ) / ( j * BUFSIZE ) );          \
 | 
				
			||||||
} while( 0 )
 | 
					} while( 0 )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if defined(POLARSSL_ERROR_C)
 | 
				
			||||||
 | 
					#define PRINT_ERROR                                                     \
 | 
				
			||||||
 | 
					        polarssl_strerror( ret, ( char * )tmp, sizeof( tmp ) );         \
 | 
				
			||||||
 | 
					        printf( "FAILED: %s\n", tmp );
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#define PRINT_ERROR                                                     \
 | 
				
			||||||
 | 
					        printf( "FAILED: -0x%04x\n", -ret );
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define TIME_PUBLIC( TITLE, TYPE, CODE )                                \
 | 
					#define TIME_PUBLIC( TITLE, TYPE, CODE )                                \
 | 
				
			||||||
do {                                                                    \
 | 
					do {                                                                    \
 | 
				
			||||||
    unsigned long i;                                                    \
 | 
					    unsigned long i;                                                    \
 | 
				
			||||||
@ -138,8 +147,7 @@ do {                                                                    \
 | 
				
			|||||||
                                                                        \
 | 
					                                                                        \
 | 
				
			||||||
    if( ret != 0 )                                                      \
 | 
					    if( ret != 0 )                                                      \
 | 
				
			||||||
    {                                                                   \
 | 
					    {                                                                   \
 | 
				
			||||||
        polarssl_strerror( ret, ( char * )tmp, sizeof( tmp ) );         \
 | 
					PRINT_ERROR;                                                            \
 | 
				
			||||||
        printf( "FAILED: %s\n", tmp );                                  \
 | 
					 | 
				
			||||||
    }                                                                   \
 | 
					    }                                                                   \
 | 
				
			||||||
    else                                                                \
 | 
					    else                                                                \
 | 
				
			||||||
        printf( "%9lu " TYPE "/s\n", i / 3 );                           \
 | 
					        printf( "%9lu " TYPE "/s\n", i / 3 );                           \
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user