blob: d9306c700878fb09d27652f77b2c3b202ec6be12 [file] [log] [blame]
diff -Naur alembic-1.7.9.orig/bin/AbcLs/AbcLs.cpp alembic-1.7.9/bin/AbcLs/AbcLs.cpp
--- alembic-1.7.9.orig/bin/AbcLs/AbcLs.cpp 2018-10-12 17:05:36.907226500 -0400
+++ alembic-1.7.9/bin/AbcLs/AbcLs.cpp 2018-10-12 17:07:03.914695000 -0400
@@ -52,11 +52,11 @@
#include <sys/stat.h>
// no unistd under visual studio
-#ifndef _MSC_VER
+#ifndef _WIN32
#include <unistd.h>
#endif
-#ifdef _MSC_VER
+#ifdef _WIN32
#include <locale> // std::locale, std::isdigit
// set up _S_ISDIR()
#if !defined(S_ISDIR)
@@ -65,7 +65,7 @@
# endif
# define S_ISDIR(mode) (mode&__S_IFDIR)
#endif
-#endif // _MSC_VER
+#endif // _WIN32
namespace Abc = ::Alembic::Abc;
namespace AbcA = ::Alembic::AbcCoreAbstract;
@@ -650,7 +650,7 @@
act.sa_flags = SA_SIGINFO;
sigaction(SIGSEGV, &act, NULL);
/* signal if available */
-#elif defined(_POSIX_VERSION) || defined(_MSC_VER)
+#elif defined(_POSIX_VERSION) || defined(_WIN32)
signal(SIGSEGV, segfault_sigaction);
#else
#error No signal interface available
diff -Naur alembic-1.7.9.orig/bin/AbcTree/AbcTree.cpp alembic-1.7.9/bin/AbcTree/AbcTree.cpp
--- alembic-1.7.9.orig/bin/AbcTree/AbcTree.cpp 2018-10-12 17:05:36.907226500 -0400
+++ alembic-1.7.9/bin/AbcTree/AbcTree.cpp 2018-10-12 17:07:29.598270300 -0400
@@ -50,7 +50,7 @@
#include <sstream>
#include <sys/stat.h>
-#ifdef _MSC_VER
+#ifdef _WIN32
// set up _S_ISDIR()
#if !defined(S_ISDIR)
# if defined( _S_IFDIR) && !defined( __S_IFDIR)
@@ -58,7 +58,7 @@
# endif
# define S_ISDIR(mode) (mode&__S_IFDIR)
#endif
-#endif // _MSC_VER
+#endif // _WIN32
namespace Abc = ::Alembic::Abc;;
namespace AbcA = ::Alembic::AbcCoreAbstract;
diff -Naur alembic-1.7.9.orig/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp alembic-1.7.9/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp
--- alembic-1.7.9.orig/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp 2018-10-12 17:05:37.136358800 -0400
+++ alembic-1.7.9/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp 2018-10-12 17:07:58.767066200 -0400
@@ -36,7 +36,7 @@
#include <Alembic/AbcCoreOgawa/ReadUtil.h>
-#if defined(_MSC_VER)
+#if defined(_WIN32)
# if defined(max)
# undef max
# endif
diff -Naur alembic-1.7.9.orig/lib/Alembic/AbcCoreOgawa/StreamManager.cpp alembic-1.7.9/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
--- alembic-1.7.9.orig/lib/Alembic/AbcCoreOgawa/StreamManager.cpp 2018-10-12 17:05:37.151983900 -0400
+++ alembic-1.7.9/lib/Alembic/AbcCoreOgawa/StreamManager.cpp 2018-10-12 17:08:47.009950000 -0400
@@ -46,10 +46,10 @@
#if !defined( ALEMBIC_LIB_USES_TR1 ) && __cplusplus >= 201103L
#define COMPARE_EXCHANGE( V, COMP, EXCH ) V.compare_exchange_weak( COMP, EXCH, std::memory_order_seq_cst, std::memory_order_seq_cst )
// Windows
-#elif defined( _MSC_VER )
+#elif defined( _WIN32 )
#define COMPARE_EXCHANGE( V, COMP, EXCH ) (InterlockedCompareExchange64( &V, EXCH, COMP ) == COMP)
-Alembic::Util::int64_t ffsll( Alembic::Util::int64_t iValue )
+Alembic::Util::int64_t __builtin_ffsll( Alembic::Util::int64_t iValue )
{
if ( !iValue )
{
@@ -138,7 +138,7 @@
do
{
oldVal = m_streams;
- val = ffsll( oldVal );
+ val = __builtin_ffsll( oldVal );
if ( val == 0 )
{
diff -Naur alembic-1.7.9.orig/lib/Alembic/Ogawa/IStreams.cpp alembic-1.7.9/lib/Alembic/Ogawa/IStreams.cpp
--- alembic-1.7.9.orig/lib/Alembic/Ogawa/IStreams.cpp 2018-10-12 17:05:37.245737200 -0400
+++ alembic-1.7.9/lib/Alembic/Ogawa/IStreams.cpp 2018-10-12 17:19:06.631149600 -0400
@@ -36,6 +36,8 @@
#include <Alembic/Ogawa/IStreams.h>
#include <fstream>
#include <stdexcept>
+#include <cstring>
+#include <pthread.h>
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
@@ -45,13 +47,12 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
- #include <cstring>
-
#elif defined(_WIN32)
#include <windows.h>
#include <fcntl.h>
#include <io.h>
+ #include <share.h>
#include <sys/stat.h>
#else
diff -Naur alembic-1.7.9.orig/lib/Alembic/Util/Foundation.h alembic-1.7.9/lib/Alembic/Util/Foundation.h
--- alembic-1.7.9.orig/lib/Alembic/Util/Foundation.h 2018-10-12 17:05:37.058224500 -0400
+++ alembic-1.7.9/lib/Alembic/Util/Foundation.h 2018-10-12 17:10:58.673701400 -0400
@@ -51,7 +51,6 @@
#include <boost/foreach.hpp>
#include <boost/unordered_map.hpp>
-// tr1 is not available in older versions of Visual Studio i.e. _MSC_VER <= 1600
#elif defined(ALEMBIC_LIB_USES_TR1)
#include <tr1/memory>
#include <tr1/unordered_map>
@@ -83,7 +82,7 @@
#include <Alembic/Util/Export.h>
-#ifdef _MSC_VER
+#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
@@ -214,7 +213,7 @@
};
// inspired by boost::mutex
-#ifdef _MSC_VER
+#ifdef _WIN32
class mutex : noncopyable
{
diff -Naur alembic-1.7.9.orig/lib/Alembic/Util/Murmur3.cpp alembic-1.7.9/lib/Alembic/Util/Murmur3.cpp
--- alembic-1.7.9.orig/lib/Alembic/Util/Murmur3.cpp 2018-10-12 17:05:37.058224500 -0400
+++ alembic-1.7.9/lib/Alembic/Util/Murmur3.cpp 2018-10-12 17:11:28.885886900 -0400
@@ -41,7 +41,7 @@
#ifdef __APPLE__
#include <machine/endian.h>
-#elif !defined(_MSC_VER)
+#elif !defined(_WIN32)
#include <endian.h>
#endif
@@ -60,7 +60,7 @@
uint64_t h2 = 0;
-#ifdef _MSC_VER
+#ifdef _WIN32
uint64_t c1 = 0x87c37b91114253d5LL;
uint64_t c2 = 0x4cf5ad432745937fLL;
#else
@@ -230,7 +230,7 @@
h1 += h2;
h2 += h1;
-#ifdef _MSC_VER
+#ifdef _WIN32
h1 ^= h1 >> 33;
h1 *= 0xff51afd7ed558ccdLL;
h1 ^= h1 >> 33;
diff -Naur alembic-1.7.9.orig/lib/Alembic/Util/PlainOldDataType.h alembic-1.7.9/lib/Alembic/Util/PlainOldDataType.h
--- alembic-1.7.9.orig/lib/Alembic/Util/PlainOldDataType.h 2018-10-12 17:05:37.058224500 -0400
+++ alembic-1.7.9/lib/Alembic/Util/PlainOldDataType.h 2018-10-12 17:12:15.454985300 -0400
@@ -40,10 +40,7 @@
#include <Alembic/Util/Foundation.h>
#include <Alembic/Util/Exception.h>
-// stdint.h is not in anything prior to Visual Studio 2010
-#if !defined(_MSC_VER) || _MSC_VER >= 1600
#include <stdint.h>
-#endif
namespace Alembic {
namespace Util {
@@ -136,7 +133,6 @@
return a != b.asBool();
}
-#if !defined(_MSC_VER) || _MSC_VER >= 1600
using ::uint8_t;
using ::int8_t;
using ::uint16_t;
@@ -145,16 +141,6 @@
using ::int32_t;
using ::uint64_t;
using ::int64_t;
-#else
-typedef unsigned char uint8_t;
-typedef signed char int8_t;
-typedef unsigned short uint16_t;
-typedef signed short int16_t;
-typedef unsigned int uint32_t;
-typedef int int32_t;
-typedef unsigned long long uint64_t;
-typedef long long int64_t;
-#endif
typedef half float16_t;
typedef float float32_t;