'gtk2_ardour' - Harmonize '__WIN32__', 'OS_WIN32' etc, etc. Use 'PLATFORM_WINDOWS' instead

This commit is contained in:
John Emmas 2013-10-14 17:00:28 +01:00
parent fa71d82dda
commit 5568026387
10 changed files with 17 additions and 17 deletions

View file

@ -402,7 +402,7 @@ Editor::timefx_thread (void *arg)
by the GUI ... by the GUI ...
*/ */
#ifdef WIN32 #ifdef PLATFORM_WINDOWS
Sleep(2000); Sleep(2000);
#else #else
struct timespec t = { 2, 0 }; struct timespec t = { 2, 0 };

View file

@ -688,7 +688,7 @@ ExportVideoDialog::encode_pass (int pass)
ffs["-an"] = "-y"; ffs["-an"] = "-y";
ffs["-passlogfile"] = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass"; ffs["-passlogfile"] = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
ffs["-f"] = get_file_extension(invid).empty()?"mov":get_file_extension(invid); ffs["-f"] = get_file_extension(invid).empty()?"mov":get_file_extension(invid);
#ifdef _OS_WIN32 #ifdef PLATFORM_WINDOWS
outfn = "NUL"; outfn = "NUL";
#else #else
outfn = "/dev/null"; outfn = "/dev/null";

View file

@ -506,7 +506,7 @@ int main (int argc, char *argv[])
return curvetest (curvetest_file); return curvetest (curvetest_file);
} }
#ifndef WIN32 #ifndef PLATFORM_WINDOWS
if (::signal (SIGPIPE, sigpipe_handler)) { if (::signal (SIGPIPE, sigpipe_handler)) {
cerr << _("Cannot xinstall SIGPIPE error handler") << endl; cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
} }

View file

@ -23,7 +23,7 @@
#include <fstream> #include <fstream>
#include <cstring> #include <cstring>
#ifndef WIN32 #ifndef PLATFORM_WINDOWS
#include <sys/utsname.h> #include <sys/utsname.h>
#endif #endif
@ -73,7 +73,7 @@ struct ping_call {
static void* static void*
_pingback (void *arg) _pingback (void *arg)
{ {
#ifndef WIN32 #ifndef PLATFORM_WINDOWS
ping_call* cm = static_cast<ping_call*> (arg); ping_call* cm = static_cast<ping_call*> (arg);
CURL* c; CURL* c;
struct utsname utb; struct utsname utb;
@ -162,7 +162,7 @@ _pingback (void *arg)
curl_easy_cleanup (c); curl_easy_cleanup (c);
delete cm; delete cm;
#endif /* WIN32 */ #endif /* PLATFORM_WINDOWS */
return 0; return 0;
} }

View file

@ -91,7 +91,7 @@ void Mootcher::ensureWorkingDir ()
} }
} }
basePath = p; basePath = p;
#ifdef __WIN32__ #ifdef PLATFORM_WINDOWS
std::string replace = "/"; std::string replace = "/";
size_t pos = basePath.find("\\"); size_t pos = basePath.find("\\");
while( pos != std::string::npos ){ while( pos != std::string::npos ){

View file

@ -1459,7 +1459,7 @@ SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
bool bool
SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths) SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths)
{ {
#ifdef WIN32 #ifdef PLATFORM_WINDOWS
return false; return false;
#else #else
std::string tmpdir(Glib::build_filename (s->session_directory().sound_path(), "linktest")); std::string tmpdir(Glib::build_filename (s->session_directory().sound_path(), "linktest"));

View file

@ -27,7 +27,7 @@
#include <assert.h> #include <assert.h>
#include <dirent.h> #include <dirent.h>
#ifdef __WIN32__ #ifdef PLATFORM_WINDOWS
#include <windows.h> #include <windows.h>
#else #else
#include <fcntl.h> #include <fcntl.h>
@ -47,7 +47,7 @@ void * interposer_thread (void *arg);
static void close_fd (int& fd) { if (fd >= 0) ::close (fd); fd = -1; } static void close_fd (int& fd) { if (fd >= 0) ::close (fd); fd = -1; }
#ifndef __WIN32__ #ifndef PLATFORM_WINDOWS
/* /*
* This function was part of libasyncns. * This function was part of libasyncns.
* LGPL v2.1 * LGPL v2.1
@ -155,7 +155,7 @@ SystemExec::SystemExec (std::string c, std::string a)
nicelevel = 0; nicelevel = 0;
envp = NULL; envp = NULL;
argp = NULL; argp = NULL;
#ifdef __WIN32__ #ifdef PLATFORM_WINDOWS
stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE; stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE;
stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE; stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE;
stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE; stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE;
@ -173,7 +173,7 @@ SystemExec::SystemExec (std::string c, char **a)
pin[1] = -1; pin[1] = -1;
nicelevel = 0; nicelevel = 0;
envp = NULL; envp = NULL;
#ifdef __WIN32__ #ifdef PLATFORM_WINDOWS
stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE; stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE;
stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE; stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE;
stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE; stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE;
@ -197,7 +197,7 @@ SystemExec::~SystemExec ()
} }
free (argp); free (argp);
} }
#ifdef __WIN32__ #ifdef PLATFORM_WINDOWS
if (w_args) free(w_args); if (w_args) free(w_args);
#endif #endif
pthread_mutex_destroy(&write_lock); pthread_mutex_destroy(&write_lock);
@ -211,7 +211,7 @@ interposer_thread (void *arg) {
return 0; return 0;
} }
#ifdef __WIN32__ /* Windows Process */ #ifdef PLATFORM_WINDOWS /* Windows Process */
/* HELPER FUNCTIONS */ /* HELPER FUNCTIONS */

View file

@ -177,7 +177,7 @@ class SystemExec
char **envp; char **envp;
private: private:
#ifdef __WIN32__ #ifdef PLATFORM_WINDOWS
PROCESS_INFORMATION *pid; PROCESS_INFORMATION *pid;
HANDLE stdinP[2]; HANDLE stdinP[2];
HANDLE stdoutP[2]; HANDLE stdoutP[2];

View file

@ -505,7 +505,7 @@ TranscodeFfmpeg::cancel ()
{ {
if (!ffcmd || !ffcmd->is_running()) { return;} if (!ffcmd || !ffcmd->is_running()) { return;}
ffcmd->write_to_stdin("q"); ffcmd->write_to_stdin("q");
#ifdef WIN32 #ifdef PLATFORM_WINDOWS
Sleep(1000); Sleep(1000);
#else #else
sleep (1); sleep (1);

View file

@ -741,7 +741,7 @@ set_pango_fontsize ()
/* FT2 rendering - used by GnomeCanvas, sigh */ /* FT2 rendering - used by GnomeCanvas, sigh */
#ifndef WIN32 #ifndef PLATFORM_WINDOWS
pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_new(), val/1024, val/1024); pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_new(), val/1024, val/1024);
#endif #endif