o After repo copy from ports/net/lmule (this is a fork of lmule):

update to xmule version 1.4.0
o Special thanks to [1] who helped patching the application for
  FreeBSD

Reviewed by:		Lauri Watts <lauri@fruitsalad.org>,
			Frerich Raabe <frerich.raabe@gmx.de> [1]
Repo copy approved by:	portmgr (self)
Repo copied by:		cvs (joe)
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2003-06-11 22:29:38 +00:00
parent 38c2447dd0
commit 47a28fa2de
22 changed files with 611 additions and 10 deletions

View file

@ -0,0 +1,11 @@
--- src/Preferences.cpp.orig Mon May 26 12:08:45 2003
+++ src/Preferences.cpp Mon May 26 12:10:14 2003
@@ -65,7 +65,7 @@
extern int sprintf(char *__restrict __s,__const char*__restrict __format,...) __attribute__ ((__format__ (__printf__, 2,3)));
#ifdef __FreeBSD__
-extern long long atoll(char *s);
+extern long long atoll(const char *s);
#endif /* __FreeBSD__ */
/// new implementation

View file

@ -0,0 +1,11 @@
--- src/ClientCredits.cpp.orig Tue May 27 15:25:08 2003
+++ src/ClientCredits.cpp Tue May 27 15:25:19 2003
@@ -22,7 +22,7 @@
#include "ClientCredits.h"
#include "opcodes.h"
#include <math.h>
-#include "/usr/include/time.h"
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

View file

@ -0,0 +1,150 @@
--- src/KnownFile.cpp.orig Wed Apr 30 14:30:10 2003
+++ src/KnownFile.cpp Mon May 26 12:46:29 2003
@@ -271,6 +271,73 @@
return ferror(file);
}
+static void MD4Transform(uint32 Hash[4], uint32 x[16])
+{
+ uint32 a = Hash[0];
+ uint32 b = Hash[1];
+ uint32 c = Hash[2];
+ uint32 d = Hash[3];
+
+ /* Round 1 */
+ MD4_FF(a, b, c, d, x[ 0], S11); // 01
+ MD4_FF(d, a, b, c, x[ 1], S12); // 02
+ MD4_FF(c, d, a, b, x[ 2], S13); // 03
+ MD4_FF(b, c, d, a, x[ 3], S14); // 04
+ MD4_FF(a, b, c, d, x[ 4], S11); // 05
+ MD4_FF(d, a, b, c, x[ 5], S12); // 06
+ MD4_FF(c, d, a, b, x[ 6], S13); // 07
+ MD4_FF(b, c, d, a, x[ 7], S14); // 08
+ MD4_FF(a, b, c, d, x[ 8], S11); // 09
+ MD4_FF(d, a, b, c, x[ 9], S12); // 10
+ MD4_FF(c, d, a, b, x[10], S13); // 11
+ MD4_FF(b, c, d, a, x[11], S14); // 12
+ MD4_FF(a, b, c, d, x[12], S11); // 13
+ MD4_FF(d, a, b, c, x[13], S12); // 14
+ MD4_FF(c, d, a, b, x[14], S13); // 15
+ MD4_FF(b, c, d, a, x[15], S14); // 16
+
+ /* Round 2 */
+ MD4_GG(a, b, c, d, x[ 0], S21); // 17
+ MD4_GG(d, a, b, c, x[ 4], S22); // 18
+ MD4_GG(c, d, a, b, x[ 8], S23); // 19
+ MD4_GG(b, c, d, a, x[12], S24); // 20
+ MD4_GG(a, b, c, d, x[ 1], S21); // 21
+ MD4_GG(d, a, b, c, x[ 5], S22); // 22
+ MD4_GG(c, d, a, b, x[ 9], S23); // 23
+ MD4_GG(b, c, d, a, x[13], S24); // 24
+ MD4_GG(a, b, c, d, x[ 2], S21); // 25
+ MD4_GG(d, a, b, c, x[ 6], S22); // 26
+ MD4_GG(c, d, a, b, x[10], S23); // 27
+ MD4_GG(b, c, d, a, x[14], S24); // 28
+ MD4_GG(a, b, c, d, x[ 3], S21); // 29
+ MD4_GG(d, a, b, c, x[ 7], S22); // 30
+ MD4_GG(c, d, a, b, x[11], S23); // 31
+ MD4_GG(b, c, d, a, x[15], S24); // 32
+
+ /* Round 3 */
+ MD4_HH(a, b, c, d, x[ 0], S31); // 33
+ MD4_HH(d, a, b, c, x[ 8], S32); // 34
+ MD4_HH(c, d, a, b, x[ 4], S33); // 35
+ MD4_HH(b, c, d, a, x[12], S34); // 36
+ MD4_HH(a, b, c, d, x[ 2], S31); // 37
+ MD4_HH(d, a, b, c, x[10], S32); // 38
+ MD4_HH(c, d, a, b, x[ 6], S33); // 39
+ MD4_HH(b, c, d, a, x[14], S34); // 40
+ MD4_HH(a, b, c, d, x[ 1], S31); // 41
+ MD4_HH(d, a, b, c, x[ 9], S32); // 42
+ MD4_HH(c, d, a, b, x[ 5], S33); // 43
+ MD4_HH(b, c, d, a, x[13], S34); // 44
+ MD4_HH(a, b, c, d, x[ 3], S31); // 45
+ MD4_HH(d, a, b, c, x[11], S32); // 46
+ MD4_HH(c, d, a, b, x[ 7], S33); // 47
+ MD4_HH(b, c, d, a, x[15], S34); // 48
+
+ Hash[0] += a;
+ Hash[1] += b;
+ Hash[2] += c;
+ Hash[3] += d;
+}
+
void CKnownFile::CreateHashFromInput(FILE* file,CFile* file2, int Length, uchar* Output, uchar* in_string) {
// time critial
bool PaddingStarted = false;
@@ -342,73 +409,6 @@
return m_iPartCount>0?m_iPartCount:(m_iPartCount=((m_nFileSize+(PARTSIZE-1))/PARTSIZE));
}
#endif
-
-static void MD4Transform(uint32 Hash[4], uint32 x[16])
-{
- uint32 a = Hash[0];
- uint32 b = Hash[1];
- uint32 c = Hash[2];
- uint32 d = Hash[3];
-
- /* Round 1 */
- MD4_FF(a, b, c, d, x[ 0], S11); // 01
- MD4_FF(d, a, b, c, x[ 1], S12); // 02
- MD4_FF(c, d, a, b, x[ 2], S13); // 03
- MD4_FF(b, c, d, a, x[ 3], S14); // 04
- MD4_FF(a, b, c, d, x[ 4], S11); // 05
- MD4_FF(d, a, b, c, x[ 5], S12); // 06
- MD4_FF(c, d, a, b, x[ 6], S13); // 07
- MD4_FF(b, c, d, a, x[ 7], S14); // 08
- MD4_FF(a, b, c, d, x[ 8], S11); // 09
- MD4_FF(d, a, b, c, x[ 9], S12); // 10
- MD4_FF(c, d, a, b, x[10], S13); // 11
- MD4_FF(b, c, d, a, x[11], S14); // 12
- MD4_FF(a, b, c, d, x[12], S11); // 13
- MD4_FF(d, a, b, c, x[13], S12); // 14
- MD4_FF(c, d, a, b, x[14], S13); // 15
- MD4_FF(b, c, d, a, x[15], S14); // 16
-
- /* Round 2 */
- MD4_GG(a, b, c, d, x[ 0], S21); // 17
- MD4_GG(d, a, b, c, x[ 4], S22); // 18
- MD4_GG(c, d, a, b, x[ 8], S23); // 19
- MD4_GG(b, c, d, a, x[12], S24); // 20
- MD4_GG(a, b, c, d, x[ 1], S21); // 21
- MD4_GG(d, a, b, c, x[ 5], S22); // 22
- MD4_GG(c, d, a, b, x[ 9], S23); // 23
- MD4_GG(b, c, d, a, x[13], S24); // 24
- MD4_GG(a, b, c, d, x[ 2], S21); // 25
- MD4_GG(d, a, b, c, x[ 6], S22); // 26
- MD4_GG(c, d, a, b, x[10], S23); // 27
- MD4_GG(b, c, d, a, x[14], S24); // 28
- MD4_GG(a, b, c, d, x[ 3], S21); // 29
- MD4_GG(d, a, b, c, x[ 7], S22); // 30
- MD4_GG(c, d, a, b, x[11], S23); // 31
- MD4_GG(b, c, d, a, x[15], S24); // 32
-
- /* Round 3 */
- MD4_HH(a, b, c, d, x[ 0], S31); // 33
- MD4_HH(d, a, b, c, x[ 8], S32); // 34
- MD4_HH(c, d, a, b, x[ 4], S33); // 35
- MD4_HH(b, c, d, a, x[12], S34); // 36
- MD4_HH(a, b, c, d, x[ 2], S31); // 37
- MD4_HH(d, a, b, c, x[10], S32); // 38
- MD4_HH(c, d, a, b, x[ 6], S33); // 39
- MD4_HH(b, c, d, a, x[14], S34); // 40
- MD4_HH(a, b, c, d, x[ 1], S31); // 41
- MD4_HH(d, a, b, c, x[ 9], S32); // 42
- MD4_HH(c, d, a, b, x[ 5], S33); // 43
- MD4_HH(b, c, d, a, x[13], S34); // 44
- MD4_HH(a, b, c, d, x[ 3], S31); // 45
- MD4_HH(d, a, b, c, x[11], S32); // 46
- MD4_HH(c, d, a, b, x[ 7], S33); // 47
- MD4_HH(b, c, d, a, x[15], S34); // 48
-
- Hash[0] += a;
- Hash[1] += b;
- Hash[2] += c;
- Hash[3] += d;
-}
// Adde by Tarod [Juanjo]
void CAbstractFile::SetFileName(char* NewName)

View file

@ -0,0 +1,12 @@
--- src/KnownFile.h.orig Tue May 20 21:16:04 2003
+++ src/KnownFile.h Tue May 20 21:23:46 2003
@@ -203,9 +203,6 @@
(a) = MD4_ROTATE_LEFT((a), (s)); \
}
-static void MD4Transform(uint32 Hash[4], uint32 x[16]);
-
-
#if 0
// old implementation
class CFileStatistic{

View file

@ -0,0 +1,13 @@
--- src/WebServer.cpp.orig Tue May 20 20:42:30 2003
+++ src/WebServer.cpp Tue May 20 21:06:14 2003
@@ -9,6 +9,10 @@
#include <wx/wfstream.h>
#include <wx/txtstrm.h>
+#ifdef __FreeBSD__
+extern long long atoll(const char *s);
+#endif /* __FreeBSD__ */
+
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;

View file

@ -0,0 +1,22 @@
--- src/gsocket.c.orig Tue May 27 14:11:08 2003
+++ src/gsocket.c Tue May 27 14:11:58 2003
@@ -127,6 +127,11 @@
# define GSocket_Debug(args)
#endif /* __GSOCKET_DEBUG__ */
+/* Added by Un-Thesis 2003-05-15 */
+/* Allows socket reuse */
+/* Code contributed by McCabe and arkanes */
+int intYes = 1;
+
/* Global initialisers */
int GSocket_Init(void)
@@ -400,7 +405,6 @@
/* Added by Un-Thesis 2003-05-15 */
/* Allows socket reuse */
/* Code contributed by McCabe and arkanes */
-int intYes = 1;
if(setsockopt(sck->m_fd, SOL_SOCKET, SO_REUSEADDR, &intYes, sizeof(int))) {
return GSOCK_IOERR;
}

View file

@ -0,0 +1,11 @@
--- src/otherfunctions.cpp.orig Mon May 26 12:05:22 2003
+++ src/otherfunctions.cpp Mon May 26 12:05:37 2003
@@ -546,7 +546,7 @@
}
#ifdef __FreeBSD__
-long long atoll( char * s ){
+long long atoll(const char * s){
return strtoll(s, (char **)NULL, 10);
}
#endif /* __FreeBSD__ */

View file

@ -0,0 +1,24 @@
--- src/updownclient.h.orig Sun May 25 18:27:59 2003
+++ src/updownclient.h Tue May 27 21:14:31 2003
@@ -26,12 +26,20 @@
#include "SafeFile.h"
#include "BarShader.h"
#include "otherfunctions.h"
+#include <sys/time.h>
class CPartFile;
class CKnownFile;
typedef unsigned char byte;
-extern inline long GetTickCount();
+inline long GetTickCount()
+{
+ struct timeval aika;
+ gettimeofday(&aika,NULL);
+ unsigned long secs=aika.tv_sec*1000;
+ secs+=(aika.tv_usec/1000);
+ return secs;
+}
// uploadstate
#define US_UPLOADING 0

View file

@ -0,0 +1,42 @@
--- src/xmule.cpp.orig Tue May 27 00:02:47 2003
+++ src/xmule.cpp Tue May 27 21:31:38 2003
@@ -55,16 +55,6 @@
// ON_COMMAND(ID_HELP, CWinApp::OnHelp)
//END_MESSAGE_MAP()
-#include <sys/time.h>
-inline long GetTickCount()
-{
- struct timeval aika;
- gettimeofday(&aika,NULL);
- unsigned long secs=aika.tv_sec*1000;
- secs+=(aika.tv_usec/1000);
- return secs;
-}
-
CxmuleApp::CxmuleApp() {
splashBmp=new wxBitmap((const char**)About_jpg);
}
@@ -641,11 +631,13 @@
} //End Added By Bouc7
-
+#if 0
#include <execinfo.h>
+#endif
void CxmuleApp::OnFatalException()
{
+#if 0
// (stkn) create backtrace
void * bt_array[100]; // 100 should be enough ?!?
char ** bt_strings;
@@ -666,6 +658,7 @@
fprintf(stderr, "[%d] %s\n", i, bt_strings[i]);
free(bt_strings);
+#endif
}
#define wxGTK_WINDOW 1

View file

@ -0,0 +1,11 @@
--- src/Preferences.cpp.orig Mon May 26 12:08:45 2003
+++ src/Preferences.cpp Mon May 26 12:10:14 2003
@@ -65,7 +65,7 @@
extern int sprintf(char *__restrict __s,__const char*__restrict __format,...) __attribute__ ((__format__ (__printf__, 2,3)));
#ifdef __FreeBSD__
-extern long long atoll(char *s);
+extern long long atoll(const char *s);
#endif /* __FreeBSD__ */
/// new implementation

View file

@ -0,0 +1,11 @@
--- src/ClientCredits.cpp.orig Tue May 27 15:25:08 2003
+++ src/ClientCredits.cpp Tue May 27 15:25:19 2003
@@ -22,7 +22,7 @@
#include "ClientCredits.h"
#include "opcodes.h"
#include <math.h>
-#include "/usr/include/time.h"
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

View file

@ -0,0 +1,150 @@
--- src/KnownFile.cpp.orig Wed Apr 30 14:30:10 2003
+++ src/KnownFile.cpp Mon May 26 12:46:29 2003
@@ -271,6 +271,73 @@
return ferror(file);
}
+static void MD4Transform(uint32 Hash[4], uint32 x[16])
+{
+ uint32 a = Hash[0];
+ uint32 b = Hash[1];
+ uint32 c = Hash[2];
+ uint32 d = Hash[3];
+
+ /* Round 1 */
+ MD4_FF(a, b, c, d, x[ 0], S11); // 01
+ MD4_FF(d, a, b, c, x[ 1], S12); // 02
+ MD4_FF(c, d, a, b, x[ 2], S13); // 03
+ MD4_FF(b, c, d, a, x[ 3], S14); // 04
+ MD4_FF(a, b, c, d, x[ 4], S11); // 05
+ MD4_FF(d, a, b, c, x[ 5], S12); // 06
+ MD4_FF(c, d, a, b, x[ 6], S13); // 07
+ MD4_FF(b, c, d, a, x[ 7], S14); // 08
+ MD4_FF(a, b, c, d, x[ 8], S11); // 09
+ MD4_FF(d, a, b, c, x[ 9], S12); // 10
+ MD4_FF(c, d, a, b, x[10], S13); // 11
+ MD4_FF(b, c, d, a, x[11], S14); // 12
+ MD4_FF(a, b, c, d, x[12], S11); // 13
+ MD4_FF(d, a, b, c, x[13], S12); // 14
+ MD4_FF(c, d, a, b, x[14], S13); // 15
+ MD4_FF(b, c, d, a, x[15], S14); // 16
+
+ /* Round 2 */
+ MD4_GG(a, b, c, d, x[ 0], S21); // 17
+ MD4_GG(d, a, b, c, x[ 4], S22); // 18
+ MD4_GG(c, d, a, b, x[ 8], S23); // 19
+ MD4_GG(b, c, d, a, x[12], S24); // 20
+ MD4_GG(a, b, c, d, x[ 1], S21); // 21
+ MD4_GG(d, a, b, c, x[ 5], S22); // 22
+ MD4_GG(c, d, a, b, x[ 9], S23); // 23
+ MD4_GG(b, c, d, a, x[13], S24); // 24
+ MD4_GG(a, b, c, d, x[ 2], S21); // 25
+ MD4_GG(d, a, b, c, x[ 6], S22); // 26
+ MD4_GG(c, d, a, b, x[10], S23); // 27
+ MD4_GG(b, c, d, a, x[14], S24); // 28
+ MD4_GG(a, b, c, d, x[ 3], S21); // 29
+ MD4_GG(d, a, b, c, x[ 7], S22); // 30
+ MD4_GG(c, d, a, b, x[11], S23); // 31
+ MD4_GG(b, c, d, a, x[15], S24); // 32
+
+ /* Round 3 */
+ MD4_HH(a, b, c, d, x[ 0], S31); // 33
+ MD4_HH(d, a, b, c, x[ 8], S32); // 34
+ MD4_HH(c, d, a, b, x[ 4], S33); // 35
+ MD4_HH(b, c, d, a, x[12], S34); // 36
+ MD4_HH(a, b, c, d, x[ 2], S31); // 37
+ MD4_HH(d, a, b, c, x[10], S32); // 38
+ MD4_HH(c, d, a, b, x[ 6], S33); // 39
+ MD4_HH(b, c, d, a, x[14], S34); // 40
+ MD4_HH(a, b, c, d, x[ 1], S31); // 41
+ MD4_HH(d, a, b, c, x[ 9], S32); // 42
+ MD4_HH(c, d, a, b, x[ 5], S33); // 43
+ MD4_HH(b, c, d, a, x[13], S34); // 44
+ MD4_HH(a, b, c, d, x[ 3], S31); // 45
+ MD4_HH(d, a, b, c, x[11], S32); // 46
+ MD4_HH(c, d, a, b, x[ 7], S33); // 47
+ MD4_HH(b, c, d, a, x[15], S34); // 48
+
+ Hash[0] += a;
+ Hash[1] += b;
+ Hash[2] += c;
+ Hash[3] += d;
+}
+
void CKnownFile::CreateHashFromInput(FILE* file,CFile* file2, int Length, uchar* Output, uchar* in_string) {
// time critial
bool PaddingStarted = false;
@@ -342,73 +409,6 @@
return m_iPartCount>0?m_iPartCount:(m_iPartCount=((m_nFileSize+(PARTSIZE-1))/PARTSIZE));
}
#endif
-
-static void MD4Transform(uint32 Hash[4], uint32 x[16])
-{
- uint32 a = Hash[0];
- uint32 b = Hash[1];
- uint32 c = Hash[2];
- uint32 d = Hash[3];
-
- /* Round 1 */
- MD4_FF(a, b, c, d, x[ 0], S11); // 01
- MD4_FF(d, a, b, c, x[ 1], S12); // 02
- MD4_FF(c, d, a, b, x[ 2], S13); // 03
- MD4_FF(b, c, d, a, x[ 3], S14); // 04
- MD4_FF(a, b, c, d, x[ 4], S11); // 05
- MD4_FF(d, a, b, c, x[ 5], S12); // 06
- MD4_FF(c, d, a, b, x[ 6], S13); // 07
- MD4_FF(b, c, d, a, x[ 7], S14); // 08
- MD4_FF(a, b, c, d, x[ 8], S11); // 09
- MD4_FF(d, a, b, c, x[ 9], S12); // 10
- MD4_FF(c, d, a, b, x[10], S13); // 11
- MD4_FF(b, c, d, a, x[11], S14); // 12
- MD4_FF(a, b, c, d, x[12], S11); // 13
- MD4_FF(d, a, b, c, x[13], S12); // 14
- MD4_FF(c, d, a, b, x[14], S13); // 15
- MD4_FF(b, c, d, a, x[15], S14); // 16
-
- /* Round 2 */
- MD4_GG(a, b, c, d, x[ 0], S21); // 17
- MD4_GG(d, a, b, c, x[ 4], S22); // 18
- MD4_GG(c, d, a, b, x[ 8], S23); // 19
- MD4_GG(b, c, d, a, x[12], S24); // 20
- MD4_GG(a, b, c, d, x[ 1], S21); // 21
- MD4_GG(d, a, b, c, x[ 5], S22); // 22
- MD4_GG(c, d, a, b, x[ 9], S23); // 23
- MD4_GG(b, c, d, a, x[13], S24); // 24
- MD4_GG(a, b, c, d, x[ 2], S21); // 25
- MD4_GG(d, a, b, c, x[ 6], S22); // 26
- MD4_GG(c, d, a, b, x[10], S23); // 27
- MD4_GG(b, c, d, a, x[14], S24); // 28
- MD4_GG(a, b, c, d, x[ 3], S21); // 29
- MD4_GG(d, a, b, c, x[ 7], S22); // 30
- MD4_GG(c, d, a, b, x[11], S23); // 31
- MD4_GG(b, c, d, a, x[15], S24); // 32
-
- /* Round 3 */
- MD4_HH(a, b, c, d, x[ 0], S31); // 33
- MD4_HH(d, a, b, c, x[ 8], S32); // 34
- MD4_HH(c, d, a, b, x[ 4], S33); // 35
- MD4_HH(b, c, d, a, x[12], S34); // 36
- MD4_HH(a, b, c, d, x[ 2], S31); // 37
- MD4_HH(d, a, b, c, x[10], S32); // 38
- MD4_HH(c, d, a, b, x[ 6], S33); // 39
- MD4_HH(b, c, d, a, x[14], S34); // 40
- MD4_HH(a, b, c, d, x[ 1], S31); // 41
- MD4_HH(d, a, b, c, x[ 9], S32); // 42
- MD4_HH(c, d, a, b, x[ 5], S33); // 43
- MD4_HH(b, c, d, a, x[13], S34); // 44
- MD4_HH(a, b, c, d, x[ 3], S31); // 45
- MD4_HH(d, a, b, c, x[11], S32); // 46
- MD4_HH(c, d, a, b, x[ 7], S33); // 47
- MD4_HH(b, c, d, a, x[15], S34); // 48
-
- Hash[0] += a;
- Hash[1] += b;
- Hash[2] += c;
- Hash[3] += d;
-}
// Adde by Tarod [Juanjo]
void CAbstractFile::SetFileName(char* NewName)

View file

@ -0,0 +1,12 @@
--- src/KnownFile.h.orig Tue May 20 21:16:04 2003
+++ src/KnownFile.h Tue May 20 21:23:46 2003
@@ -203,9 +203,6 @@
(a) = MD4_ROTATE_LEFT((a), (s)); \
}
-static void MD4Transform(uint32 Hash[4], uint32 x[16]);
-
-
#if 0
// old implementation
class CFileStatistic{

View file

@ -0,0 +1,13 @@
--- src/WebServer.cpp.orig Tue May 20 20:42:30 2003
+++ src/WebServer.cpp Tue May 20 21:06:14 2003
@@ -9,6 +9,10 @@
#include <wx/wfstream.h>
#include <wx/txtstrm.h>
+#ifdef __FreeBSD__
+extern long long atoll(const char *s);
+#endif /* __FreeBSD__ */
+
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;

View file

@ -0,0 +1,22 @@
--- src/gsocket.c.orig Tue May 27 14:11:08 2003
+++ src/gsocket.c Tue May 27 14:11:58 2003
@@ -127,6 +127,11 @@
# define GSocket_Debug(args)
#endif /* __GSOCKET_DEBUG__ */
+/* Added by Un-Thesis 2003-05-15 */
+/* Allows socket reuse */
+/* Code contributed by McCabe and arkanes */
+int intYes = 1;
+
/* Global initialisers */
int GSocket_Init(void)
@@ -400,7 +405,6 @@
/* Added by Un-Thesis 2003-05-15 */
/* Allows socket reuse */
/* Code contributed by McCabe and arkanes */
-int intYes = 1;
if(setsockopt(sck->m_fd, SOL_SOCKET, SO_REUSEADDR, &intYes, sizeof(int))) {
return GSOCK_IOERR;
}

View file

@ -0,0 +1,11 @@
--- src/otherfunctions.cpp.orig Mon May 26 12:05:22 2003
+++ src/otherfunctions.cpp Mon May 26 12:05:37 2003
@@ -546,7 +546,7 @@
}
#ifdef __FreeBSD__
-long long atoll( char * s ){
+long long atoll(const char * s){
return strtoll(s, (char **)NULL, 10);
}
#endif /* __FreeBSD__ */

View file

@ -0,0 +1,24 @@
--- src/updownclient.h.orig Sun May 25 18:27:59 2003
+++ src/updownclient.h Tue May 27 21:14:31 2003
@@ -26,12 +26,20 @@
#include "SafeFile.h"
#include "BarShader.h"
#include "otherfunctions.h"
+#include <sys/time.h>
class CPartFile;
class CKnownFile;
typedef unsigned char byte;
-extern inline long GetTickCount();
+inline long GetTickCount()
+{
+ struct timeval aika;
+ gettimeofday(&aika,NULL);
+ unsigned long secs=aika.tv_sec*1000;
+ secs+=(aika.tv_usec/1000);
+ return secs;
+}
// uploadstate
#define US_UPLOADING 0

View file

@ -0,0 +1,42 @@
--- src/xmule.cpp.orig Tue May 27 00:02:47 2003
+++ src/xmule.cpp Tue May 27 21:31:38 2003
@@ -55,16 +55,6 @@
// ON_COMMAND(ID_HELP, CWinApp::OnHelp)
//END_MESSAGE_MAP()
-#include <sys/time.h>
-inline long GetTickCount()
-{
- struct timeval aika;
- gettimeofday(&aika,NULL);
- unsigned long secs=aika.tv_sec*1000;
- secs+=(aika.tv_usec/1000);
- return secs;
-}
-
CxmuleApp::CxmuleApp() {
splashBmp=new wxBitmap((const char**)About_jpg);
}
@@ -641,11 +631,13 @@
} //End Added By Bouc7
-
+#if 0
#include <execinfo.h>
+#endif
void CxmuleApp::OnFatalException()
{
+#if 0
// (stkn) create backtrace
void * bt_array[100]; // 100 should be enough ?!?
char ** bt_strings;
@@ -666,6 +658,7 @@
fprintf(stderr, "[%d] %s\n", i, bt_strings[i]);
free(bt_strings);
+#endif
}
#define wxGTK_WINDOW 1

View file

@ -13,4 +13,4 @@ Features
* LMule can be minimized to systray
* You can set nearly all preferences
WWW: http://lmule.sourceforge.net/
WWW: http://www.xmule.org/

View file

@ -1,21 +1,30 @@
bin/lmule
share/gnome/applications/lmule.desktop
share/gnome/pixmaps/lmule.xpm
share/locale/de/LC_MESSAGES/lmule.mo
share/locale/es/LC_MESSAGES/lmule.mo
share/locale/es_MX/LC_MESSAGES/lmule.mo
share/locale/fr/LC_MESSAGES/lmule.mo
share/locale/pl/LC_MESSAGES/lmule.mo
share/locale/tr/LC_MESSAGES/lmule.mo
bin/xmule
share/gnome/applications/xmule.desktop
share/gnome/pixmaps/xmule.xpm
share/locale/de/LC_MESSAGES/xmule.mo
share/locale/ee/LC_MESSAGES/xmule.mo
share/locale/es/LC_MESSAGES/xmule.mo
share/locale/es_MX/LC_MESSAGES/xmule.mo
share/locale/fr/LC_MESSAGES/xmule.mo
share/locale/it/LC_MESSAGES/xmule.mo
share/locale/ko/LC_MESSAGES/xmule.mo
share/locale/pl/LC_MESSAGES/xmule.mo
share/locale/tr/LC_MESSAGES/xmule.mo
@unexec rmdir %D/share/locale/tr/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/tr 2>/dev/null || true
@unexec rmdir %D/share/locale/pl/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/pl 2>/dev/null || true
@unexec rmdir %D/share/locale/ko/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/ko 2>/dev/null || true
@unexec rmdir %D/share/locale/it/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/it 2>/dev/null || true
@unexec rmdir %D/share/locale/fr/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/fr 2>/dev/null || true
@unexec rmdir %D/share/locale/es_MX/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/es_MX 2>/dev/null || true
@unexec rmdir %D/share/locale/es/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/es 2>/dev/null || true
@unexec rmdir %D/share/locale/ee/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/ee 2>/dev/null || true
@unexec rmdir %D/share/locale/de/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/de 2>/dev/null || true