This commit is contained in:
		| @@ -1,96 +1,96 @@ | ||||
| /*********************************************************************** | ||||
|  *  | ||||
|  *  Copyright (C) 2006 Novell, Inc. All Rights Reserved. | ||||
|  * | ||||
|  *  This library is free software; you can redistribute it and/or | ||||
|  *  modify it under the terms of the GNU Lesser General Public | ||||
|  *  License as published by the Free Software Foundation; version 2.1 | ||||
|  *  of the License. | ||||
|  * | ||||
|  *  This library is distributed in the hope that it will be useful, | ||||
|  *  but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | ||||
|  *  Library Lesser General Public License for more details. | ||||
|  * | ||||
|  *  You should have received a copy of the GNU Lesser General Public | ||||
|  *  License along with this library; if not, Novell, Inc. | ||||
|  *  | ||||
|  *  To contact Novell about this file by physical or electronic mail,  | ||||
|  *  you may find current contact information at www.novell.com. | ||||
|  *  | ||||
|  *  Author: Juan Carlos Luciani <jluciani@novell.com> | ||||
|  * | ||||
|  ***********************************************************************/ | ||||
|  | ||||
| #ifndef _PLATFORM_H_ | ||||
| #define _PLATFORM_H_ | ||||
|  | ||||
| //===[ Include files ]===================================================== | ||||
|  | ||||
| #include <windows.h> | ||||
| #include <stdio.h> | ||||
| #include <winerror.h> | ||||
|  | ||||
| //===[ Type definitions ]================================================== | ||||
|  | ||||
| #ifndef CONTAINING_RECORD | ||||
| #define CONTAINING_RECORD(address, type, field) ((type *)(     \ | ||||
|              (char*)(address) -                                \ | ||||
|              (char*)(&((type *)0)->field))) | ||||
| #endif | ||||
|  | ||||
| // | ||||
| // DbgTrace macro define | ||||
| // | ||||
| //#define DbgTrace(LEVEL, X, Y) {                          \ | ||||
| //char printBuff[256];                                     \ | ||||
| //   if (LEVEL == 0 || DebugLevel >= LEVEL)                \ | ||||
| //   {                                                     \ | ||||
| //      _snprintf(printBuff, sizeof(printBuff), X, Y);     \ | ||||
| //      printf("PwdMech %s", printBuff);                   \ | ||||
| //   }                                                     \ | ||||
| //} | ||||
| #define DbgTrace(LEVEL, X, Y) {                                  \ | ||||
| char formatBuff[128];                                            \ | ||||
| char printBuff[256];                                             \ | ||||
| /*********************************************************************** | ||||
|  *  | ||||
|  *  Copyright (C) 2006 Novell, Inc. All Rights Reserved. | ||||
|  * | ||||
|  *  This library is free software; you can redistribute it and/or | ||||
|  *  modify it under the terms of the GNU Lesser General Public | ||||
|  *  License as published by the Free Software Foundation; version 2.1 | ||||
|  *  of the License. | ||||
|  * | ||||
|  *  This library is distributed in the hope that it will be useful, | ||||
|  *  but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | ||||
|  *  Library Lesser General Public License for more details. | ||||
|  * | ||||
|  *  You should have received a copy of the GNU Lesser General Public | ||||
|  *  License along with this library; if not, Novell, Inc. | ||||
|  *  | ||||
|  *  To contact Novell about this file by physical or electronic mail,  | ||||
|  *  you may find current contact information at www.novell.com. | ||||
|  *  | ||||
|  *  Author: Juan Carlos Luciani <jluciani@novell.com> | ||||
|  * | ||||
|  ***********************************************************************/ | ||||
|  | ||||
| #ifndef _PLATFORM_H_ | ||||
| #define _PLATFORM_H_ | ||||
|  | ||||
| //===[ Include files ]===================================================== | ||||
|  | ||||
| #include <windows.h> | ||||
| #include <stdio.h> | ||||
| #include <winerror.h> | ||||
|  | ||||
| //===[ Type definitions ]================================================== | ||||
|  | ||||
| #ifndef CONTAINING_RECORD | ||||
| #define CONTAINING_RECORD(address, type, field) ((type *)(     \ | ||||
|              (char*)(address) -                                \ | ||||
|              (char*)(&((type *)0)->field))) | ||||
| #endif | ||||
|  | ||||
| // | ||||
| // DbgTrace macro define | ||||
| // | ||||
| //#define DbgTrace(LEVEL, X, Y) {                          \ | ||||
| //char printBuff[256];                                     \ | ||||
| //   if (LEVEL == 0 || DebugLevel >= LEVEL)                \ | ||||
| //   {                                                     \ | ||||
| //      _snprintf(printBuff, sizeof(printBuff), X, Y);     \ | ||||
| //      printf("PwdMech %s", printBuff);                   \ | ||||
| //   }                                                     \ | ||||
| //} | ||||
| #define DbgTrace(LEVEL, X, Y) {                                  \ | ||||
| char formatBuff[128];                                            \ | ||||
| char printBuff[256];                                             \ | ||||
| FILE  *pDebugFile;                                               \ | ||||
|    if (LEVEL == 0 || PwdMechDebugLevel >= LEVEL)                 \ | ||||
|    {                                                             \ | ||||
|       strcpy(formatBuff, "CASA_PwdMech ");                       \ | ||||
|       strncat(formatBuff, X, sizeof(formatBuff) - 8);            \ | ||||
|       _snprintf(printBuff, sizeof(printBuff), formatBuff, Y);    \ | ||||
|       if (pPwdMechDebugLogFilePath)                              \ | ||||
|       {                                                          \ | ||||
|    if (LEVEL == 0 || PwdMechDebugLevel >= LEVEL)                 \ | ||||
|    {                                                             \ | ||||
|       strcpy(formatBuff, "CASA_PwdMech ");                       \ | ||||
|       strncat(formatBuff, X, sizeof(formatBuff) - 8);            \ | ||||
|       _snprintf(printBuff, sizeof(printBuff), formatBuff, Y);    \ | ||||
|       if (pPwdMechDebugLogFilePath)                              \ | ||||
|       {                                                          \ | ||||
|          pDebugFile = fopen(pPwdMechDebugLogFilePath, "a+");     \ | ||||
|          if (pDebugFile)                                         \ | ||||
|          {                                                       \ | ||||
|             fwrite(printBuff, strlen(printBuff), 1, pDebugFile); \ | ||||
|             fclose(pDebugFile);                                  \ | ||||
|          }                                                       \ | ||||
|       }                                                          \ | ||||
|       else                                                       \ | ||||
|          OutputDebugString(printBuff);                           \ | ||||
|    }                                                             \ | ||||
| } | ||||
|  | ||||
| #define INT32_MAX (2147483647) | ||||
| #define UINT32_MAX (4294967295U) | ||||
| #define bool BOOLEAN | ||||
| #define true TRUE | ||||
| #define false FALSE | ||||
| #define strtok_r strtok_s | ||||
| #define strcasecmp strcmpi | ||||
|  | ||||
| //===[ Inlines functions   ]=============================================== | ||||
|  | ||||
| //===[ Function prototypes ]=============================================== | ||||
|  | ||||
| //===[ Global externals ]================================================== | ||||
|  | ||||
| //===[ External prototypes ]=============================================== | ||||
|  | ||||
|  | ||||
| //========================================================================= | ||||
|  | ||||
| #endif // _PLATFORM_H_ | ||||
|  | ||||
|          if (pDebugFile)                                         \ | ||||
|          {                                                       \ | ||||
|             fwrite(printBuff, strlen(printBuff), 1, pDebugFile); \ | ||||
|             fclose(pDebugFile);                                  \ | ||||
|          }                                                       \ | ||||
|       }                                                          \ | ||||
|       else                                                       \ | ||||
|          OutputDebugString(printBuff);                           \ | ||||
|    }                                                             \ | ||||
| } | ||||
|  | ||||
| #define INT32_MAX (2147483647) | ||||
| #define UINT32_MAX (4294967295U) | ||||
| #define bool BOOLEAN | ||||
| #define true TRUE | ||||
| #define false FALSE | ||||
| #define strtok_r strtok_s | ||||
| #define strcasecmp stricmp | ||||
|  | ||||
| //===[ Inlines functions   ]=============================================== | ||||
|  | ||||
| //===[ Function prototypes ]=============================================== | ||||
|  | ||||
| //===[ Global externals ]================================================== | ||||
|  | ||||
| //===[ External prototypes ]=============================================== | ||||
|  | ||||
|  | ||||
| //========================================================================= | ||||
|  | ||||
| #endif // _PLATFORM_H_ | ||||
|  | ||||
|   | ||||
| @@ -103,89 +103,6 @@ | ||||
| 				CommandLine="mkdir \"Program Files"\novell\
mkdir \"Program Files"\novell\casa
mkdir \"Program Files"\novell\casa\lib\
mkdir \"Program Files"\novell\casa\etc\
mkdir \"Program Files"\novell\casa\etc\auth\
mkdir \"Program Files"\novell\casa\etc\auth\mechanisms\
copy PwdAuthenticate.conf \"Program Files"\novell\casa\etc\auth\mechanisms\PwdAuthenticate.conf
copy $(OutDir)\pwmech.dll \"Program Files"\novell\casa\lib\pwmech.dll
" | ||||
| 			/> | ||||
| 		</Configuration> | ||||
| 		<Configuration | ||||
| 			Name="Release|Win32" | ||||
| 			OutputDirectory="..\windows\$(ConfigurationName)" | ||||
| 			IntermediateDirectory="..\windows\$(ConfigurationName)" | ||||
| 			ConfigurationType="2" | ||||
| 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||||
| 			CharacterSet="2" | ||||
| 			> | ||||
| 			<Tool | ||||
| 				Name="VCPreBuildEventTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCCustomBuildTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCXMLDataGeneratorTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCWebServiceProxyGeneratorTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCMIDLTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCCLCompilerTool" | ||||
| 				AdditionalOptions="-D"_CRT_SECURE_NO_DEPRECATE"" | ||||
| 				AdditionalIncludeDirectories=".\;..\;..\..\;..\..\..\;..\..\..\include;..\..\..\include\windows;..\..\..\..\..\..\CASA\include;..\..\..\..\..\..\..\..\CASA\micasadk\Release" | ||||
| 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" | ||||
| 				RuntimeLibrary="0" | ||||
| 				UsePrecompiledHeader="0" | ||||
| 				WarningLevel="3" | ||||
| 				Detect64BitPortabilityProblems="true" | ||||
| 				DebugInformationFormat="3" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCManagedResourceCompilerTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCResourceCompilerTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCPreLinkEventTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCLinkerTool" | ||||
| 				AdditionalOptions="/EXPORT:GetAuthTokenInterface" | ||||
| 				AdditionalDependencies="micasa.lib" | ||||
| 				OutputFile="$(OutDir)/pwmech.dll" | ||||
| 				LinkIncremental="1" | ||||
| 				AdditionalLibraryDirectories=""\Program Files\Novell\CASA\lib";..\..\..\..\..\..\CASA\micasadk\Release" | ||||
| 				IgnoreDefaultLibraryNames="libc" | ||||
| 				GenerateDebugInformation="true" | ||||
| 				SubSystem="0" | ||||
| 				OptimizeReferences="2" | ||||
| 				EnableCOMDATFolding="2" | ||||
| 				TargetMachine="1" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCALinkTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCManifestTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCXDCMakeTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCBscMakeTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCFxCopTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCAppVerifierTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCWebDeploymentTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCPostBuildEventTool" | ||||
| 				CommandLine="" | ||||
| 			/> | ||||
| 		</Configuration> | ||||
| 		<Configuration | ||||
| 			Name="Debug|x64" | ||||
| 			OutputDirectory="$(PlatformName)\$(ConfigurationName)" | ||||
| @@ -269,7 +186,90 @@ | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCPostBuildEventTool" | ||||
| 				CommandLine="mkdir \"Program Files"\novell\
mkdir \"Program Files"\novell\casa
mkdir \"Program Files"\novell\casa\lib\
mkdir \"Program Files"\novell\casa\etc\
mkdir \"Program Files"\novell\casa\etc\auth\
mkdir \"Program Files"\novell\casa\etc\auth\mechanisms\
copy PwdAuthenticate.conf \"Program Files"\novell\casa\etc\auth\mechanisms\PwdAuthenticate.conf
copy $(OutDir)\pwmech.dll \"Program Files"\novell\casa\lib\pwmech.dll
" | ||||
| 				CommandLine="" | ||||
| 			/> | ||||
| 		</Configuration> | ||||
| 		<Configuration | ||||
| 			Name="Release|Win32" | ||||
| 			OutputDirectory="..\windows\$(ConfigurationName)" | ||||
| 			IntermediateDirectory="..\windows\$(ConfigurationName)" | ||||
| 			ConfigurationType="2" | ||||
| 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||||
| 			CharacterSet="2" | ||||
| 			> | ||||
| 			<Tool | ||||
| 				Name="VCPreBuildEventTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCCustomBuildTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCXMLDataGeneratorTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCWebServiceProxyGeneratorTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCMIDLTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCCLCompilerTool" | ||||
| 				AdditionalOptions="-D"_CRT_SECURE_NO_DEPRECATE"" | ||||
| 				AdditionalIncludeDirectories=".\;..\;..\..\;..\..\..\;..\..\..\include;..\..\..\include\windows;..\..\..\..\..\..\CASA\include;..\..\..\..\..\..\..\..\CASA\micasadk\Release" | ||||
| 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" | ||||
| 				RuntimeLibrary="0" | ||||
| 				UsePrecompiledHeader="0" | ||||
| 				WarningLevel="3" | ||||
| 				Detect64BitPortabilityProblems="true" | ||||
| 				DebugInformationFormat="3" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCManagedResourceCompilerTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCResourceCompilerTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCPreLinkEventTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCLinkerTool" | ||||
| 				AdditionalOptions="/EXPORT:GetAuthTokenInterface" | ||||
| 				AdditionalDependencies="micasa.lib" | ||||
| 				OutputFile="$(OutDir)/pwmech.dll" | ||||
| 				LinkIncremental="1" | ||||
| 				AdditionalLibraryDirectories=""\Program Files\Novell\CASA\lib";..\..\..\..\..\..\CASA\micasadk\Release" | ||||
| 				IgnoreDefaultLibraryNames="libc" | ||||
| 				GenerateDebugInformation="true" | ||||
| 				SubSystem="0" | ||||
| 				OptimizeReferences="2" | ||||
| 				EnableCOMDATFolding="2" | ||||
| 				TargetMachine="1" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCALinkTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCManifestTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCXDCMakeTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCBscMakeTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCFxCopTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCAppVerifierTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCWebDeploymentTool" | ||||
| 			/> | ||||
| 			<Tool | ||||
| 				Name="VCPostBuildEventTool" | ||||
| 				CommandLine="" | ||||
| 			/> | ||||
| 		</Configuration> | ||||
| 		<Configuration | ||||
|   | ||||
		Reference in New Issue
	
	Block a user