From 7d6aa220c65d5370387d700709ceaa4eb410c165 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 12 Dec 2007 10:00:32 +0000 Subject: [PATCH] fix for compile-time problems --- config.h.in | 3 +++ configure | 5 +++-- configure.in | 2 +- lib/Makefile.in | 6 ++++-- lib/bitio.c | 2 +- lib/devices/artsutils.h | 8 ++++++++ lib/devices/file.c | 4 ++-- lib/devices/text.c | 4 ++-- src/Makefile.in | 2 +- 9 files changed, 25 insertions(+), 11 deletions(-) diff --git a/config.h.in b/config.h.in index f1b5ab1..b468b28 100644 --- a/config.h.in +++ b/config.h.in @@ -83,6 +83,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_IO_H + /* Define if you have the header file. */ #undef HAVE_SYS_BSDTYPES_H diff --git a/configure b/configure index b2bb9c2..8867e78 100755 --- a/configure +++ b/configure @@ -1774,7 +1774,7 @@ fi PACKAGE=swftools -VERSION=2007-12-09-2003 +VERSION=2007-04-28-2027 # ------------------------------------------------------------------ @@ -5234,7 +5234,8 @@ done -for ac_header in zlib.h gif_lib.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h + +for ac_header in zlib.h gif_lib.h io.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then diff --git a/configure.in b/configure.in index b1d1ba1..e3896c9 100644 --- a/configure.in +++ b/configure.in @@ -229,7 +229,7 @@ dnl Checks for header files. AC_CONFIG_HEADER(config.h) AC_HEADER_DIRENT AC_HEADER_STDC - AC_CHECK_HEADERS(zlib.h gif_lib.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h) + AC_CHECK_HEADERS(zlib.h gif_lib.h io.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h) AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") diff --git a/lib/Makefile.in b/lib/Makefile.in index 451ead3..109efd9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -3,7 +3,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ include ../Makefile.common -DEVICES = devices/swf.$(O) devices/arts.$(O) #devices/lrf.$(O) devices/opengl.$(O) +DEVICES = devices/swf.$(O) devices/arts.$(O) devices/artsutils.$(O) #devices/lrf.$(O) devices/opengl.$(O) all: librfxswf$(A) libpdf$(A) art/libart$(A) libbase$(A) libgfx$(A) $(DEVICES) @@ -73,8 +73,10 @@ devices/render.$(O): devices/render.c devices/render.h $(C) devices/render.c -o devices/render.$(O) devices/opengl.$(O): devices/opengl.c devices/opengl.h $(C) devices/opengl.c -o devices/opengl.$(O) -devices/arts.$(O): devices/arts.c devices/arts.h devices/artsutils.c +devices/arts.$(O): devices/arts.c devices/arts.h devices/artsutils.h $(C) devices/arts.c -o devices/arts.$(O) +devices/artsutils.$(O): devices/artsutils.c devices/artsutils.h + $(C) devices/artsutils.c -o devices/artsutils.$(O) devices/record.$(O): devices/record.c devices/record.h $(C) devices/record.c -o devices/record.$(O) devices/text.$(O): devices/text.c devices/text.h diff --git a/lib/bitio.c b/lib/bitio.c index 90c3fe6..0ea2967 100644 --- a/lib/bitio.c +++ b/lib/bitio.c @@ -149,7 +149,7 @@ static void writer_memwrite_finish(writer_t*w) void writer_init_memwriter(writer_t*w, void*data, int len) { struct memwrite_t *mr; - mr = (memwrite_t *)malloc(sizeof(struct memwrite_t)); + mr = (struct memwrite_t*)malloc(sizeof(struct memwrite_t)); mr->data = (unsigned char *)data; mr->length = len; memset(w, 0, sizeof(writer_t)); diff --git a/lib/devices/artsutils.h b/lib/devices/artsutils.h index 0375b82..640527f 100644 --- a/lib/devices/artsutils.h +++ b/lib/devices/artsutils.h @@ -4,6 +4,10 @@ #include "../../config.h" #include "../art/libart.h" +#ifdef __cplusplus +extern "C" { +#endif + ArtVpath* gfxline_to_ArtVpath(gfxline_t*line); ArtSVP* gfxfillToSVP(gfxline_t*line, int perturb); void show_path(ArtSVP*path); @@ -11,4 +15,8 @@ ArtSVP* boxToSVP(double x1, double y1,double x2, double y2); ArtSVP* gfxstrokeToSVP(gfxline_t*line, gfxcoord_t width, gfx_capType cap_style, gfx_joinType joint_style, double miterLimit); gfxline_t* SVPtogfxline(ArtSVP*svp); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lib/devices/file.c b/lib/devices/file.c index 70d1979..288a0a7 100644 --- a/lib/devices/file.c +++ b/lib/devices/file.c @@ -138,7 +138,7 @@ void fileresult_destroy(struct _gfxresult*gfx) free(i->filename);i->filename = 0; } -int fileresult_save(struct _gfxresult*gfx, char*filename) +int fileresult_save(struct _gfxresult*gfx, const char*filename) { gfxresult_internal_t*i = (gfxresult_internal_t*)gfx->internal; FILE*fi,*fo; @@ -168,7 +168,7 @@ int fileresult_save(struct _gfxresult*gfx, char*filename) return 0; } -void* fileresult_get(struct _gfxresult*gfx, char*name) +void* fileresult_get(struct _gfxresult*gfx, const char*name) { return 0; } diff --git a/lib/devices/text.c b/lib/devices/text.c index 36c0e4f..4bdcdaf 100644 --- a/lib/devices/text.c +++ b/lib/devices/text.c @@ -147,7 +147,7 @@ void text_result_write(gfxresult_t*r, int filedesc) { textpage_t*i= (textpage_t*)r->internal; } -int text_result_save(gfxresult_t*r, char*filename) +int text_result_save(gfxresult_t*r, const char*filename) { textpage_t*i= (textpage_t*)r->internal; if(!i) { @@ -163,7 +163,7 @@ int text_result_save(gfxresult_t*r, char*filename) fclose(fi); return 1; } -void*text_result_get(gfxresult_t*r, char*name) +void*text_result_get(gfxresult_t*r, const char*name) { textpage_t*i= (textpage_t*)r->internal; if(!strcmp(name,"text")) { diff --git a/src/Makefile.in b/src/Makefile.in index 8fe1291..78d59e8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -93,7 +93,7 @@ swfrender$(E): swfrender.$(O) ../lib/librfxswf$(A) ../lib/libgfx$(A) ../lib/swf/ $(L) swfrender.$(O) -o $@ ../lib/librfxswf$(A) ../lib/libgfx$(A) ../lib/swf/swf.$(O) ../lib/libbase$(A) $(LIBS) $(STRIP) $@ -PDF2SWF_OBJ=../lib/librfxswf$(A) ../lib/libpdf$(A) ../lib/devices/arts.$(O) ../lib/devices/swf.$(O) ../lib/art/libart$(A) ../lib/libgfx$(A) ../lib/libbase$(A) +PDF2SWF_OBJ=../lib/librfxswf$(A) ../lib/libpdf$(A) ../lib/devices/arts.$(O) ../lib/devices/artsutils.$(O) ../lib/devices/swf.$(O) ../lib/art/libart$(A) ../lib/libgfx$(A) ../lib/libbase$(A) pdf2swf$(E): pdf2swf.$(O) $(PDF2SWF_OBJ) $(LL) pdf2swf.$(O) -o $@ $(PDF2SWF_OBJ) $(LIBS) $(CXXLIBS) $(STRIP) $@ -- 1.7.10.4