This now allows tuxpaint to build on a gcc4 Haiku.
This commit is contained in:
parent
653bdb0e88
commit
a9f9122cbf
2 changed files with 15 additions and 8 deletions
4
Makefile
4
Makefile
|
|
@ -49,7 +49,7 @@ comptest = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(1) $(2) -o dummy.o dummy.c $
|
||||||
echo "$(1)"; \
|
echo "$(1)"; \
|
||||||
fi ;)
|
fi ;)
|
||||||
|
|
||||||
beos_RSRC_CMD:=rc src/tuxpaint.rdef && xres -o tuxpaint src/tuxpaint.rsrc
|
beos_RSRC_CMD:=rc haiku/tuxpaint.rdef && xres -o tuxpaint haiku/tuxpaint.rsrc
|
||||||
RSRC_CMD:=$($(OS)_RSRC_CMD)
|
RSRC_CMD:=$($(OS)_RSRC_CMD)
|
||||||
|
|
||||||
beos_MIMESET_CMD:=mimeset -f tuxpaint
|
beos_MIMESET_CMD:=mimeset -f tuxpaint
|
||||||
|
|
@ -82,7 +82,7 @@ FRIBIDI_CFLAGS:=$(shell $(PKG_CONFIG) --cflags fribidi)
|
||||||
|
|
||||||
windows_ARCH_LINKS:=-lintl $(PNG) -lz -lwinspool -lshlwapi $(FRIBIDI_LIB)
|
windows_ARCH_LINKS:=-lintl $(PNG) -lz -lwinspool -lshlwapi $(FRIBIDI_LIB)
|
||||||
osx_ARCH_LINKS:=$(PAPER_LIB) $(FRIBIDI_LIB)
|
osx_ARCH_LINKS:=$(PAPER_LIB) $(FRIBIDI_LIB)
|
||||||
beos_ARCH_LINKS:="-lintl $(PNG) -lz -lbe -lnetwork -liconv $(FRIBIDI_LIB)"
|
beos_ARCH_LINKS:="-lintl $(PNG) -lz -lbe -lnetwork -liconv $(FRIBIDI_LIB) $(PAPER_LIB) -lstdc++"
|
||||||
linux_ARCH_LINKS:=$(PAPER_LIB) $(FRIBIDI_LIB)
|
linux_ARCH_LINKS:=$(PAPER_LIB) $(FRIBIDI_LIB)
|
||||||
ARCH_LINKS:=$($(OS)_ARCH_LINKS)
|
ARCH_LINKS:=$($(OS)_ARCH_LINKS)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,11 @@ extern WrapperData macosx;
|
||||||
)
|
)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* #define fmemopen_alternative */ /* Uncomment this to test the fmemopen alternative in systems were fmemopen exists */
|
//#define fmemopen_alternative */ /* Uncomment this to test the fmemopen alternative in systems were fmemopen exists */
|
||||||
|
|
||||||
|
#ifdef (__HAIKU__) // Haiku needs it, at least for now
|
||||||
|
#define fmemopen_alternative
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef fmemopen_alternative
|
#ifdef fmemopen_alternative
|
||||||
#undef fmemopen
|
#undef fmemopen
|
||||||
|
|
@ -9239,7 +9243,7 @@ static void reset_avail_tools(void)
|
||||||
disallow_print = 1;
|
disallow_print = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __BEOS__ || __HAIKU__
|
#if defined __BEOS__
|
||||||
if (!IsPrinterAvailable())
|
if (!IsPrinterAvailable())
|
||||||
disallow_print = disable_print = 1;
|
disallow_print = disable_print = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -12160,6 +12164,9 @@ static void set_chunk_data(unsigned char **chunk_data, size_t * chunk_data_len,
|
||||||
free(headers);
|
free(headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
#define open_memstream fdopen // Haiku doesn't use open_memstream
|
||||||
|
#endif
|
||||||
|
|
||||||
static void do_png_embed_data(png_structp png_ptr)
|
static void do_png_embed_data(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
|
|
@ -15172,7 +15179,7 @@ void do_print(void)
|
||||||
SDL_BlitSurface(canvas, NULL, save_canvas, NULL);
|
SDL_BlitSurface(canvas, NULL, save_canvas, NULL);
|
||||||
SDL_BlitSurface(label, NULL, save_canvas, NULL);
|
SDL_BlitSurface(label, NULL, save_canvas, NULL);
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(__BEOS__) && !defined(__APPLE__)
|
#if !defined(WIN32) && !defined(__BEOS__) && !defined(__APPLE__) && !defined(__HAIKU__)
|
||||||
const char *pcmd;
|
const char *pcmd;
|
||||||
FILE *pi;
|
FILE *pi;
|
||||||
|
|
||||||
|
|
@ -15224,8 +15231,8 @@ void do_print(void)
|
||||||
if (error)
|
if (error)
|
||||||
fprintf(stderr, "%s\n", error);
|
fprintf(stderr, "%s\n", error);
|
||||||
}
|
}
|
||||||
#elif defined(__BEOS__) || defined(__HAIKU__)
|
#elif defined(__BEOS__)
|
||||||
/* BeOS and Haiku*/
|
/* BeOS */
|
||||||
|
|
||||||
SurfacePrint(save_canvas);
|
SurfacePrint(save_canvas);
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
|
@ -20134,7 +20141,7 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(__APPLE__) && !defined(__BEOS__)
|
#if !defined(WIN32) && !defined(__APPLE__) && !defined(__BEOS__) && !defined(__HAIKU__)
|
||||||
static void show_available_papersizes(int exitcode)
|
static void show_available_papersizes(int exitcode)
|
||||||
{
|
{
|
||||||
FILE *fi = exitcode ? stderr : stdout;
|
FILE *fi = exitcode ? stderr : stdout;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue