[Forensics-changes] [yara] 105/135: Replace WIN32 with _WIN32. The latest is defined by the compiler and doesn't need to be defined externally.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:27:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.1.0
in repository yara.
commit 3b5ddd067f8360365beccf79646171dba657b184
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Wed Aug 20 11:22:37 2014 +0200
Replace WIN32 with _WIN32. The latest is defined by the compiler and doesn't need to be defined externally.
---
libyara/compiler.c | 2 +-
libyara/exefiles.c | 2 +-
libyara/filemap.c | 4 ++--
libyara/hex_lexer.c | 8 ++++----
libyara/include/yara/types.h | 2 +-
libyara/include/yara/utils.h | 2 +-
libyara/lexer.c | 4 ++--
libyara/libyara.c | 12 ++++++------
libyara/mem.c | 2 +-
libyara/modules/pe.c | 2 +-
libyara/proc.c | 2 +-
libyara/re.c | 16 ++++++++--------
libyara/re_lexer.c | 8 ++++----
libyara/rules.c | 8 ++++----
threading.c | 22 +++++++++++-----------
threading.h | 4 ++--
windows/libyara/libyara.vcxproj | 8 ++++----
windows/yara/yara.vcxproj | 8 ++++----
windows/yarac/yarac.vcxproj | 8 ++++----
yara-python/setupwin32.py | 1 -
yara-python/setupwin64.py | 1 -
yara.c | 6 +++---
yarac.c | 2 +-
23 files changed, 66 insertions(+), 68 deletions(-)
diff --git a/libyara/compiler.c b/libyara/compiler.c
index de59c35..7d3652f 100644
--- a/libyara/compiler.c
+++ b/libyara/compiler.c
@@ -536,7 +536,7 @@ int yr_compiler_get_rules(
yara_rules->code_start = rules_file_header->code_start;
yara_rules->tidx_mask = 0;
- #if WIN32
+ #if _WIN32
yara_rules->mutex = CreateMutex(NULL, FALSE, NULL);
#else
pthread_mutex_init(&yara_rules->mutex, NULL);
diff --git a/libyara/exefiles.c b/libyara/exefiles.c
index 7662659..7f4e9ba 100644
--- a/libyara/exefiles.c
+++ b/libyara/exefiles.c
@@ -16,7 +16,7 @@ limitations under the License.
#include <limits.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#else
#include <yara/pe.h>
diff --git a/libyara/filemap.c b/libyara/filemap.c
index 2cb198e..5b6cbd7 100755
--- a/libyara/filemap.c
+++ b/libyara/filemap.c
@@ -16,7 +16,7 @@ limitations under the License.
#include <fcntl.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#else
#include <sys/stat.h>
@@ -28,7 +28,7 @@ limitations under the License.
#include <yara/error.h>
-#ifdef WIN32
+#ifdef _WIN32
//
// Win32 implementation
diff --git a/libyara/hex_lexer.c b/libyara/hex_lexer.c
index 14e83b1..4954551 100644
--- a/libyara/hex_lexer.c
+++ b/libyara/hex_lexer.c
@@ -488,7 +488,7 @@ limitations under the License.
#include "hex_grammar.h"
-#ifdef WIN32
+#ifdef _WIN32
#define snprintf _snprintf
#endif
@@ -2083,7 +2083,7 @@ void hex_yyfree (void * ptr , yyscan_t yyscanner)
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
extern DWORD recovery_state_key;
#else
@@ -2098,7 +2098,7 @@ void yyfatal(
{
jmp_buf* recovery_state;
- #ifdef WIN32
+ #ifdef _WIN32
recovery_state = TlsGetValue(recovery_state_key) ;
#else
recovery_state = pthread_getspecific(recovery_state_key);
@@ -2142,7 +2142,7 @@ int yr_parse_hex_string(
lex_env.last_error_code = ERROR_SUCCESS;
lex_env.inside_or = 0;
- #ifdef WIN32
+ #ifdef _WIN32
TlsSetValue(recovery_state_key, (LPVOID) &recovery_state);
#else
pthread_setspecific(recovery_state_key, (void*) &recovery_state);
diff --git a/libyara/include/yara/types.h b/libyara/include/yara/types.h
index 0350221..2a8052b 100644
--- a/libyara/include/yara/types.h
+++ b/libyara/include/yara/types.h
@@ -23,7 +23,7 @@ limitations under the License.
#include <yara/limits.h>
#include <yara/hash.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
typedef HANDLE mutex_t;
#else
diff --git a/libyara/include/yara/utils.h b/libyara/include/yara/utils.h
index 07604d0..52a0147 100644
--- a/libyara/include/yara/utils.h
+++ b/libyara/include/yara/utils.h
@@ -45,7 +45,7 @@ limitations under the License.
#define PTR_TO_UINT64(x) ((uint64_t) (size_t) x)
-#ifdef WIN32
+#ifdef _WIN32
#define snprintf _snprintf
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
diff --git a/libyara/lexer.c b/libyara/lexer.c
index 406fcbf..b27732b 100644
--- a/libyara/lexer.c
+++ b/libyara/lexer.c
@@ -670,7 +670,7 @@ limitations under the License.
} \
}
-#ifdef WIN32
+#ifdef _WIN32
#define snprintf _snprintf
#endif
@@ -1288,7 +1288,7 @@ YY_RULE_SETUP
// make included file path relative to current source file
s = strrchr(buffer, '/');
- #ifdef WIN32
+ #ifdef _WIN32
b = strrchr(buffer, '\\'); // in Windows both path delimiters are accepted
#endif
diff --git a/libyara/libyara.c b/libyara/libyara.c
index 8958bf6..f3be9e7 100644
--- a/libyara/libyara.c
+++ b/libyara/libyara.c
@@ -22,12 +22,12 @@ limitations under the License.
#include <yara/re.h>
-#ifdef WIN32
+#ifdef _WIN32
#define snprintf _snprintf
#endif
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
DWORD tidx_key;
DWORD recovery_state_key;
@@ -66,7 +66,7 @@ void yr_initialize(void)
yr_heap_alloc();
- #ifdef WIN32
+ #ifdef _WIN32
tidx_key = TlsAlloc();
recovery_state_key = TlsAlloc();
#else
@@ -102,7 +102,7 @@ void yr_finalize(void)
{
yr_re_finalize_thread();
- #ifdef WIN32
+ #ifdef _WIN32
TlsFree(tidx_key);
TlsFree(recovery_state_key);
#else
@@ -128,7 +128,7 @@ void yr_finalize(void)
void yr_set_tidx(int tidx)
{
- #ifdef WIN32
+ #ifdef _WIN32
TlsSetValue(tidx_key, (LPVOID) (tidx + 1));
#else
pthread_setspecific(tidx_key, (void*) (size_t) (tidx + 1));
@@ -148,7 +148,7 @@ void yr_set_tidx(int tidx)
int yr_get_tidx(void)
{
- #ifdef WIN32
+ #ifdef _WIN32
return (int) TlsGetValue(tidx_key) - 1;
#else
return (int) (size_t) pthread_getspecific(tidx_key) - 1;
diff --git a/libyara/mem.c b/libyara/mem.c
index 8d72109..bf4f4d8 100644
--- a/libyara/mem.c
+++ b/libyara/mem.c
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#include <string.h>
diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 40916ab..45dec1d 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#else
#include <yara/pe.h>
diff --git a/libyara/proc.c b/libyara/proc.c
index 96a4d38..4b16959 100644
--- a/libyara/proc.c
+++ b/libyara/proc.c
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
diff --git a/libyara/re.c b/libyara/re.c
index a51f04a..78614b9 100644
--- a/libyara/re.c
+++ b/libyara/re.c
@@ -30,7 +30,7 @@ order to avoid confusion with operating system threads.
#include <string.h>
#include <limits.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#else
#include <pthread.h>
@@ -86,7 +86,7 @@ typedef struct _RE_THREAD_STORAGE
} RE_THREAD_STORAGE;
-#ifdef WIN32
+#ifdef _WIN32
DWORD thread_storage_key;
#else
pthread_key_t thread_storage_key;
@@ -101,7 +101,7 @@ pthread_key_t thread_storage_key;
int yr_re_initialize(void)
{
- #ifdef WIN32
+ #ifdef _WIN32
thread_storage_key = TlsAlloc();
#else
pthread_key_create(&thread_storage_key, NULL);
@@ -119,7 +119,7 @@ int yr_re_initialize(void)
int yr_re_finalize(void)
{
- #ifdef WIN32
+ #ifdef _WIN32
TlsFree(thread_storage_key);
#else
pthread_key_delete(thread_storage_key);
@@ -141,7 +141,7 @@ int yr_re_finalize_thread(void)
RE_FIBER* next_fiber;
RE_THREAD_STORAGE* storage;
- #ifdef WIN32
+ #ifdef _WIN32
storage = TlsGetValue(thread_storage_key);
#else
storage = pthread_getspecific(thread_storage_key);
@@ -161,7 +161,7 @@ int yr_re_finalize_thread(void)
yr_free(storage);
}
- #ifdef WIN32
+ #ifdef _WIN32
TlsSetValue(thread_storage_key, NULL);
#else
pthread_setspecific(thread_storage_key, NULL);
@@ -1104,7 +1104,7 @@ int yr_re_emit_code(
int _yr_re_alloc_storage(
RE_THREAD_STORAGE** storage)
{
- #ifdef WIN32
+ #ifdef _WIN32
*storage = TlsGetValue(thread_storage_key);
#else
*storage = pthread_getspecific(thread_storage_key);
@@ -1120,7 +1120,7 @@ int _yr_re_alloc_storage(
(*storage)->fiber_pool.head = NULL;
(*storage)->fiber_pool.tail = NULL;
- #ifdef WIN32
+ #ifdef _WIN32
TlsSetValue(thread_storage_key, *storage);
#else
pthread_setspecific(thread_storage_key, *storage);
diff --git a/libyara/re_lexer.c b/libyara/re_lexer.c
index cb60598..32af944 100644
--- a/libyara/re_lexer.c
+++ b/libyara/re_lexer.c
@@ -514,7 +514,7 @@ limitations under the License.
#include <yara/re_lexer.h>
-#ifdef WIN32
+#ifdef _WIN32
#define snprintf _snprintf
#endif
@@ -2443,7 +2443,7 @@ uint8_t read_escaped_char(yyscan_t yyscanner)
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
extern DWORD recovery_state_key;
#else
@@ -2457,7 +2457,7 @@ void yyfatal(
{
jmp_buf* recovery_state;
- #ifdef WIN32
+ #ifdef _WIN32
recovery_state = TlsGetValue(recovery_state_key) ;
#else
recovery_state = pthread_getspecific(recovery_state_key);
@@ -2501,7 +2501,7 @@ int yr_parse_re_string(
lex_env.last_error_code = ERROR_SUCCESS;
- #ifdef WIN32
+ #ifdef _WIN32
TlsSetValue(recovery_state_key, (LPVOID) &recovery_state);
#else
pthread_setspecific(recovery_state_key, (void*) &recovery_state);
diff --git a/libyara/rules.c b/libyara/rules.c
index c47c3c8..c7d4a7e 100644
--- a/libyara/rules.c
+++ b/libyara/rules.c
@@ -41,7 +41,7 @@ limitations under the License.
void _yr_rules_lock(
YR_RULES* rules)
{
- #ifdef WIN32
+ #ifdef _WIN32
WaitForSingleObject(rules->mutex, INFINITE);
#else
pthread_mutex_lock(&rules->mutex);
@@ -52,7 +52,7 @@ void _yr_rules_lock(
void _yr_rules_unlock(
YR_RULES* rules)
{
- #ifdef WIN32
+ #ifdef _WIN32
ReleaseMutex(rules->mutex);
#else
pthread_mutex_unlock(&rules->mutex);
@@ -624,7 +624,7 @@ int yr_rules_load(
new_rules->rules_list_head = header->rules_list_head;
new_rules->tidx_mask = 0;
- #if WIN32
+ #if _WIN32
new_rules->mutex = CreateMutex(NULL, FALSE, NULL);
if (new_rules->mutex == NULL)
@@ -657,7 +657,7 @@ int yr_rules_destroy(
external++;
}
- #if WIN32
+ #if _WIN32
CloseHandle(rules->mutex);
#else
pthread_mutex_destroy(&rules->mutex);
diff --git a/threading.c b/threading.c
index dd8e1d3..d1d84a4 100644
--- a/threading.c
+++ b/threading.c
@@ -16,7 +16,7 @@ limitations under the License.
#include <fcntl.h>
-#ifndef WIN32
+#ifndef _WIN32
#include <errno.h>
#endif
@@ -26,7 +26,7 @@ limitations under the License.
int mutex_init(
MUTEX* mutex)
{
- #ifdef WIN32
+ #ifdef _WIN32
*mutex = CreateMutex(NULL, FALSE, NULL);
if (*mutex == NULL)
return GetLastError();
@@ -40,7 +40,7 @@ int mutex_init(
void mutex_destroy(
MUTEX* mutex)
{
- #ifdef WIN32
+ #ifdef _WIN32
CloseHandle(*mutex);
#else
pthread_mutex_destroy(mutex);
@@ -51,7 +51,7 @@ void mutex_destroy(
void mutex_lock(
MUTEX* mutex)
{
- #ifdef WIN32
+ #ifdef _WIN32
WaitForSingleObject(*mutex, INFINITE);
#else
pthread_mutex_lock(mutex);
@@ -62,7 +62,7 @@ void mutex_lock(
void mutex_unlock(
MUTEX* mutex)
{
- #ifdef WIN32
+ #ifdef _WIN32
ReleaseMutex(*mutex);
#else
pthread_mutex_unlock(mutex);
@@ -74,7 +74,7 @@ int semaphore_init(
SEMAPHORE* semaphore,
int value)
{
- #ifdef WIN32
+ #ifdef _WIN32
*semaphore = CreateSemaphore(NULL, value, 65535, NULL);
if (*semaphore == NULL)
return GetLastError();
@@ -100,7 +100,7 @@ int semaphore_init(
void semaphore_destroy(
SEMAPHORE* semaphore)
{
- #ifdef WIN32
+ #ifdef _WIN32
CloseHandle(*semaphore);
#else
sem_close(*semaphore);
@@ -111,7 +111,7 @@ void semaphore_destroy(
void semaphore_wait(
SEMAPHORE* semaphore)
{
- #ifdef WIN32
+ #ifdef _WIN32
WaitForSingleObject(*semaphore, INFINITE);
#else
sem_wait(*semaphore);
@@ -122,7 +122,7 @@ void semaphore_wait(
void semaphore_release(
SEMAPHORE* semaphore)
{
- #ifdef WIN32
+ #ifdef _WIN32
ReleaseSemaphore(*semaphore, 1, NULL);
#else
sem_post(*semaphore);
@@ -135,7 +135,7 @@ int create_thread(
THREAD_START_ROUTINE start_routine,
void* param)
{
- #ifdef WIN32
+ #ifdef _WIN32
*thread = CreateThread(NULL, 0, start_routine, param, 0, NULL);
if (*thread == NULL)
return GetLastError();
@@ -150,7 +150,7 @@ int create_thread(
void thread_join(
THREAD* thread)
{
- #ifdef WIN32
+ #ifdef _WIN32
WaitForSingleObject(*thread, INFINITE);
#else
pthread_join(*thread, NULL);
diff --git a/threading.h b/threading.h
index a2f5041..f599e4f 100644
--- a/threading.h
+++ b/threading.h
@@ -18,7 +18,7 @@ limitations under the License.
#ifndef YR_THREADING_H
#define YR_THREADING_H
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#else
#include <sys/stat.h>
@@ -26,7 +26,7 @@ limitations under the License.
#include <semaphore.h>
#endif
-#ifdef WIN32
+#ifdef _WIN32
typedef HANDLE SEMAPHORE;
typedef HANDLE MUTEX;
diff --git a/windows/libyara/libyara.vcxproj b/windows/libyara/libyara.vcxproj
index d3c7ea6..d3a59e1 100644
--- a/windows/libyara/libyara.vcxproj
+++ b/windows/libyara/libyara.vcxproj
@@ -73,7 +73,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;CUCKOO</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;CUCKOO</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\libyara;..\..\libyara\include;..\..\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<DisableSpecificWarnings>4005;4273;4090;</DisableSpecificWarnings>
@@ -90,7 +90,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <PreprocessorDefinitions>WIN32;CUCKOO</PreprocessorDefinitions>
+ <PreprocessorDefinitions>CUCKOO</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\libyara;..\..\libyara\include;..\..\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4005;4273;4090;</DisableSpecificWarnings>
</ClCompile>
@@ -105,7 +105,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;CUCKOO</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;CUCKOO</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\libyara;..\..\libyara\include;..\..\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<DisableSpecificWarnings>4005;4273;4090;%(DisableSpecificWarnings)</DisableSpecificWarnings>
@@ -118,7 +118,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <PreprocessorDefinitions>WIN32;CUCKOO</PreprocessorDefinitions>
+ <PreprocessorDefinitions>CUCKOO</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\libyara;..\..\libyara\include;..\..\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4005;4273;4090;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
diff --git a/windows/yara/yara.vcxproj b/windows/yara/yara.vcxproj
index e82fbd4..b22db5c 100644
--- a/windows/yara/yara.vcxproj
+++ b/windows/yara/yara.vcxproj
@@ -97,7 +97,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WholeProgramOptimization>false</WholeProgramOptimization>
@@ -115,7 +115,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
@@ -133,7 +133,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
</ClCompile>
@@ -157,7 +157,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
diff --git a/windows/yarac/yarac.vcxproj b/windows/yarac/yarac.vcxproj
index 85f5bb1..fbcfca5 100644
--- a/windows/yarac/yarac.vcxproj
+++ b/windows/yarac/yarac.vcxproj
@@ -72,7 +72,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
@@ -90,7 +90,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
@@ -105,7 +105,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>libyara64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -115,7 +115,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\libyara\include;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>libyara64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
diff --git a/yara-python/setupwin32.py b/yara-python/setupwin32.py
index 0c47ad1..5b7be3e 100644
--- a/yara-python/setupwin32.py
+++ b/yara-python/setupwin32.py
@@ -24,7 +24,6 @@ setup(name='yara-python',
name='yara',
sources=['yara-python.c'],
include_dirs=['../windows/include', '../libyara/include'],
- define_macros=[('WIN32', None)],
extra_objects=[
'../windows/libyara/Release/libyara32.lib']
)])
diff --git a/yara-python/setupwin64.py b/yara-python/setupwin64.py
index 7a6961b..9152fd5 100644
--- a/yara-python/setupwin64.py
+++ b/yara-python/setupwin64.py
@@ -24,7 +24,6 @@ setup(name='yara-python',
name='yara',
sources=['yara-python.c'],
include_dirs=['../windows/include', '../libyara/include'],
- define_macros=[('WIN32', None)],
extra_objects=[
'../windows/libyara/Release/libyara64.lib']
)])
diff --git a/yara.c b/yara.c
index 3c8f23a..9160be4 100644
--- a/yara.c
+++ b/yara.c
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#ifndef WIN32
+#ifndef _WIN32
#include <sys/stat.h>
#include <dirent.h>
@@ -244,7 +244,7 @@ char* file_queue_get()
}
-#ifdef WIN32
+#ifdef _WIN32
int is_directory(
const char* path)
@@ -610,7 +610,7 @@ int callback(int message, void* message_data, void* user_data)
return CALLBACK_ERROR;
}
-#ifdef WIN32
+#ifdef _WIN32
DWORD WINAPI scanning_thread(LPVOID param)
#else
void* scanning_thread(void* param)
diff --git a/yarac.c b/yarac.c
index 5458c79..157e42a 100644
--- a/yarac.c
+++ b/yarac.c
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#ifndef WIN32
+#ifndef _WIN32
#include <sys/stat.h>
#include <dirent.h>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list