linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #00864
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2126: Compilation fixes for OpenSolaris
------------------------------------------------------------
revno: 2126
author: Andrew Browne <dersaidin@xxxxxxxxx>
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-04-17 23:32:43 -0500
message:
Compilation fixes for OpenSolaris
modified:
dcpp/File.cpp
dcpp/HashManager.cpp
dcpp/QueueManager.cpp
dcpp/User.h
dcpp/Util.cpp
win32/AboutDlg.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/File.cpp'
--- dcpp/File.cpp 2010-02-11 21:44:13 +0000
+++ dcpp/File.cpp 2010-04-18 04:32:43 +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 03:22:07 +0000
+++ dcpp/HashManager.cpp 2010-04-18 04:32:43 +0000
@@ -694,7 +694,7 @@
break;
}
- if (madvise(buf, size_read, MADV_SEQUENTIAL | MADV_WILLNEED) == -1) {
+ if (posix_madvise(buf, size_read, POSIX_MADV_SEQUENTIAL | POSIX_MADV_WILLNEED) == -1) {
dcdebug("Error calling madvise for file %s: %s\n", filename.c_str(), Util::translateError(errno).c_str());
break;
}
=== modified file 'dcpp/QueueManager.cpp'
--- dcpp/QueueManager.cpp 2010-02-11 21:44:13 +0000
+++ dcpp/QueueManager.cpp 2010-04-18 04:32:43 +0000
@@ -38,7 +38,7 @@
#include "SearchResult.h"
#include "MerkleCheckOutputStream.h"
-#include <limits>
+#include <climits>
#if !defined(_WIN32) && !defined(PATH_MAX) // Extra PATH_MAX check for Mac OS X
#include <sys/syslimits.h>
=== modified file 'dcpp/User.h'
--- dcpp/User.h 2010-02-11 21:44:13 +0000
+++ dcpp/User.h 2010-04-18 04:32:43 +0000
@@ -119,6 +119,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 2010-03-20 16:51:58 +0000
+++ dcpp/Util.cpp 2010-04-18 04:32:43 +0000
@@ -36,6 +36,7 @@
#include <netdb.h>
#include <sys/utsname.h>
#include <ctype.h>
+#include <string.h>
#endif
#include <locale.h>
=== modified file 'win32/AboutDlg.cpp'
--- win32/AboutDlg.cpp 2010-02-14 16:06:46 +0000
+++ win32/AboutDlg.cpp 2010-04-18 04:32:43 +0000
@@ -44,7 +44,7 @@
"krzysztof tyszecki, poison, mikejj, pur, bigmuscle, martin, jove, bart vullings, "
"steven sheehy, tobias nygren, poy, dorian, stephan hohe, mafa_45, mikael eman, james ross, "
"stanislav maslovski, david grundberg, pavel andreev, yakov suraev, kulmegil, smir, emtee, individ, "
-"pseudonym, crise, ben, ximin luo, radox, razzloss. "
+"pseudonym, crise, ben, ximin luo, radox, razzloss, Andrew Browne. "
"Keep it coming!";
AboutDlg::AboutDlg(dwt::Widget* parent) :