Преглед изворни кода

Fixed some Mac compilation errors in polybuild.cpp.

Cameron Hart пре 14 година
родитељ
комит
e121beb372
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      Tools/Contents/polybuild/Source/polybuild.cpp

+ 4 - 3
Tools/Contents/polybuild/Source/polybuild.cpp

@@ -137,8 +137,9 @@ Dest[i] = (char)Source[i];
 int main(int argc, char **argv) {
 		
 #if defined(__APPLE__) && defined(__MACH__)
-	char path[2049];
-	_NSGetExecutablePath(path, 2048);
+    uint32_t bufsize = 2048;
+	char path[bufsize];
+	_NSGetExecutablePath(path, &bufsize);
 
 	String basePath = path;
 	vector<String> cpts = basePath.split("/");
@@ -197,7 +198,7 @@ int main(int argc, char **argv) {
 
 	char dirPath[4099];
 #if defined(__APPLE__) && defined(__MACH__)
-	_getcwd(dirPath, sizeof(dirPath));
+	getcwd(dirPath, sizeof(dirPath));
 #elif defined (_WINDOWS)
 	TCHAR tdirpath[4099];
 	GetCurrentDirectory(4098, (LPWSTR)tdirpath);