diff --git a/rlog/RLogChannel.cpp b/rlog/RLogChannel.cpp index 5a35eb3..9c534c4 100644 --- a/rlog/RLogChannel.cpp +++ b/rlog/RLogChannel.cpp @@ -184,7 +184,7 @@ RLogChannel *rlog::GetComponentChannel( const char *component, if((current->logLevel() == Log_Undef) && (level != Log_Undef)) current->setLogLevel( level ); - char *next = strchr( path , '/' ); + const char *next = strchr( path , '/' ); size_t len = next ? next - path : strlen( path ); if(len > 1) diff --git a/rlog/StdioNode.cpp b/rlog/StdioNode.cpp index 95e777a..de2cd94 100644 --- a/rlog/StdioNode.cpp +++ b/rlog/StdioNode.cpp @@ -109,7 +109,6 @@ StdioNode::StdioNode(int _fdOut, int flags) #ifdef USE_COLOURS colorize = (flags & OutputColor) && isatty( fdOut ); #else - (void)colorizeIfTTY; colorize = false; #endif outputThreadId = (flags & OutputThreadId); diff --git a/win32/common.h.msvc71 b/win32/common.h.msvc71 deleted file mode 100644 index e557e44..0000000 --- a/win32/common.h.msvc71 +++ /dev/null @@ -1,79 +0,0 @@ -/***************************************************************************** - * Author: Valient Gough - * - ***************************************************************************** - * Copyright (c) 2002-2004, Valient Gough - * Copyright (c) 2004, Vadim Zeitlin - * - * This library is free software; you can distribute it and/or modify it under - * the terms of the GNU Lesser General Public License (LGPL), as published by - * the Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * 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 LGPL in the file COPYING for more - * details. - * - */ - -#ifndef _rlogconfig_incl_ -#define _rlogconfig_incl_ - -// we don't have GNU printf style attributes -#define HAVE_PRINTF_ATTR 0 -#define HAVE_PRINTF_FP 0 - -/* Defined by configure if our compiler understands VARIADAC macros. */ -#define C99_VARIADAC_MACROS 0 -#define PREC99_VARIADAC_MACROS 0 - -#define RLOG_TIME_TSC 0 - -# define PRINTF(FMT,X) -# define PRINTF_FP(FMT,X) -# define likely(x) (x) -# define unlikely(x) (x) - -/*! @def RLOG_COMPONENT - @brief Specifies build-time component, eg -DRLOG_COMPONENT="component-name" - - Define RLOG_COMPONENT as the name of the component being built. - For example, as a compile flag, -DRLOG_COMPONENT="component-name" - - If RLOG_COMPONENT is not specified, then it will be defined as "[unknown]" -*/ -#ifndef RLOG_COMPONENT -# pragma message("rlog/common.h: RLOG_COMPONENT not defined - setting to UNKNOWN") -#define RLOG_COMPONENT "[unknown]" -#endif // RLOG_COMPONENT not defined - - -// __LINE__ expansion under msvc is broken with /ZI option is used -# define LOGID CONCAT(_rL_, __COUNTER__) - -/*! @def RLOG_DECL - @brief Macro used for declaring C++ clsas and functions to export from a - shared library on Windows. -*/ -#ifdef _WIN32 -# ifdef _WINDLL -# define RLOG_DECL __declspec(dllexport) -# else -# define RLOG_DECL __declspec(dllimport) -# endif // building/using DLL -#else // !_WIN32 -# define RLOG_DECL -#endif - -#ifdef _MSC_VER -# define vsnprintf _vsnprintf - - // suppress annoying warnings about using STL templates in DLL-exported - // classes -# pragma warning(disable:4251) -# pragma warning(disable:4275) -#endif /* _MSC_VER */ - -#endif // _rlogconfig_incl_ - diff --git a/win32/rlog.sln b/win32/rlog.sln index 162e6c8..250f243 100644 --- a/win32/rlog.sln +++ b/win32/rlog.sln @@ -1,7 +1,6 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rlog", "rlog.vcproj", "{F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}" ProjectSection(ProjectDependencies) = postProject @@ -14,26 +13,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testlog", "testlog.vcproj", EndProjectSection EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Debug.ActiveCfg = Debug|Win32 - {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Debug.Build.0 = Debug|Win32 - {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Release.ActiveCfg = Release|Win32 - {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Release.Build.0 = Release|Win32 - {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Debug.ActiveCfg = Debug|Win32 - {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Debug.Build.0 = Debug|Win32 - {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Release.ActiveCfg = Release|Win32 - {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Release.Build.0 = Release|Win32 - {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Debug.ActiveCfg = Debug|Win32 - {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Debug.Build.0 = Debug|Win32 - {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Release.ActiveCfg = Release|Win32 - {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Release.Build.0 = Release|Win32 + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Debug|Win32.Build.0 = Debug|Win32 + {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Release|Win32.ActiveCfg = Release|Win32 + {F3EF8AEB-90BA-4A5E-A59B-95350D15D75E}.Release|Win32.Build.0 = Release|Win32 + {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Debug|Win32.Build.0 = Debug|Win32 + {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Release|Win32.ActiveCfg = Release|Win32 + {B1CEFF20-2090-42E7-B2AA-9FEFB0610CEE}.Release|Win32.Build.0 = Release|Win32 + {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Debug|Win32.Build.0 = Debug|Win32 + {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Release|Win32.ActiveCfg = Release|Win32 + {CB6F9378-FDC2-4068-93C4-FCE4713E220A}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff --git a/win32/rlog.vcproj b/win32/rlog.vcproj index d54aba4..0afb3c9 100644 --- a/win32/rlog.vcproj +++ b/win32/rlog.vcproj @@ -1,114 +1,178 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4275,4251" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4275,4251" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -117,94 +181,119 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\rlog\Error.cpp" + > + RelativePath="..\rlog\rlog.cpp" + > + RelativePath="..\rlog\RLogChannel.cpp" + > + RelativePath="..\rlog\rloginit.cpp" + > + RelativePath="..\rlog\rloglocation.cpp" + > + RelativePath="..\rlog\RLogNode.cpp" + > + RelativePath="..\rlog\RLogPublisher.cpp" + > + RelativePath="..\rlog\StdioNode.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\rlog\common.h" + > + RelativePath="..\rlog\Error.h" + > + RelativePath="..\rlog\Lock.h" + > + RelativePath="..\rlog\rlog.h" + > + RelativePath="..\rlog\RLogChannel.h" + > + RelativePath="..\rlog\rloginit.h" + > + RelativePath="..\rlog\rloglocation.h" + > + RelativePath="..\rlog\RLogNode.h" + > + RelativePath="..\rlog\RLogPublisher.h" + > + RelativePath="..\rlog\StdioNode.h" + > + RelativePath="..\rlog\SyslogNode.h" + > + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + RelativePath=".\common.h.msvc80" + > + Name="Debug|Win32" + > + CommandLine="copy $(InputPath) ..\rlog\common.h" + Outputs="..\rlog\common.h" + /> + Name="Release|Win32" + > + CommandLine="copy $(InputPath) ..\rlog\common.h" + Outputs="..\rlog\common.h" + /> diff --git a/win32/test.vcproj b/win32/test.vcproj index 2bec8a7..cba067b 100644 --- a/win32/test.vcproj +++ b/win32/test.vcproj @@ -1,72 +1,123 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -117,20 +181,24 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\rlog\test.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > diff --git a/win32/testlog.vcproj b/win32/testlog.vcproj index d1abf4a..f4e884c 100644 --- a/win32/testlog.vcproj +++ b/win32/testlog.vcproj @@ -1,72 +1,123 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -117,20 +181,24 @@ + UniqueIdentifier="{16189570-1bbc-4ddd-80ba-8439e4e18601}" + > + RelativePath="..\rlog\testlog.cpp" + > + UniqueIdentifier="{230d65f4-48a5-4937-bffe-6f3a48911bd2}" + > + UniqueIdentifier="{eb5b5d84-0910-44cf-9013-ea6ce53ee14f}" + >