Some preliminary changes needed to support building with VS2019

(these get me about as far as 'libardour' )
This commit is contained in:
John Emmas
2021-01-30 13:55:25 +00:00
parent 24e0391679
commit b496a71d2e
6 changed files with 31 additions and 19 deletions

View File

@@ -58,7 +58,7 @@
using Temporal::max_samplepos;
using Temporal::max_samplecnt;
#if __GNUC__ < 3
#if defined (__GNUC__) && (__GNUC__ < 3)
typedef int intptr_t;
#endif

View File

@@ -17,6 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifdef FPU_AVX_FMA_SUPPORT
#include "ardour/mix.h"
#include <immintrin.h>
@@ -135,3 +137,5 @@ x86_fma_mix_buffers_with_gain(
}
} while (0);
}
#endif // FPU_AVX_FMA_SUPPORT

View File

@@ -753,7 +753,7 @@ bool bValidPath = false;
#if (_WIN32_WINNT >= 0x0500)
if (0 == strRootFileSystemType.compare("NTFS"))
{
if (TestForMinimumSpecOS()) // Hard links were only available from Win2K onwards
if (TestForMinimumSpecOS(NULL)) // Hard links were only available from Win2K onwards
if (0 == CreateHardLinkA(link_filepath, existing_filepath, NULL))
{ // Note that the above API call cannot create a link to a directory, so
// should we also be checking that the supplied path was actually a file?
@@ -882,7 +882,7 @@ bool bValidPath = false;
std::transform(strRootFileSystemType.begin(), strRootFileSystemType.end(), strRootFileSystemType.begin(), ::toupper);
#if (_WIN32_WINNT >= 0x0500)
if (0 == strRootFileSystemType.compare("NTFS"))
if (TestForMinimumSpecOS()) // Hard links were only available from Win2K onwards
if (TestForMinimumSpecOS(NULL)) // Hard links were only available from Win2K onwards
if (0 == DeleteFileA(link_filepath))
ret = GetLastError();
else

View File

@@ -217,18 +217,22 @@ LIBPBD_API double PBD_APICALLTYPE trunc(double x);
namespace PBD {
LIBPBD_API bool PBD_APICALLTYPE TestForMinimumSpecOS(char *revision="currently ignored");
LIBPBD_API char* PBD_APICALLTYPE realpath (const char *original_path, char resolved_path[_MAX_PATH+1]);
LIBPBD_API int PBD_APICALLTYPE mkstemp (char *template_name);
LIBPBD_API int PBD_APICALLTYPE ntfs_link (const char *existing_filepath, const char *link_filepath);
LIBPBD_API int PBD_APICALLTYPE ntfs_unlink (const char *link_filepath);
// These are used to replicate 'dirent.h' functionality
LIBPBD_API DIR* PBD_APICALLTYPE opendir (const char *szPath);
LIBPBD_API struct dirent* PBD_APICALLTYPE readdir (DIR *pDir);
LIBPBD_API int PBD_APICALLTYPE closedir (DIR *pDir);
} // namespace PBD
#if defined(_MSC_VER) && (_MSC_VER < 1900)
LIBPBD_API char* PBD_APICALLTYPE realpath (const char *original_path, char resolved_path[_MAX_PATH+1]);
LIBPBD_API int PBD_APICALLTYPE mkstemp (char *template_name);
// JE - 30-01-2021 (AFAICT these ones aren't needed any more)
LIBPBD_API bool PBD_APICALLTYPE TestForMinimumSpecOS(char *revision="currently ignored");
LIBPBD_API int PBD_APICALLTYPE ntfs_link (const char *existing_filepath, const char *link_filepath);
LIBPBD_API int PBD_APICALLTYPE ntfs_unlink (const char *link_filepath);
#endif
} // namespace PBD */
#ifdef __cplusplus
} /* extern "C" */