common:freebsd: Fix compilation

This commit is contained in:
Jonathan Li 2016-05-01 10:26:18 +01:00
parent 280ca1dd85
commit 7aa6564dcc
3 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@
#define EXPORT_C_(type) extern "C" type CALLBACK #define EXPORT_C_(type) extern "C" type CALLBACK
#elif defined(__linux__) #elif defined(__unix__)
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <cstring> #include <cstring>
@ -193,7 +193,7 @@ struct PluginConf
} }
}; };
#if defined(__linux__) #if defined(__unix__)
static void SysMessage(const char *fmt, ...) static void SysMessage(const char *fmt, ...)
{ {

View File

@ -234,7 +234,7 @@ public:
extern IConsoleWriter Console; extern IConsoleWriter Console;
#ifdef __linux__ #if defined(__unix__)
extern void Console_SetStdout(FILE *fp); extern void Console_SetStdout(FILE *fp);
#endif #endif
extern void Console_SetActiveHandler( const IConsoleWriter& writer, FILE* flushfp=NULL ); extern void Console_SetActiveHandler( const IConsoleWriter& writer, FILE* flushfp=NULL );

View File

@ -113,7 +113,7 @@ const IConsoleWriter ConsoleWriter_Null =
// Console_Stdout // Console_Stdout
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------
#ifdef __linux__ #if defined(__unix__)
static __fi const char* GetLinuxConsoleColor(ConsoleColors color) static __fi const char* GetLinuxConsoleColor(ConsoleColors color)
{ {
switch(color) switch(color)
@ -174,7 +174,7 @@ static void __concall ConsoleStdout_Newline()
static void __concall ConsoleStdout_DoSetColor( ConsoleColors color ) static void __concall ConsoleStdout_DoSetColor( ConsoleColors color )
{ {
#ifdef __linux__ #if defined(__unix__)
fprintf(stdout_fp, "\033[0m%s", GetLinuxConsoleColor(color)); fprintf(stdout_fp, "\033[0m%s", GetLinuxConsoleColor(color));
fflush(stdout_fp); fflush(stdout_fp);
#endif #endif
@ -182,7 +182,7 @@ static void __concall ConsoleStdout_DoSetColor( ConsoleColors color )
static void __concall ConsoleStdout_SetTitle( const wxString& title ) static void __concall ConsoleStdout_SetTitle( const wxString& title )
{ {
#ifdef __linux__ #if defined(__unix__)
fputs("\033]0;", stdout_fp); fputs("\033]0;", stdout_fp);
fputs(title.utf8_str(), stdout_fp); fputs(title.utf8_str(), stdout_fp);
fputs("\007", stdout_fp); fputs("\007", stdout_fp);