This commit is contained in:
Juan Carlos Luciani
2007-04-02 22:16:07 +00:00
parent 2e19101343
commit 4da676ac00
26 changed files with 795 additions and 625 deletions

View File

@@ -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_

View File

@@ -103,89 +103,6 @@
CommandLine="mkdir \&quot;Program Files&quot;\novell\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\lib\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\etc\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\&#x0D;&#x0A;copy PwdAuthenticate.conf \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\PwdAuthenticate.conf&#x0D;&#x0A;copy $(OutDir)\pwmech.dll \&quot;Program Files&quot;\novell\casa\lib\pwmech.dll&#x0D;&#x0A;"
/>
</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&quot;_CRT_SECURE_NO_DEPRECATE&quot;"
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="&quot;\Program Files\Novell\CASA\lib&quot;;..\..\..\..\..\..\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 \&quot;Program Files&quot;\novell\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\lib\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\etc\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\&#x0D;&#x0A;mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\&#x0D;&#x0A;copy PwdAuthenticate.conf \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\PwdAuthenticate.conf&#x0D;&#x0A;copy $(OutDir)\pwmech.dll \&quot;Program Files&quot;\novell\casa\lib\pwmech.dll&#x0D;&#x0A;"
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&quot;_CRT_SECURE_NO_DEPRECATE&quot;"
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="&quot;\Program Files\Novell\CASA\lib&quot;;..\..\..\..\..\..\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