From 13865a0ade0e39c0c5ed186ac92b353d463fbd45 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 16 Feb 2010 12:56:24 +0000 Subject: [PATCH] Fix build on gp2x. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1351 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- brush.c | 1 + brush_ops.c | 4 ++++ graph.c | 3 +++ io.c | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/brush.c b/brush.c index 503ee6b4..389fe9ba 100644 --- a/brush.c +++ b/brush.c @@ -36,6 +36,7 @@ #include "sdlscreen.h" #include "brush.h" + // Calcul de redimensionnement du pinceau pour éviter les débordements de // l'écran et de l'image void Compute_clipped_dimensions(short * x,short * y,short * width,short * height) diff --git a/brush_ops.c b/brush_ops.c index ed546ea0..12646213 100644 --- a/brush_ops.c +++ b/brush_ops.c @@ -37,6 +37,10 @@ #include "sdlscreen.h" #include "windows.h" +#if defined(__VBCC__)||defined(__GP2X__) + #define M_PI 3.141592653589793238462643 +#endif + /// Simulates clicking the "Draw" button. void Return_to_draw_mode(void) diff --git a/graph.c b/graph.c index efc0e96b..06c78114 100644 --- a/graph.c +++ b/graph.c @@ -51,6 +51,9 @@ #ifdef __VBCC__ #define __attribute__(x) +#endif + +#if defined(__VBCC__)||defined(__GP2X__) #define M_PI 3.141592653589793238462643 #endif diff --git a/io.c b/io.c index 8d3cbf1e..a6d84865 100644 --- a/io.c +++ b/io.c @@ -316,7 +316,7 @@ byte Create_lock_file(const char *file_directory) { return -1; } - #else + #elseif !defined(__GP2X__) // gp2x does not defines F_TLOCK and is not really multitasking anyway // Unixy method for lock file Lock_file_handle = open(lock_filename,O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR); if (Lock_file_handle == -1)