]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.1.0/test_and_benchmark/libbenchmark/src/libbenchmark_porting_abstraction_layer/libbenchmark_porting_abstraction_layer_print_string.c
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.1.0 / test_and_benchmark / libbenchmark / src / libbenchmark_porting_abstraction_layer / libbenchmark_porting_abstraction_layer_print_string.c
1 /***** includes *****/
2 #include "libbenchmark_porting_abstraction_layer_internal.h"
3
4
5
6
7
8 /****************************************************************************/
9 #if( defined _MSC_VER )
10   /* TRD : MSVC compiler
11
12            an unfortunately necessary hack for MSVC
13            MSVC only defines __STDC__ if /Za is given, where /Za turns off MSVC C extensions - 
14            which prevents Windows header files from compiling.
15   */
16
17   #define __STDC__         1
18   #define __STDC_HOSTED__  1
19 #endif
20
21
22
23
24
25 /****************************************************************************/
26 #if( defined __STDC__ && __STDC_HOSTED__ == 1 && !defined KERNEL_MODE )
27
28   #define LIBBENCHMARK_PAL_PRINT_STRING
29
30   #include <stdio.h>
31
32   void libbenchmark_pal_print_string( char const * const string )
33   {
34     LFDS710_PAL_ASSERT( string != NULL );
35
36     printf( "%s", string );
37
38     fflush( stdout );
39
40     return;
41   }
42
43 #endif
44
45
46
47
48
49 /****************************************************************************/
50 #if( !defined LIBBENCHMARK_PAL_PRINT_STRING )
51
52   #pragma warning( disable : 4100 )
53
54   void libbenchmark_pal_print_string( char const * const string )
55   {
56     LFDS710_PAL_ASSERT( string != NULL );
57
58     return;
59   }
60
61   #pragma warning( default : 4100 )
62
63 #endif
64