Collections of changes to facilitate compilation on Linux and macOS. (PR #992)

This commit is contained in:
Andrea 2021-10-18 20:23:46 +01:00 committed by GitHub
parent 9553106f4e
commit f2843d4d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 19 additions and 7 deletions

View File

@ -1,6 +1,6 @@
#pragma once
#include "RgbMonitor.h"
#include "RGBMonitor.h"
#include "Harddisk.h"
#include "Disk.h"
#include "Common.h"

View File

@ -814,7 +814,7 @@ Update_t CmdProfile (int nArgs)
if (ProfileSave())
{
TCHAR sText[ CONSOLE_WIDTH ];
ConsoleBufferPushFormat ( sText, " Saved: %s", g_FileNameProfile );
ConsoleBufferPushFormat ( sText, " Saved: %s", g_FileNameProfile.c_str() );
}
else
ConsoleBufferPush( TEXT(" ERROR: Couldn't save file. (In use?)" ) );

View File

@ -1066,11 +1066,11 @@ Update_t CmdHelpSpecific (int nArgs)
// Config - Load / Save
case CMD_CONFIG_LOAD:
ConsoleColorizePrint( sText, " Usage: [\"filename\"]" );
ConsoleBufferPushFormat( sText, " Load debugger configuration from '%s', or the specificed file.", g_sFileNameConfig );
ConsoleBufferPushFormat( sText, " Load debugger configuration from '%s', or the specificed file.", g_sFileNameConfig.c_str() );
break;
case CMD_CONFIG_SAVE:
ConsoleColorizePrint( sText, " Usage: [\"filename\"]" );
ConsoleBufferPushFormat( sText, " Save debugger configuration to '%s', or the specificed file.", g_sFileNameConfig );
ConsoleBufferPushFormat( sText, " Save debugger configuration to '%s', or the specificed file.", g_sFileNameConfig.c_str() );
break;
// Config - Color
case CMD_CONFIG_COLOR:

View File

@ -12,5 +12,11 @@ extern FILE* g_fh; // Filehandle for log file
void LogInit(void);
void LogDone(void);
#ifdef _MSC_VER
void LogOutput(LPCTSTR format, ...);
void LogFileOutput(LPCTSTR format, ...);
#else
void LogOutput(LPCTSTR format, ...) __attribute__ ((format (printf, 1, 2)));
void LogFileOutput(LPCTSTR format, ...) __attribute__ ((format (printf, 1, 2)));
#endif

View File

@ -54,7 +54,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "SerialComms.h"
#include "Speaker.h"
#include "Tape.h"
#include "tfe/tfe.h"
#include "Tfe/tfe.h"
#include "RGBMonitor.h"
#include "z80emu.h"

View File

@ -1041,7 +1041,7 @@ static void MB_Update(void)
static bool MB_DSInit()
{
LogFileOutput("MB_DSInit\n", g_bMBAvailable);
LogFileOutput("MB_DSInit\n");
#ifdef NO_DIRECT_X
return false;

View File

@ -1,4 +1,5 @@
#pragma once
#include "Card.h"
#define REGLOAD(a, b) RegLoadValue(TEXT(REG_CONFIG), (a), TRUE, (b))
#define REGLOAD_DEFAULT(a, b, c) RegLoadValue(TEXT(REG_CONFIG), (a), TRUE, (b), (c))

View File

@ -1516,7 +1516,7 @@ bool tfe_LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT vers
throw std::string("Card: wrong version");
tfe_enabled = yamlLoadHelper.LoadBool(SS_YAML_KEY_ENABLED) ? true : false;
set_tfe_interface(yamlLoadHelper.LoadStringA(SS_YAML_KEY_NETWORK_INTERFACE));
set_tfe_interface(yamlLoadHelper.LoadString(SS_YAML_KEY_NETWORK_INTERFACE));
tfe_started_tx = yamlLoadHelper.LoadBool(SS_YAML_KEY_STARTED_TX) ? true : false;
tfe_cannot_use = yamlLoadHelper.LoadBool(SS_YAML_KEY_CANNOT_USE) ? true : false;

View File

@ -27,7 +27,12 @@
/* #define WPCAP */
#ifdef _MSC_VER
#include "pcap.h"
#else
// on Linux and Mac OS X, we use system's pcap.h, which needs to be included as <>
#include <pcap.h>
#endif
#include <assert.h>
#include <stdio.h>