summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-30 21:28:30 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-30 21:28:30 (GMT)
commit6534e66e61975903c554c2b751c0d2761e4fe181 (patch)
tree6e0adae9ce3af895c6f1a171028648fd2718cefb /Source
parent2c30cb64b1d6859f99eb64810600596121b159d2 (diff)
downloadCMake-6534e66e61975903c554c2b751c0d2761e4fe181.zip
CMake-6534e66e61975903c554c2b751c0d2761e4fe181.tar.gz
CMake-6534e66e61975903c554c2b751c0d2761e4fe181.tar.bz2
COMP: Fix warning on sun
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx43
1 files changed, 23 insertions, 20 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5e6b854..45fa836 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1370,13 +1370,16 @@ bool cmSystemTools::IsPathToFramework(const char* path)
struct cmSystemToolsGZStruct
{
gzFile GZFile;
- static int Open(void* call_data, const char *pathname, int oflags, mode_t mode);
- static int Close(void* call_data);
- static ssize_t Read(void* call_data, void* buf, size_t count);
- static ssize_t Write(void* call_data, const void* buf, size_t count);
};
-int cmSystemToolsGZStruct::Open(void* call_data, const char *pathname, int oflags, mode_t mode)
+extern "C" {
+ static int cmSystemToolsGZStructOpen(void* call_data, const char *pathname, int oflags, mode_t mode);
+ static int cmSystemToolsGZStructClose(void* call_data);
+ static ssize_t cmSystemToolsGZStructRead(void* call_data, void* buf, size_t count);
+ static ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf, size_t count);
+}
+
+int cmSystemToolsGZStructOpen(void* call_data, const char *pathname, int oflags, mode_t mode)
{
const char *gzoflags;
int fd;
@@ -1420,19 +1423,19 @@ int cmSystemToolsGZStruct::Open(void* call_data, const char *pathname, int oflag
return fd;
}
-int cmSystemToolsGZStruct::Close(void* call_data)
+int cmSystemToolsGZStructClose(void* call_data)
{
cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data);
return cm_zlib_gzclose(gzf->GZFile);
}
-ssize_t cmSystemToolsGZStruct::Read(void* call_data, void* buf, size_t count)
+ssize_t cmSystemToolsGZStructRead(void* call_data, void* buf, size_t count)
{
cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data);
return cm_zlib_gzread(gzf->GZFile, buf, count);
}
-ssize_t cmSystemToolsGZStruct::Write(void* call_data, const void* buf, size_t count)
+ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf, size_t count)
{
cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data);
return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count);
@@ -1449,10 +1452,10 @@ bool cmSystemTools::CreateTar(const char* outFileName, const std::vector<cmStdSt
cmSystemToolsGZStruct gzs;
tartype_t gztype = {
- (openfunc_t)cmSystemToolsGZStruct::Open,
- (closefunc_t)cmSystemToolsGZStruct::Close,
- (readfunc_t)cmSystemToolsGZStruct::Read,
- (writefunc_t)cmSystemToolsGZStruct::Write,
+ (openfunc_t)cmSystemToolsGZStructOpen,
+ (closefunc_t)cmSystemToolsGZStructClose,
+ (readfunc_t)cmSystemToolsGZStructRead,
+ (writefunc_t)cmSystemToolsGZStructWrite,
&gzs
};
@@ -1514,10 +1517,10 @@ bool cmSystemTools::ExtractTar(const char* outFileName, const std::vector<cmStdS
cmSystemToolsGZStruct gzs;
tartype_t gztype = {
- cmSystemToolsGZStruct::Open,
- cmSystemToolsGZStruct::Close,
- cmSystemToolsGZStruct::Read,
- cmSystemToolsGZStruct::Write,
+ cmSystemToolsGZStructOpen,
+ cmSystemToolsGZStructClose,
+ cmSystemToolsGZStructRead,
+ cmSystemToolsGZStructWrite,
&gzs
};
@@ -1563,10 +1566,10 @@ bool cmSystemTools::ListTar(const char* outFileName, std::vector<cmStdString>& f
cmSystemToolsGZStruct gzs;
tartype_t gztype = {
- cmSystemToolsGZStruct::Open,
- cmSystemToolsGZStruct::Close,
- cmSystemToolsGZStruct::Read,
- cmSystemToolsGZStruct::Write,
+ cmSystemToolsGZStructOpen,
+ cmSystemToolsGZStructClose,
+ cmSystemToolsGZStructRead,
+ cmSystemToolsGZStructWrite,
&gzs
};