standardC.h

Go to the documentation of this file.
00001 
00016 #ifndef _DLR_PORTABILITY_STANDARDC_H_
00017 #define _DLR_PORTABILITY_STANDARDC_H_
00018 
00019 #include <cstdio>
00020 
00021 #ifdef _WIN32
00022 
00023 #ifndef HAVE_SNPRINTF
00024 #define HAVE_SNPRINTF 0
00025 #endif
00026 
00027 #else /* #ifdef _WIN32 */
00028 
00029 #ifndef HAVE_SNPRINTF
00030 #define HAVE_SNPRINTF 1
00031 #endif
00032 
00033 #endif /* #ifdef _WIN32 */
00034 
00035 namespace dlr {
00036 
00041   namespace portability {
00042     
00043 #if HAVE_SNPRINTF
00044   using std::snprintf;
00045 #else
00046 
00064   int snprintf(char* targetString, size_t targetSize, const char* format,
00065                ...);
00066   
00067 #endif
00068 
00069   } // namespace portability
00070   
00071 } // namespace dlr
00072 
00073 
00074 /* ======= Declarations to maintain compatibility with legacy code. ======= */
00075 
00076 namespace dlr {
00077 
00078   using portability::snprintf;
00079 
00080 } // namespace dlr
00081 
00082 #endif /* #ifndef _DLR_PORTABILITY_STANDARDC_H_ */

Generated on Mon Jul 9 20:34:03 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2