Annotation of ports/games/megaglest/base/patches/patch-source_shared_lib_sources_platform_common_platform_common_cpp, Revision 1.3
1.1 yason 1: $OpenBSD$
1.3 ! yason 2: --- source/shared_lib/sources/platform/common/platform_common.cpp.orig Fri May 27 20:39:01 2011
! 3: +++ source/shared_lib/sources/platform/common/platform_common.cpp Mon Aug 1 09:13:04 2011
! 4: @@ -825,7 +825,7 @@ int32 getFolderTreeContentsCheckSumRecursively(const s
1.1 yason 5: glob_t globbuf;
6:
7: int res = glob(mypath.c_str(), 0, 0, &globbuf);
8: -#if !defined(__APPLE__) && !defined(__FreeBSD__)
9: +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
10: if(res < 0) {
11: std::stringstream msg;
12: msg << "#2 Couldn't scan directory '" << mypath << "': " << strerror(errno);
1.3 ! yason 13: @@ -859,13 +859,13 @@ int32 getFolderTreeContentsCheckSumRecursively(const s
1.1 yason 14: globfree(&globbuf);
15:
16: // Look recursively for sub-folders
17: -#if defined(__APPLE__) || defined(__FreeBSD__)
18: +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
19: res = glob(mypath.c_str(), 0, 0, &globbuf);
20: #else
21: res = glob(mypath.c_str(), GLOB_ONLYDIR, 0, &globbuf);
22: #endif
23:
24: -#if !defined(__APPLE__) && !defined(__FreeBSD__)
25: +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
26: if(res < 0) {
27: std::stringstream msg;
28: msg << "#3 Couldn't scan directory '" << mypath << "': " << strerror(errno);
1.3 ! yason 29: @@ -874,7 +874,7 @@ int32 getFolderTreeContentsCheckSumRecursively(const s
1.1 yason 30: #endif
31:
32: for(int i = 0; i < globbuf.gl_pathc; ++i) {
33: -#if defined(__APPLE__) || defined(__FreeBSD__)
34: +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
35: struct stat statStruct;
36: // only process if dir..
37: int actStat = lstat( globbuf.gl_pathv[i], &statStruct);
1.3 ! yason 38: @@ -1006,7 +1006,7 @@ vector<string> getFolderTreeContentsListRecursively(co
1.2 yason 39: }
1.1 yason 40:
1.2 yason 41: int res = glob(mypath.c_str(), globFlags, 0, &globbuf);
1.1 yason 42: -#if !defined(__APPLE__) && !defined(__FreeBSD__)
43: +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
44: if(res < 0) {
45: std::stringstream msg;
46: msg << "#4 Couldn't scan directory '" << mypath << "': " << strerror(errno);
1.3 ! yason 47: @@ -1039,14 +1039,14 @@ vector<string> getFolderTreeContentsListRecursively(co
1.1 yason 48: globfree(&globbuf);
49:
50: // Look recursively for sub-folders
51: -#if defined(__APPLE__) || defined(__FreeBSD__)
52: +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
53: res = glob(mypath.c_str(), 0, 0, &globbuf);
54: #else //APPLE doesn't have the GLOB_ONLYDIR definition..
1.2 yason 55: globFlags |= GLOB_ONLYDIR;
56: res = glob(mypath.c_str(), globFlags, 0, &globbuf);
1.1 yason 57: #endif
58:
59: -#if !defined(__APPLE__) && !defined(__FreeBSD__)
60: +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
61: if(res < 0) {
62: std::stringstream msg;
63: msg << "#5 Couldn't scan directory '" << mypath << "': " << strerror(errno);
1.3 ! yason 64: @@ -1055,7 +1055,7 @@ vector<string> getFolderTreeContentsListRecursively(co
1.1 yason 65: #endif
66:
67: for(int i = 0; i < globbuf.gl_pathc; ++i) {
68: -#if defined(__APPLE__) || defined(__FreeBSD__)
69: +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
70: struct stat statStruct;
71: // only get if dir..
72: int actStat = lstat( globbuf.gl_pathv[ i], &statStruct);
1.3 ! yason 73: @@ -1147,7 +1147,7 @@ vector<std::pair<string,int32> > getFolderTreeContents
1.1 yason 74:
75: int res = glob(mypath.c_str(), 0, 0, &globbuf);
76:
77: -#if !defined(__APPLE__) && !defined(__FreeBSD__)
78: +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
79: if(res < 0) {
80: std::stringstream msg;
81: msg << "#6 Couldn't scan directory '" << mypath << "': " << strerror(errno);
1.3 ! yason 82: @@ -1179,13 +1179,13 @@ vector<std::pair<string,int32> > getFolderTreeContents
1.1 yason 83: globfree(&globbuf);
84:
85: // Look recursively for sub-folders
86: -#if defined(__APPLE__) || defined(__FreeBSD__)
87: +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
88: res = glob(mypath.c_str(), 0, 0, &globbuf);
89: #else //APPLE doesn't have the GLOB_ONLYDIR definition..
90: res = glob(mypath.c_str(), GLOB_ONLYDIR, 0, &globbuf);
91: #endif
92:
93: -#if !defined(__APPLE__) && !defined(__FreeBSD__)
94: +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
95: if(res < 0) {
96: std::stringstream msg;
97: msg << "#7 Couldn't scan directory '" << mypath << "': " << strerror(errno);
1.3 ! yason 98: @@ -1194,7 +1194,7 @@ vector<std::pair<string,int32> > getFolderTreeContents
1.1 yason 99: #endif
100:
101: for(int i = 0; i < globbuf.gl_pathc; ++i) {
102: -#if defined(__APPLE__) || defined(__FreeBSD__)
103: +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
104: struct stat statStruct;
105: // only get if dir..
106: int actStat = lstat( globbuf.gl_pathv[ i], &statStruct);
CVSweb