Remote Call Framework 3.3
Unix/OutputDebugString.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2022, Delta V Software. All rights reserved.
6 // https://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF under GPL terms.
12 //
13 // Version: 3.3
14 // Contact: support <at> deltavsoft.com
15 //
16 //******************************************************************************
17 
18 #ifndef INCLUDE_UTIL_PLATFORM_OS_UNIX_OUTPUTDEBUGSTRING_HPP
19 #define INCLUDE_UTIL_PLATFORM_OS_UNIX_OUTPUTDEBUGSTRING_HPP
20 
21 #include <stdio.h>
22 
23 namespace Platform {
24 
25  namespace OS {
26 
27  inline void OutputDebugString(const char *sz)
28  {
29 
30 #ifdef OUTPUTDEBUGSTRING_TO_STDERR
31  fprintf(stderr, "%s", sz);
32 #endif
33 
34 #ifdef OUTPUTDEBUGSTRING_TO_STDOUT
35  fprintf(stdout, "%s", sz);
36 #endif
37 
38 #ifdef OUTPUTDEBUGSTRING_TO_FILE
39  static FILE *file = fopen( "OutputDebugString.txt", "w" );
40  fprintf(file, "%s", sz);
41 #endif
42 
43  }
44 
45  }
46 
47 }
48 
49 #endif // ! INCLUDE_UTIL_PLATFORM_OS_UNIX_OUTPUTDEBUGSTRING_HPP
Definition: Unix/BsdSockets.hpp:79