浏览代码

libobs/util: Add macro to specify arch. bits

jp9000 10 年之前
父节点
当前提交
5d33c777c2
共有 1 个文件被更改,包括 18 次插入0 次删除
  1. 18 0
      libobs/util/platform.h

+ 18 - 0
libobs/util/platform.h

@@ -146,6 +146,24 @@ EXPORT int os_copyfile(const char *file_in, const char *file_out);
 #endif
 #endif
 
+#ifdef __APPLE__
+# define ARCH_BITS 64
+#else
+# ifdef _WIN32
+#  ifdef _WIN64
+#   define ARCH_BITS 64
+#  else
+#   define ARCH_BITS 32
+#  endif
+# else
+#  ifdef __LP64__
+#   define ARCH_BITS 64
+#  else
+#   define ARCH_BITS 32
+#  endif
+# endif
+#endif
+
 #ifdef __cplusplus
 }
 #endif