libxine: update to version 1.1.19
[openembedded.git] / recipes / kobodeluxe / files / kobodeluxe-putenv.patch
blob05f7c72f81a7015d7e5b4852e205e0fced4fb585
1 Index: KoboDeluxe-0.5.1/configure.in
2 ===================================================================
3 --- KoboDeluxe-0.5.1.orig/configure.in 2008-02-10 12:27:11.000000000 +0100
4 +++ KoboDeluxe-0.5.1/configure.in 2008-02-10 15:50:11.000000000 +0100
5 @@ -159,7 +159,6 @@
7 LIBS="$LIBS -lSDL_image"
10 dnl-------------------------------------------------------
11 dnl Checks for OpenGL
12 dnl-------------------------------------------------------
13 @@ -214,13 +213,18 @@
14 dnl-------------------------------------------------------
15 dnl Checks for library functions.
16 dnl-------------------------------------------------------
17 +dnl SDL_putenv may not be available in all SDL ports
18 +AC_CHECK_DECLS(SDL_putenv,,,[#include <SDL.h>])
20 AC_CHECK_FUNCS(strdup strstr strchr strrchr)
21 AC_CHECK_FUNCS(snprintf _snprintf vsnprintf _vsnprintf)
22 AC_CHECK_FUNCS(pow sqrt)
23 AC_CHECK_FUNCS(munmap mkdir select stat)
24 AC_CHECK_FUNCS(atexit floor memmove memset memcmp)
25 -AC_CHECK_FUNCS(gettimeofday)
26 +AC_CHECK_FUNCS(gettimeofday putenv)
27 AC_CHECK_FUNCS(getegid setgid)
30 AC_FUNC_MEMCMP
31 AC_FUNC_STRTOD
32 AC_FUNC_VPRINTF
33 Index: KoboDeluxe-0.5.1/graphics/gfxengine.cpp
34 ===================================================================
35 --- KoboDeluxe-0.5.1.orig/graphics/gfxengine.cpp 2008-02-10 12:41:31.000000000 +0100
36 +++ KoboDeluxe-0.5.1/graphics/gfxengine.cpp 2008-02-10 15:58:06.000000000 +0100
37 @@ -21,10 +21,15 @@
39 #define DBG(x) x
41 +#include <aconfig.h>
43 #include "logger.h"
45 #include <string.h>
46 #include <math.h>
47 +#if not (HAVE_DECL_SDL_PUTENV) and defined (HAVE_PUTENV)
48 +#include <stdlib.h>
49 +#endif
51 #include "gfxengine.h"
52 #include "filters.h"
53 @@ -764,8 +769,14 @@
54 if(is_showing)
55 return 0;
57 - if(_centered && !_fullscreen)
58 - SDL_putenv((char *)"SDL_VIDEO_CENTERED=1");
59 + if(_centered && !_fullscreen)
60 +#if HAVE_DECL_SDL_PUTENV
61 + SDL_putenv("SDL_VIDEO_CENTERED=1");
62 +#elif defined(HAVE_PUTENV)
63 + putenv("SDL_VIDEO_CENTERED=1");
64 +#else
65 + #error Neither SDL_putenv() nor putenv() are available. Fix it!
66 +#endif
68 log_printf(DLOG, "Opening screen...\n");
69 if(!SDL_WasInit(SDL_INIT_VIDEO))