Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-07-18 08:48:23 +0300
committerMark Harris <mark.hsj@gmail.com>2020-08-22 09:35:29 +0300
commit907a52315dd55811701fc6e778799e6d62f2c508 (patch)
tree8de550e37065c67da8c65c120998f92c56dcf566
parent729bd2f4d43e7a17e5deed098f6593bd6be2e01b (diff)
Replace WIN32 with _WIN32 everywhere
_WIN32 is defined on all Windows platforms by every compiler that targets Windows. We do not need WIN32 at all. Signed-off-by: Mark Harris <mark.hsj@gmail.com> Resolves https://github.com/xiph/opus/pull/104
-rw-r--r--celt/stack_alloc.h4
-rw-r--r--include/opus_defines.h2
-rw-r--r--silk/debug.c4
-rw-r--r--tests/test_opus_decode.c2
-rw-r--r--win32/VS2015/common.props2
5 files changed, 7 insertions, 7 deletions
diff --git a/celt/stack_alloc.h b/celt/stack_alloc.h
index 2b51c8d8..ae40e2a1 100644
--- a/celt/stack_alloc.h
+++ b/celt/stack_alloc.h
@@ -40,7 +40,7 @@
#endif
#ifdef USE_ALLOCA
-# ifdef WIN32
+# ifdef _WIN32
# include <malloc.h>
# else
# ifdef HAVE_ALLOCA_H
@@ -102,7 +102,7 @@
#define VARDECL(type, var) type *var
-# ifdef WIN32
+# ifdef _WIN32
# define ALLOC(var, size, type) var = ((type*)_alloca(sizeof(type)*(size)))
# else
# define ALLOC(var, size, type) var = ((type*)alloca(sizeof(type)*(size)))
diff --git a/include/opus_defines.h b/include/opus_defines.h
index d141418b..ceee5b84 100644
--- a/include/opus_defines.h
+++ b/include/opus_defines.h
@@ -64,7 +64,7 @@ extern "C" {
/**Export control for opus functions */
#ifndef OPUS_EXPORT
-# if defined(WIN32)
+# if defined(_WIN32)
# if defined(OPUS_BUILD) && defined(DLL_EXPORT)
# define OPUS_EXPORT __declspec(dllexport)
# else
diff --git a/silk/debug.c b/silk/debug.c
index 4f02912b..eb0c36ef 100644
--- a/silk/debug.c
+++ b/silk/debug.c
@@ -67,7 +67,7 @@ unsigned long GetHighResolutionTime(void) /* O time in usec*/
int silk_Timer_nTimers = 0;
int silk_Timer_depth_ctr = 0;
char silk_Timer_tags[silk_NUM_TIMERS_MAX][silk_NUM_TIMERS_MAX_TAG_LEN];
-#ifdef WIN32
+#ifdef _WIN32
LARGE_INTEGER silk_Timer_start[silk_NUM_TIMERS_MAX];
#else
unsigned long silk_Timer_start[silk_NUM_TIMERS_MAX];
@@ -78,7 +78,7 @@ opus_int64 silk_Timer_sum[silk_NUM_TIMERS_MAX];
opus_int64 silk_Timer_max[silk_NUM_TIMERS_MAX];
opus_int64 silk_Timer_depth[silk_NUM_TIMERS_MAX];
-#ifdef WIN32
+#ifdef _WIN32
void silk_TimerSave(char *file_name)
{
if( silk_Timer_nTimers > 0 )
diff --git a/tests/test_opus_decode.c b/tests/test_opus_decode.c
index 5197fa1d..2d1e2d41 100644
--- a/tests/test_opus_decode.c
+++ b/tests/test_opus_decode.c
@@ -36,7 +36,7 @@
#include <math.h>
#include <string.h>
#include <time.h>
-#if (!defined WIN32 && !defined _WIN32) || defined(__MINGW32__)
+#ifndef _WIN32
#include <unistd.h>
#else
#include <process.h>
diff --git a/win32/VS2015/common.props b/win32/VS2015/common.props
index 6c757d8b..f6e920b6 100644
--- a/win32/VS2015/common.props
+++ b/win32/VS2015/common.props
@@ -23,7 +23,7 @@
<CompileAsManaged>false</CompileAsManaged>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>..\..;..\..\include;..\..\silk;..\..\celt;..\..\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
</ClCompile>