Annotation of ports/games/megaglest/base/patches/patch-source_shared_lib_sources_platform_common_platform_common_cpp, Revision 1.2
1.1 yason 1: $OpenBSD$
1.2 ! yason 2: --- source/shared_lib/sources/platform/common/platform_common.cpp.orig Mon Apr 25 12:19:37 2011
! 3: +++ source/shared_lib/sources/platform/common/platform_common.cpp Mon Apr 25 12:23:17 2011
! 4: @@ -773,7 +773,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.2 ! yason 13: @@ -807,13 +807,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.2 ! yason 29: @@ -822,7 +822,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.2 ! yason 38: @@ -954,7 +954,7 @@ vector<string> getFolderTreeContentsListRecursively(co
! 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.2 ! yason 47: @@ -987,14 +987,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.2 ! yason 64: @@ -1003,7 +1003,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.2 ! yason 73: @@ -1095,7 +1095,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.2 ! yason 82: @@ -1127,13 +1127,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.2 ! yason 98: @@ -1142,7 +1142,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