From: Matthew Mondor Date: Thu, 26 Oct 2006 01:16:21 +0000 (+0000) Subject: Include support from new GD class, allowing applications to lively create and X-Git-Tag: pgsql-branch-merge~98 X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=908c71193cab2e5911a0c6ccdaa0a98a66dd9bd8;p=mmondor.git Include support from new GD class, allowing applications to lively create and manipulate images. --- diff --git a/mmsoftware/js/js-appserv/src/GNUmakefile b/mmsoftware/js/js-appserv/src/GNUmakefile index 4c56233..956c162 100644 --- a/mmsoftware/js/js-appserv/src/GNUmakefile +++ b/mmsoftware/js/js-appserv/src/GNUmakefile @@ -1,4 +1,4 @@ -# $Id: GNUmakefile,v 1.3 2006/10/05 18:43:36 mmondor Exp $ +# $Id: GNUmakefile,v 1.4 2006/10/26 01:16:21 mmondor Exp $ CFLAGS += -Wall -DDEBUG @@ -10,15 +10,20 @@ PG_CFLAGS += -I$(shell pg_config --includedir) PG_LDFLAGS := $(shell pg_config --ldflags) PG_LDFLAGS += -lpq +GD_CFLAGS := $(shell gdlib-config --cflags) +GD_LDFLAGS := $(shell gdlib-config --ldflags --libs) +GD_LDFLAGS += -lgd + MMOBJS := $(addprefix ../../../mmlib/,mmpool.o mmlog.o mmreadcfg.o \ mmstring.o mmhash.o mmalarm.o mmheap.o mmlimitrate.o mmserver2.o) JSOBJS := $(addprefix ../../classes/,js_gcroot.o js_errno.o js_fd.o js_file.o \ - js_pgsql.o js_dir.o) + js_pgsql.o js_dir.o js_gd.o) -CFLAGS += $(JS_CFLAGS) $(PG_CFLAGS) -I. -I../../../mmlib -I../../classes -LDFLAGS += $(JS_LDFLAGS) $(PG_LDFLAGS) +CFLAGS += $(JS_CFLAGS) $(PG_CFLAGS) $(GD_CFLAGS) -I. -I../../../mmlib \ + -I../../classes +LDFLAGS += $(JS_LDFLAGS) $(PG_LDFLAGS) $(GD_LDFLAGS) OBJ := js-appserv.o diff --git a/mmsoftware/js/js-appserv/src/js-appserv.c b/mmsoftware/js/js-appserv/src/js-appserv.c index a75abe1..919cc78 100644 --- a/mmsoftware/js/js-appserv/src/js-appserv.c +++ b/mmsoftware/js/js-appserv/src/js-appserv.c @@ -1,4 +1,4 @@ -/* $Id: js-appserv.c,v 1.4 2006/10/18 05:07:45 mmondor Exp $ */ +/* $Id: js-appserv.c,v 1.5 2006/10/26 01:16:21 mmondor Exp $ */ /* * Copyright (C) 2006, Matthew Mondor @@ -75,8 +75,10 @@ #include #include #include +#include #include #include +#include @@ -681,11 +683,21 @@ context_create(JSRuntime *rt, size_t stacksize, JSObject **obj) syslog(LOG_NOTICE, "context_create() - js_InitFDClass()"); goto err; } + if (!js_InitFileClass(ctx, *obj)) { + syslog(LOG_NOTICE, "context_create() - js_InitFileClass()"); + goto err; + } if (!js_InitPGClass(ctx, *obj)) { syslog(LOG_NOTICE, "context_create() - js_InitPGClass()"); + goto err; } if (!js_InitDirClass(ctx, *obj)) { syslog(LOG_NOTICE, "context_create() - js_InitDirClass()"); + goto err; + } + if (!js_InitGDClass(ctx, *obj)) { + syslog(LOG_NOTICE, "context_create() - js_InitGDClass()"); + goto err; } /* Set our GC handler callback */