linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #00863
[Branch ~linuxdcpp-team/linuxdcpp/trunk] Rev 366: Compilation fixes for OpenSolaris
------------------------------------------------------------
revno: 366
author: Andrew Browne
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-04-17 23:11:04 -0500
message:
Compilation fixes for OpenSolaris
modified:
Changelog.txt
Credits.txt
SConstruct
dcpp/File.cpp
dcpp/HashManager.cpp
dcpp/QueueManager.cpp
dcpp/User.h
dcpp/Util.cpp
glade/mainwindow.glade
--
lp:linuxdcpp
https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk
Your team LinuxDC++ Team is subscribed to branch lp:linuxdcpp.
To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk/+edit-subscription
=== modified file 'Changelog.txt'
--- Changelog.txt 2010-03-23 03:42:56 +0000
+++ Changelog.txt 2010-04-18 04:11:04 +0000
@@ -49,6 +49,7 @@
[2010-03-16] Added build and version information to terminal output. (Razzloss)
[2010-03-22] lp#541548: Bad NMDC validation messes up LinuxDC++ chat formatting. (Razzloss)
[2010-03-22] Application now registers as the default magnet URI handler on Debian systems. (Steven)
+[2010-04-17] Compilation fixes for OpenSolaris. (thanks Andrew Browne)
*** 1.0.3 2009-02-01 ***
[2008-08-10] lp#256236: Fixed a crash on startup when using auto-open options.
=== modified file 'Credits.txt'
--- Credits.txt 2009-10-11 03:17:46 +0000
+++ Credits.txt 2010-04-18 04:11:04 +0000
@@ -45,6 +45,7 @@
Ximin Luo
mark
Jakh Daven
+Andrew Browne
DC++:
-----
=== modified file 'SConstruct'
--- SConstruct 2010-03-24 06:29:10 +0000
+++ SConstruct 2010-04-18 04:11:04 +0000
@@ -241,6 +241,10 @@
if os.name == 'mac' or os.sys.platform == 'darwin':
env['ICONV_CONST'] = ''
+ if os.sys.platform == 'sunos5':
+ env['ICONV_CONST'] = 'const'
+ env.Append(LINKFLAGS = ['-lsocket', '-lnsl'])
+
if env.has_key('ICONV_CONST') and env['ICONV_CONST']:
env.Append(CXXFLAGS = '-DICONV_CONST=' + env['ICONV_CONST'])
=== modified file 'dcpp/File.cpp'
--- dcpp/File.cpp 2009-03-01 05:27:41 +0000
+++ dcpp/File.cpp 2010-04-18 04:11:04 +0000
@@ -441,7 +441,9 @@
if (dir) {
while (struct dirent* ent = readdir(dir)) {
if (fnmatch(pattern.c_str(), ent->d_name, 0) == 0) {
- const char* extra = (ent->d_type & DT_DIR) ? "/" : "";
+ struct stat s;
+ stat(ent->d_name, &s);
+ const char* extra = (s.st_mode & S_IFDIR) ? "/" : "";
ret.push_back(path + Text::toUtf8(ent->d_name) + extra);
}
}
=== modified file 'dcpp/HashManager.cpp'
--- dcpp/HashManager.cpp 2010-02-28 01:56:15 +0000
+++ dcpp/HashManager.cpp 2010-04-18 04:11:04 +0000
@@ -658,7 +658,7 @@
return false;
}
- madvise(buf, size_read, MADV_SEQUENTIAL | MADV_WILLNEED);
+ posix_madvise(buf, size_read, POSIX_MADV_SEQUENTIAL | POSIX_MADV_WILLNEED);
if(SETTING(MAX_HASH_SPEED) > 0) {
uint64_t now = GET_TICK();
=== modified file 'dcpp/QueueManager.cpp'
--- dcpp/QueueManager.cpp 2009-08-15 04:40:26 +0000
+++ dcpp/QueueManager.cpp 2010-04-18 04:11:04 +0000
@@ -38,7 +38,7 @@
#include "SearchResult.h"
#include "MerkleCheckOutputStream.h"
-#include <limits>
+#include <climits>
#ifdef ff
#undef ff
=== modified file 'dcpp/User.h'
--- dcpp/User.h 2009-08-15 04:40:26 +0000
+++ dcpp/User.h 2010-04-18 04:11:04 +0000
@@ -106,6 +106,11 @@
Identity(const Identity& rhs) : Flags(), sid(0) { *this = rhs; } // Use operator= since we have to lock before reading...
Identity& operator=(const Identity& rhs) { FastLock l(cs); *static_cast<Flags*>(this) = rhs; user = rhs.user; sid = rhs.sid; info = rhs.info; return *this; }
+// GS is already defined on some systems (e.g. OpenSolaris)
+#ifdef GS
+#undef GS
+#endif
+
#define GS(n, x) string get##n() const { return get(x); } void set##n(const string& v) { set(x, v); }
GS(Nick, "NI")
GS(Description, "DE")
=== modified file 'dcpp/Util.cpp'
--- dcpp/Util.cpp 2009-10-29 21:18:49 +0000
+++ dcpp/Util.cpp 2010-04-18 04:11:04 +0000
@@ -37,6 +37,7 @@
#include <netdb.h>
#include <sys/utsname.h>
#include <ctype.h>
+#include <string.h>
#endif
#include <locale.h>
=== modified file 'glade/mainwindow.glade'
--- glade/mainwindow.glade 2010-03-15 12:30:41 +0000
+++ glade/mainwindow.glade 2010-04-18 04:11:04 +0000
@@ -878,6 +878,7 @@
Ximin Luo
mark
Jakh Daven
+ Andrew Browne
</property>
<property name="artists">Johannes Sjölund</property>
<property name="wrap_license">True</property>