X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2Fbash%2FUtility.h.in;h=7dda46f53caf64db1d9591bbc007f0d4cf77ab33;hb=1f5c3516bf4240bcdd91979ac303298ef1f75fc3;hp=95c8be0f97292d329922b9bc7b76d6b39f93df04;hpb=77d3666adac324c796ec446fd21179bd8619b39a;p=cpPlugins.git diff --git a/appli/bash/Utility.h.in b/appli/bash/Utility.h.in index 95c8be0..7dda46f 100644 --- a/appli/bash/Utility.h.in +++ b/appli/bash/Utility.h.in @@ -6,14 +6,14 @@ #include // ------------------------------------------------------------------------- -#define @prj_NAME_OS@ -#ifdef @prj_NAME_OS@ -# define cpExtensions_STRTOK( A, B, N ) strtok_s( A, B, N ) -# define cpExtensions_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O ); -#else // @prj_NAME_OS@ -# define cpExtensions_STRTOK( A, B, N ) std::strtok( A, B ) -# define cpExtensions_SPRINTF( B, S, O ) std::sprintf( B, "%s", O ); -#endif // @prj_NAME_OS@ +#define cpPlugins_bash_OS_@CMAKE_SYSTEM_NAME@ +#ifdef cpPlugins_bash_OS_Windows +# define cpPlugins_bash_STRTOK( A, B, N ) strtok_s( A, B, N ) +# define cpPlugins_bash_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O ); +#else // cpPlugins_bash_OS_Windows +# define cpPlugins_bash_STRTOK( A, B, N ) std::strtok( A, B ) +# define cpPlugins_bash_SPRINTF( B, S, O ) std::sprintf( B, "%s", O ); +#endif // cpPlugins_bash_OS_Windows // ------------------------------------------------------------------------- namespace cpPlugins_bash @@ -33,11 +33,11 @@ namespace cpPlugins_bash buffer[ i ] = str[ i ]; buffer[ ssize ] = '\0'; char* next; - char* it = cpExtensions_STRTOK( buffer, delims.c_str( ), &next ); + char* it = cpPlugins_bash_STRTOK( buffer, delims.c_str( ), &next ); while( it != NULL ) { tokens.push_back( std::string( it ) ); - it = cpExtensions_STRTOK( NULL, delims.c_str( ), &next ); + it = cpPlugins_bash_STRTOK( NULL, delims.c_str( ), &next ); } // elihw delete [] buffer;