Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AAI
Shibboleth Debian packaging
log4shib
Commits
b8e81174
Commit
b8e81174
authored
May 21, 2018
by
Scott Cantor
Browse files
Turn on MSVC conformance mode.
parent
c947a171
Changes
12
Hide whitespace changes
Inline
Side-by-side
include/log4shib/NTEventLogAppender.hh
View file @
b8e81174
...
...
@@ -72,8 +72,8 @@ namespace log4shib {
WORD
getCategory
(
Priority
::
Value
priority
);
WORD
getType
(
Priority
::
Value
priority
);
HKEY
regGetKey
(
TCHAR
*
subkey
,
DWORD
*
disposition
);
void
regSetString
(
HKEY
hkey
,
TCHAR
*
name
,
TCHAR
*
value
);
void
regSetDword
(
HKEY
hkey
,
TCHAR
*
name
,
DWORD
value
);
void
regSetString
(
HKEY
hkey
,
const
TCHAR
*
name
,
const
TCHAR
*
value
);
void
regSetDword
(
HKEY
hkey
,
const
TCHAR
*
name
,
DWORD
value
);
void
addRegistryInfo
(
const
char
*
source
);
virtual
void
open
();
...
...
msvc15/log4shib/log4shib.vcxproj
View file @
b8e81174
...
...
@@ -95,6 +95,7 @@
<BrowseInformation>
true
</BrowseInformation>
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -119,6 +120,7 @@
<BrowseInformation>
true
</BrowseInformation>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -139,6 +141,7 @@
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<BrowseInformation>
true
</BrowseInformation>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -164,6 +167,7 @@
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<BrowseInformation>
true
</BrowseInformation>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
msvc15/log4shibDLL/log4shibDLL.vcxproj
View file @
b8e81174
...
...
@@ -109,6 +109,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<MinimalRebuild>
false
</MinimalRebuild>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -144,6 +145,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<MinimalRebuild>
false
</MinimalRebuild>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -175,6 +177,7 @@
<PreprocessorDefinitions>
LOG4SHIB_HAVE_INT64_T;NDEBUG;WIN32;_WINDOWS;_USRDLL;LOG4SHIB_HAS_DLL;LOG4SHIB_BUILD_DLL;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<BrowseInformation>
true
</BrowseInformation>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -205,6 +208,7 @@
<PreprocessorDefinitions>
LOG4SHIB_HAVE_INT64_T;NDEBUG;WIN32;_WINDOWS;_USRDLL;LOG4SHIB_HAS_DLL;LOG4SHIB_BUILD_DLL;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<BrowseInformation>
true
</BrowseInformation>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
msvc15/sscpp706/sscpp706.VCXPROJ
View file @
b8e81174
...
...
@@ -101,6 +101,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -129,6 +130,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -159,6 +161,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -191,6 +194,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
msvc15/testCategory/testCategory.vcxproj
View file @
b8e81174
...
...
@@ -104,6 +104,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -136,6 +137,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -164,6 +166,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -192,6 +195,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
msvc15/testMain/testMain.vcxproj
View file @
b8e81174
...
...
@@ -101,6 +101,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -129,6 +130,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -159,6 +161,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -191,6 +194,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
msvc15/testNDC/testNDC.vcxproj
View file @
b8e81174
...
...
@@ -101,6 +101,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -129,6 +130,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -159,6 +161,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -191,6 +194,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
msvc15/testNTEventLog/testNTEventLog.vcxproj
View file @
b8e81174
...
...
@@ -105,6 +105,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -138,6 +139,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -166,6 +168,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -194,6 +197,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
msvc15/testPattern/testPattern.vcxproj
View file @
b8e81174
...
...
@@ -105,6 +105,7 @@
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -138,6 +139,7 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -166,6 +168,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
@@ -194,6 +197,7 @@
<StringPooling>
true
</StringPooling>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<MultiProcessorCompilation>
true
</MultiProcessorCompilation>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
...
...
src/NTEventLogAppender.cpp
View file @
b8e81174
...
...
@@ -102,11 +102,11 @@ namespace log4shib {
return
hkey
;
}
void
NTEventLogAppender
::
regSetString
(
HKEY
hkey
,
TCHAR
*
name
,
TCHAR
*
value
)
{
void
NTEventLogAppender
::
regSetString
(
HKEY
hkey
,
const
TCHAR
*
name
,
const
TCHAR
*
value
)
{
RegSetValueEx
(
hkey
,
name
,
0
,
REG_SZ
,
(
LPBYTE
)
value
,
lstrlen
(
value
));
}
void
NTEventLogAppender
::
regSetDword
(
HKEY
hkey
,
TCHAR
*
name
,
DWORD
value
)
{
void
NTEventLogAppender
::
regSetDword
(
HKEY
hkey
,
const
TCHAR
*
name
,
DWORD
value
)
{
RegSetValueEx
(
hkey
,
name
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
value
,
sizeof
(
DWORD
));
}
...
...
src/Win32DebugAppender.cpp
View file @
b8e81174
...
...
@@ -13,6 +13,7 @@
# include <io.h>
#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winbase.h>
...
...
tests/testNTEventLog.cpp
View file @
b8e81174
...
...
@@ -2,10 +2,8 @@
//
#include "log4shib/Portability.hh"
#include "log4shib/NTEventLogAppender.hh"
#ifdef WIN32
#include <windows.h>
#endif
#ifdef LOG4SHIB_HAVE_UNISTD_H
#include <unistd.h>
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment