[Scummvm-git-logs] scummvm master -> 5a78e1350b70b1146a90f48ad5d7f0470e93c83b

sluicebox 22204938+sluicebox at users.noreply.github.com
Tue Feb 9 21:34:01 UTC 2021


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7e79fd6e61 CREATE-PROJECT: Include CommonDigest.h for macOS, not CommonCrypto
03960d5663 CREATE-PROJECT: Call realpath() in a more portable way
5a78e1350b CREATE-PROJECT: Provide a stub for "override" to older compilers


Commit: 7e79fd6e6145510ef6eb919d45fed1f89b4e4f9b
    https://github.com/scummvm/scummvm/commit/7e79fd6e6145510ef6eb919d45fed1f89b4e4f9b
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2021-02-09T13:33:56-08:00

Commit Message:
CREATE-PROJECT: Include CommonDigest.h for macOS, not CommonCrypto

<CommonCrypto/CommonDigest.h> should be used for CC_MD5() on macOS.

Fixes the build on Leopard.

Changed paths:
    devtools/create_project/xcode.cpp


diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index c400d246c0..ddb5bb72ad 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -29,7 +29,7 @@
 #ifdef MACOSX
 #include <sstream>
 #include <iomanip>
-#include <CommonCrypto/CommonCrypto.h>
+#include <CommonCrypto/CommonDigest.h>
 #endif
 
 namespace CreateProjectTool {


Commit: 03960d5663bdb319140c9814d05e61d2f71edc81
    https://github.com/scummvm/scummvm/commit/03960d5663bdb319140c9814d05e61d2f71edc81
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2021-02-09T13:33:56-08:00

Commit Message:
CREATE-PROJECT: Call realpath() in a more portable way

Non POSIX.1-2008 systems will not necessarily accept NULL as the
second argument, and could crash the program here. Provide a
temporary buffer on the stack instead, and don't count on realpath()
allocating one on the heap. This will work on older POSIX.1-2001
systems.

(In theory, this older POSIX.1-2001 syntax could have portability
problems too, because of PATH_MAX, but in practice this shouldn't
be a problem for the systems intended to be used by create_project.)

Fixes the build on Mac OS X Leopard.

Changed paths:
    devtools/create_project/xcode.cpp


diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index ddb5bb72ad..77f91fdece 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -23,6 +23,9 @@
 #include "config.h"
 #include "xcode.h"
 
+#include <limits.h>
+#include <stdlib.h>
+
 #include <fstream>
 #include <algorithm>
 
@@ -938,9 +941,9 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
 
 	std::string projectOutputDirectory;
 #ifdef POSIX
-	char *rp = realpath(setup.outputDir.c_str(), NULL);
+	char tmpbuf[PATH_MAX];
+	char *rp = realpath(setup.outputDir.c_str(), tmpbuf);
 	projectOutputDirectory = rp;
-	free(rp);
 #endif
 
 	/****************************************


Commit: 5a78e1350b70b1146a90f48ad5d7f0470e93c83b
    https://github.com/scummvm/scummvm/commit/5a78e1350b70b1146a90f48ad5d7f0470e93c83b
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2021-02-09T13:33:56-08:00

Commit Message:
CREATE-PROJECT: Provide a stub for "override" to older compilers

msbuild.h makes uses of the "override" keyword, so borrow the compat
macro from c++11-compat.h to make this work on older compilers,
such as the ones found on Mac OS X Leopard.

Changed paths:
    devtools/create_project/create_project.h


diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index f3a05c1e76..f58eddb08a 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -27,6 +27,10 @@
 #define __has_feature(x) 0 // Compatibility with non-clang compilers.
 #endif
 
+#if __cplusplus < 201103L && (!defined(_MSC_VER) || _MSC_VER < 1700)
+#define override           // Compatibility with non-C++11 compilers.
+#endif
+
 #include <list>
 #include <map>
 #include <map>




More information about the Scummvm-git-logs mailing list