Page 1 of 1

vls 0.5.6 gcc 3.4 patch

Posted: 31 Jan 2006 10:41
by Albert
Hello,
this is a patch for vls-0.5.6 from vls-0.5.6-5mdk.i586.src.rpm (http://rpm.pbone.net/index.php3/stat/4/ ... 6.rpm.html) which solves compilation problems with gcc 3.4.

Thanks to packager : Nicolas Lécureuil < neoclust_mandriva_org>

Albert

Code: Select all

--- ./src/core/library.cpp.tv 2004-06-30 18:58:00.527941222 +0200 +++ ./src/core/library.cpp 2004-06-30 18:58:45.777047645 +0200 @@ -25,7 +25,7 @@ * *******************************************************************************/ - +#include <dlfcn.h> //------------------------------------------------------------------------------ // Preamble @@ -79,7 +79,7 @@ # ifdef RTLD_NOW m_hHandle = dlopen(m_strName.GetString(), RTLD_NOW); # else - m_hHandle = dlopen(m_strName.GetString(), DL_LAZY); + m_hHandle = dlopen(m_strName.GetString(), RTLD_LAZY); # endif if(m_hHandle == NULL) { --- ./src/core/hashtable.h.tv 2004-06-30 18:53:44.712993043 +0200 +++ ./src/core/hashtable.h 2004-06-30 18:53:13.241614538 +0200 @@ -63,7 +63,7 @@ }; -class C_HashMethod<u32> +template <> class C_HashMethod<u32> { public: inline C_HashMethod(u32 uiMaxHash); @@ -76,7 +76,7 @@ }; -class C_HashMethod<u16> +template <> class C_HashMethod<u16> { public: inline C_HashMethod(u32 uiMaxHash); @@ -89,7 +89,7 @@ }; -class C_HashMethod<handle> +template <> class C_HashMethod<handle> { public: inline C_HashMethod(u32 uiMaxHash); --- ./src/core/stream.cpp.tv 2004-06-30 18:59:00.374759370 +0200 +++ ./src/core/stream.cpp 2004-06-30 19:01:02.921339327 +0200 @@ -317,6 +317,8 @@ template <class IOStream> C_Stream<IOStream>& C_Stream<IOStream>::operator >> (C_Serializable& cObject) { + C_ClassDescription cObjectDescription = cObject.Reflect(); + C_Serializer cSerializer(&cObject, cObjectDescription); try { u32 iByteCount = cSerializer.NextBytesCount(); @@ -324,11 +326,12 @@ { const byte aBytes[iByteCount]; u32 iOffset = 0; + int iRc; // Read the data to deserialize on the stream do { - int iRc = m_pIOStream->Read(aBytes+iOffset, iByteCount-iOffset); + iRc = m_pIOStream->Read(aBytes+iOffset, iByteCount-iOffset); ASSERT(iRc >= 0 || iRc == FILE_EOF); iOffset += iRc; }

Posted: 07 Feb 2006 12:02
by wimille
HI,
sorry for my newbie question, but how and where, apply this patch?

patch

Posted: 10 Feb 2006 12:14
by Albert
Hello,
separate 3 patches for library.cpp, hashtable.h and stream.cpp and then apply them (see man patch).
Albert