summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-16 14:09:38 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-16 14:09:38 (GMT)
commitefeffc52ced901abdd8632462c46afe5f90029c9 (patch)
tree83372d3705e7301c9996d0cd47a9c8cb51d59795 /Source
parent4d1f0fe4ea22642e67f8d71cc16136df790e0aed (diff)
downloadCMake-efeffc52ced901abdd8632462c46afe5f90029c9.zip
CMake-efeffc52ced901abdd8632462c46afe5f90029c9.tar.gz
CMake-efeffc52ced901abdd8632462c46afe5f90029c9.tar.bz2
COMP: Remove problem on borland
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/Registry.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx
index ce15abd..4330967 100644
--- a/Source/kwsys/Registry.cxx
+++ b/Source/kwsys/Registry.cxx
@@ -88,13 +88,10 @@ protected:
bool m_SubKeySpecified;
Registry::RegistryType m_RegistryType;
-
-
- static const int BUFFER_SIZE;
};
//----------------------------------------------------------------------------
-const int RegistryHelper::BUFFER_SIZE = 8192;
+#define Registry_BUFFER_SIZE 8192
//----------------------------------------------------------------------------
Registry::Registry(Registry::RegistryType registryType)
@@ -427,11 +424,11 @@ bool RegistryHelper::Open(const char *toplevel, const char *subkey,
}
res = true;
- char buffer[BUFFER_SIZE];
+ char buffer[Registry_BUFFER_SIZE];
while( !ifs->fail() )
{
int found = 0;
- ifs->getline(buffer, BUFFER_SIZE);
+ ifs->getline(buffer, Registry_BUFFER_SIZE);
if ( ifs->fail() || ifs->eof() )
{
break;
@@ -547,7 +544,7 @@ bool RegistryHelper::ReadValue(const char *skey, char *value)
int res = 1;
DWORD dwType, dwSize;
dwType = REG_SZ;
- dwSize = BUFFER_SIZE;
+ dwSize = Registry_BUFFER_SIZE;
res = ( RegQueryValueEx(this->HKey, skey, NULL, &dwType,
(BYTE *)value, &dwSize) == ERROR_SUCCESS );
return (res != 0);