Skip to content

Commit 2a29ed5

Browse files
committed
msvc does not support the #warning directive, so apply another ugly fix
git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45880 379a1393-f5fb-40a0-bcee-ef074d9b53f7
1 parent 5b6e9a5 commit 2a29ed5

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

vice/src/6510core.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@
4747

4848
#ifndef CPU_LOG_ID
4949
#define CPU_LOG_ID LOG_DEFAULT
50+
#ifdef _MSC_VER
51+
#pragma message ("Warning: CPU_LOG_ID not defined, using LOG_DEFAULT by default")
52+
#else
5053
#warning "CPU_LOG_ID not defined, using LOG_DEFAULT by default"
5154
#endif
55+
#endif
5256

5357
#include "traps.h"
5458

@@ -845,8 +849,12 @@ FIXME: perhaps we really have to add some randomness to (some) bits
845849

846850
#ifndef ANE_LOG_LEVEL
847851
#define ANE_LOG_LEVEL 0
852+
#ifdef _MSC_VER
853+
#pragma message ("Warning: ANE_LOG_LEVEL not defined, disabling by default")
854+
#else
848855
#warning "ANE_LOG_LEVEL not defined, disabling by default"
849856
#endif
857+
#endif
850858

851859
#if 1
852860
#define ANE_LOGGING(rdy) \
@@ -1383,8 +1391,12 @@ FIXME: perhaps we really have to add some randomness to (some) bits
13831391

13841392
#ifndef LXA_LOG_LEVEL
13851393
#define LXA_LOG_LEVEL 0
1394+
#ifdef _MSC_VER
1395+
#pragma message ("Warning: LXA_LOG_LEVEL not defined, disabling by default")
1396+
#else
13861397
#warning "LXA_LOG_LEVEL not defined, disabling by default"
13871398
#endif
1399+
#endif
13881400

13891401
#if 1
13901402
#define LXA_LOGGING(rdy) \
@@ -2272,7 +2284,11 @@ static const uint8_t rewind_fetch_tab[] = {
22722284
#ifndef CPU_IS_JAMMED
22732285
static int cpu_is_jammed = 0;
22742286
#define CPU_IS_JAMMED cpu_is_jammed
2287+
#ifdef _MSC_VER
2288+
#pragma message ("Warning: CPU_IS_JAMMED not defined, using default (internal)")
2289+
#else
22752290
#warning "CPU_IS_JAMMED not defined, using default (internal)"
2291+
#endif
22762292
#endif
22772293
unsigned int tmpa; /* needed for some of the opcode macros */
22782294
#if !defined(DRIVE_CPU)

vice/src/6510dtvcore.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@
4545

4646
#ifndef CPU_LOG_ID
4747
#define CPU_LOG_ID LOG_DEFAULT
48+
#ifdef _MSC_VER
49+
#pragma message ("Warning: CPU_LOG_ID not defined, using LOG_DEFAULT by default")
50+
#else
4851
#warning "CPU_LOG_ID not defined, using LOG_DEFAULT by default"
4952
#endif
53+
#endif
5054

5155
#include "traps.h"
5256

@@ -823,8 +827,12 @@ FIXME: perhaps we really have to add some randomness to (some) bits
823827

824828
#ifndef ANE_LOG_LEVEL
825829
#define ANE_LOG_LEVEL 0
830+
#ifdef _MSC_VER
831+
#pragma message ("Warning: ANE_LOG_LEVEL not defined, disabling by default")
832+
#else
826833
#warning "ANE_LOG_LEVEL not defined, disabling by default"
827834
#endif
835+
#endif
828836

829837
#if 1
830838
/* static int ane_log_level = 1; */ /* 0: none, 1: unstable only 2: all */
@@ -1274,8 +1282,12 @@ FIXME: perhaps we really have to add some randomness to (some) bits
12741282

12751283
#ifndef LXA_LOG_LEVEL
12761284
#define LXA_LOG_LEVEL 0
1285+
#ifdef _MSC_VER
1286+
#pragma message ("Warning: LXA_LOG_LEVEL not defined, disabling by default")
1287+
#else
12771288
#warning "LXA_LOG_LEVEL not defined, disabling by default"
12781289
#endif
1290+
#endif
12791291

12801292
#if 1
12811293
/* static int lxa_log_level = 1; */ /* 0: none, 1: unstable only 2: all */
@@ -1703,8 +1715,12 @@ static const uint8_t fetch_tab[] = {
17031715
#ifndef CPU_IS_JAMMED
17041716
static int cpu_is_jammed = 0;
17051717
#define CPU_IS_JAMMED cpu_is_jammed
1718+
#ifdef _MSC_VER
1719+
#pragma message ("Warning: CPU_IS_JAMMED not defined, using default (internal)")
1720+
#else
17061721
#warning "CPU_IS_JAMMED not defined, using default (internal)"
17071722
#endif
1723+
#endif
17081724

17091725
#if !defined(DRIVE_CPU)
17101726
CLOCK profiling_clock_start;

0 commit comments

Comments
 (0)