]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Utility.h
Windows compilation (1/3)
[cpPlugins.git] / lib / cpExtensions / Utility.h
index e78b42064b63bce22b13f312a9dd8006da2f3cf7..065dadf92fbee7f63f48b6cc2ff11f6180f0d572 100644 (file)
@@ -8,14 +8,13 @@
 #include <cpExtensions/Config.h>
 
 // -------------------------------------------------------------------------
-#ifdef cpPlugins_Windows
-#  define cpExtensions_STRTOK( A, B, N )  strtok_s(  A, B, N )
+#ifdef cpPlugins_OS_Windows
+#  define cpExtensions_STRTOK( A, B, N )  strtok_s( A, B, N )
 #  define cpExtensions_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O );
-#  define 
-#else // cpPlugins_Windows
+#else // cpPlugins_OS_Windows
 #  define cpExtensions_STRTOK( A, B, N )  std::strtok( A, B )
 #  define cpExtensions_SPRINTF( B, S, O ) std::sprintf( B, "%s", O );
-#endif // cpPlugins_Windows
+#endif // cpPlugins_OS_Windows
 
 // -------------------------------------------------------------------------
 #define cpExtensions_CHRONO                                             \
@@ -113,12 +112,12 @@ namespace cpExtensions
   inline std::string CanonicalPath( const std::string& path )
   {
     std::string ret = "";
-#ifdef cpPlugins_Windows
+#ifdef cpPlugins_OS_Windows
     TCHAR  buffer[ 4096 ] = TEXT( "" );
     TCHAR** lppPart = { NULL };
     GetFullPathName( path.c_str( ), 4096, buffer, lppPart );
     ret = std::string( buffer );
-#else // cpPlugins_Windows
+#else // cpPlugins_OS_Windows
     char* canonical_path = realpath( path.c_str( ), NULL );
     if( canonical_path != NULL )
     {
@@ -126,7 +125,7 @@ namespace cpExtensions
       free( canonical_path );
 
     } // fi
-#endif // cpPlugins_Windows
+#endif // cpPlugins_OS_Windows
     return( ret );
   }