version 1.1, 2011/04/24 18:49:09 |
version 1.2, 2011/05/05 20:55:08 |
|
|
$OpenBSD$ |
$OpenBSD$ |
--- source/shared_lib/sources/platform/common/platform_common.cpp.orig Sun Apr 10 15:44:57 2011 |
--- source/shared_lib/sources/platform/common/platform_common.cpp.orig Mon Apr 25 12:19:37 2011 |
+++ source/shared_lib/sources/platform/common/platform_common.cpp Sun Apr 10 15:48:10 2011 |
+++ source/shared_lib/sources/platform/common/platform_common.cpp Mon Apr 25 12:23:17 2011 |
@@ -455,7 +455,7 @@ int32 getFolderTreeContentsCheckSumRecursively(const s |
@@ -773,7 +773,7 @@ int32 getFolderTreeContentsCheckSumRecursively(const s |
glob_t globbuf; |
glob_t globbuf; |
|
|
int res = glob(mypath.c_str(), 0, 0, &globbuf); |
int res = glob(mypath.c_str(), 0, 0, &globbuf); |
|
|
if(res < 0) { |
if(res < 0) { |
std::stringstream msg; |
std::stringstream msg; |
msg << "#2 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
msg << "#2 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
@@ -491,13 +491,13 @@ int32 getFolderTreeContentsCheckSumRecursively(const s |
@@ -807,13 +807,13 @@ int32 getFolderTreeContentsCheckSumRecursively(const s |
globfree(&globbuf); |
globfree(&globbuf); |
|
|
// Look recursively for sub-folders |
// Look recursively for sub-folders |
|
|
if(res < 0) { |
if(res < 0) { |
std::stringstream msg; |
std::stringstream msg; |
msg << "#3 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
msg << "#3 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
@@ -506,7 +506,7 @@ int32 getFolderTreeContentsCheckSumRecursively(const s |
@@ -822,7 +822,7 @@ int32 getFolderTreeContentsCheckSumRecursively(const s |
#endif |
#endif |
|
|
for(int i = 0; i < globbuf.gl_pathc; ++i) { |
for(int i = 0; i < globbuf.gl_pathc; ++i) { |
|
|
struct stat statStruct; |
struct stat statStruct; |
// only process if dir.. |
// only process if dir.. |
int actStat = lstat( globbuf.gl_pathv[i], &statStruct); |
int actStat = lstat( globbuf.gl_pathv[i], &statStruct); |
@@ -597,7 +597,7 @@ vector<string> getFolderTreeContentsListRecursively(co |
@@ -954,7 +954,7 @@ vector<string> getFolderTreeContentsListRecursively(co |
glob_t globbuf; |
} |
|
|
int res = glob(mypath.c_str(), 0, 0, &globbuf); |
int res = glob(mypath.c_str(), globFlags, 0, &globbuf); |
-#if !defined(__APPLE__) && !defined(__FreeBSD__) |
-#if !defined(__APPLE__) && !defined(__FreeBSD__) |
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) |
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) |
if(res < 0) { |
if(res < 0) { |
std::stringstream msg; |
std::stringstream msg; |
msg << "#4 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
msg << "#4 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
@@ -631,13 +631,13 @@ vector<string> getFolderTreeContentsListRecursively(co |
@@ -987,14 +987,14 @@ vector<string> getFolderTreeContentsListRecursively(co |
globfree(&globbuf); |
globfree(&globbuf); |
|
|
// Look recursively for sub-folders |
// Look recursively for sub-folders |
|
|
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) |
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) |
res = glob(mypath.c_str(), 0, 0, &globbuf); |
res = glob(mypath.c_str(), 0, 0, &globbuf); |
#else //APPLE doesn't have the GLOB_ONLYDIR definition.. |
#else //APPLE doesn't have the GLOB_ONLYDIR definition.. |
res = glob(mypath.c_str(), GLOB_ONLYDIR, 0, &globbuf); |
globFlags |= GLOB_ONLYDIR; |
|
res = glob(mypath.c_str(), globFlags, 0, &globbuf); |
#endif |
#endif |
|
|
-#if !defined(__APPLE__) && !defined(__FreeBSD__) |
-#if !defined(__APPLE__) && !defined(__FreeBSD__) |
|
|
if(res < 0) { |
if(res < 0) { |
std::stringstream msg; |
std::stringstream msg; |
msg << "#5 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
msg << "#5 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
@@ -646,7 +646,7 @@ vector<string> getFolderTreeContentsListRecursively(co |
@@ -1003,7 +1003,7 @@ vector<string> getFolderTreeContentsListRecursively(co |
#endif |
#endif |
|
|
for(int i = 0; i < globbuf.gl_pathc; ++i) { |
for(int i = 0; i < globbuf.gl_pathc; ++i) { |
|
|
struct stat statStruct; |
struct stat statStruct; |
// only get if dir.. |
// only get if dir.. |
int actStat = lstat( globbuf.gl_pathv[ i], &statStruct); |
int actStat = lstat( globbuf.gl_pathv[ i], &statStruct); |
@@ -702,7 +702,7 @@ vector<std::pair<string,int32> > getFolderTreeContents |
@@ -1095,7 +1095,7 @@ vector<std::pair<string,int32> > getFolderTreeContents |
|
|
int res = glob(mypath.c_str(), 0, 0, &globbuf); |
int res = glob(mypath.c_str(), 0, 0, &globbuf); |
|
|
|
|
if(res < 0) { |
if(res < 0) { |
std::stringstream msg; |
std::stringstream msg; |
msg << "#6 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
msg << "#6 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
@@ -736,13 +736,13 @@ vector<std::pair<string,int32> > getFolderTreeContents |
@@ -1127,13 +1127,13 @@ vector<std::pair<string,int32> > getFolderTreeContents |
globfree(&globbuf); |
globfree(&globbuf); |
|
|
// Look recursively for sub-folders |
// Look recursively for sub-folders |
|
|
if(res < 0) { |
if(res < 0) { |
std::stringstream msg; |
std::stringstream msg; |
msg << "#7 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
msg << "#7 Couldn't scan directory '" << mypath << "': " << strerror(errno); |
@@ -751,7 +751,7 @@ vector<std::pair<string,int32> > getFolderTreeContents |
@@ -1142,7 +1142,7 @@ vector<std::pair<string,int32> > getFolderTreeContents |
#endif |
#endif |
|
|
for(int i = 0; i < globbuf.gl_pathc; ++i) { |
for(int i = 0; i < globbuf.gl_pathc; ++i) { |