From 6534e66e61975903c554c2b751c0d2761e4fe181 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Fri, 30 Dec 2005 16:28:30 -0500 Subject: COMP: Fix warning on sun --- Source/cmSystemTools.cxx | 43 +++++++++++++++++++++++-------------------- 1 file 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(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(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(call_data); return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count); @@ -1449,10 +1452,10 @@ bool cmSystemTools::CreateTar(const char* outFileName, const std::vector& f cmSystemToolsGZStruct gzs; tartype_t gztype = { - cmSystemToolsGZStruct::Open, - cmSystemToolsGZStruct::Close, - cmSystemToolsGZStruct::Read, - cmSystemToolsGZStruct::Write, + cmSystemToolsGZStructOpen, + cmSystemToolsGZStructClose, + cmSystemToolsGZStructRead, + cmSystemToolsGZStructWrite, &gzs }; -- cgit v0.12