From df49c60c9671e4a28e636964d744c1f59fb6cb68 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Jun 2000 15:00:15 +0000 Subject: Merged from 4.5.0-beta3a --- cpukit/httpd/Makefile.am | 27 ++++++++++++++++++++++----- cpukit/httpd/balloc.c | 10 +++++----- cpukit/httpd/ejlex.c | 2 +- cpukit/httpd/handler.c | 2 +- cpukit/httpd/uemf.c | 2 +- cpukit/httpd/uemf.h | 2 +- cpukit/httpd/webs.c | 6 +++--- 7 files changed, 34 insertions(+), 17 deletions(-) (limited to 'cpukit/httpd') diff --git a/cpukit/httpd/Makefile.am b/cpukit/httpd/Makefile.am index 3dae7f9676..f14ceaaf67 100644 --- a/cpukit/httpd/Makefile.am +++ b/cpukit/httpd/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -9,12 +9,13 @@ LIB = $(ARCH)/$(LIBNAME) C_FILES = asp.c balloc.c wbase64.c default.c ejlex.c ejparse.c form.c h.c \ handler.c mime.c misc.c webpage.c ringq.c rom.c security.c socket.c \ - sym.c uemf.c url.c value.c webcomp.c webrom.c webs.c websuemf.c \ - webmain.c + sym.c uemf.c url.c value.c webrom.c webs.c websuemf.c webmain.c C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o) OBJS = $(C_O_FILES) +H_FILES = ej.h uemf.h webs.h wsIntrn.h + include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../../../automake/lib.am @@ -27,8 +28,24 @@ AM_CPPFLAGS += -DWEBS -DUEMF -DOS="RTEMS" $(LIB): $(OBJS) $(make-library) +$(PROJECT_INCLUDE): + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/goahead: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/goahead/%.h: %.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/rtems_webserver.h: rtems_webserver.h + $(INSTALL_DATA) $< $@ + +PREINSTALL_FILES += $(PROJECT_INCLUDE) \ + $(PROJECT_INCLUDE)/rtems_webserver.h $(PROJECT_INCLUDE)/goahead \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/goahead/%.h) + if HAS_POSIX -all-local: $(ARCH) $(OBJS) $(LIB) +all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) $(LIB) endif .PRECIOUS: $(LIB) diff --git a/cpukit/httpd/balloc.c b/cpukit/httpd/balloc.c index 20612ed148..f2dae27867 100644 --- a/cpukit/httpd/balloc.c +++ b/cpukit/httpd/balloc.c @@ -224,7 +224,7 @@ void *balloc(B_ARGS_DEC, int size) #endif bp = (bType*) malloc(memSize); if (bp == NULL) { - trace(0, T("B: malloc failed for %s:%d, size %d\n"), + goahead_trace(0, T("B: malloc failed for %s:%d, size %d\n"), B_ARGS, memSize); return NULL; } @@ -236,7 +236,7 @@ void *balloc(B_ARGS_DEC, int size) #endif } else { - trace(0, T("B: balloc failed for %s:%d, size %d\n"), + goahead_trace(0, T("B: balloc failed for %s:%d, size %d\n"), B_ARGS, memSize); return NULL; } @@ -286,7 +286,7 @@ void *balloc(B_ARGS_DEC, int size) * Nothing left on the primary free list, so malloc a new block */ if ((bp = (bType*) malloc(memSize)) == NULL) { - trace(0, T("B: malloc failed for %s:%d size %d\n"), + goahead_trace(0, T("B: malloc failed for %s:%d size %d\n"), B_ARGS, memSize); return NULL; } @@ -300,7 +300,7 @@ void *balloc(B_ARGS_DEC, int size) bp->flags = B_MALLOCED; } else { - trace(0, T("B: alloc failed for %s:%d size %d\n"), B_ARGS, size); + goahead_trace(0, T("B: alloc failed for %s:%d size %d\n"), B_ARGS, size); return NULL; } } @@ -577,7 +577,7 @@ static void bstatsWrite(int handle, char_t *fmt, ...) buf = NULL; gvsnprintf(&buf, VALUE_MAX_STRING, fmt, args); va_end(args); - trace(0, buf); + goahead_trace(0, buf); if (buf) { bfree(B_L, buf); } diff --git a/cpukit/httpd/ejlex.c b/cpukit/httpd/ejlex.c index 67e1504bd7..091d17411b 100644 --- a/cpukit/httpd/ejlex.c +++ b/cpukit/httpd/ejlex.c @@ -189,7 +189,7 @@ void ejLexFreeInputState(ej_t* ep, ejinput_t* state) int ejLexGetToken(ej_t* ep, int state) { ep->tid = getLexicalToken(ep, state); - trace(7, T("ejGetToken: %d, \"%s\"\n"), ep->tid, ep->token); + goahead_trace(7, T("ejGetToken: %d, \"%s\"\n"), ep->tid, ep->token); return ep->tid; } diff --git a/cpukit/httpd/handler.c b/cpukit/httpd/handler.c index d481ec3c0c..fb42d2d097 100644 --- a/cpukit/httpd/handler.c +++ b/cpukit/httpd/handler.c @@ -264,7 +264,7 @@ int websUrlHandlerRequest(webs_t wp) return 1; } if (!websValid(wp)) { - trace(0, + goahead_trace(0, T("webs: handler %s called websDone, but didn't return 1\n"), sp->urlPrefix); return 1; diff --git a/cpukit/httpd/uemf.c b/cpukit/httpd/uemf.c index 8a6675f944..a9302f989c 100644 --- a/cpukit/httpd/uemf.c +++ b/cpukit/httpd/uemf.c @@ -47,7 +47,7 @@ void error(E_ARGS_DEC, int flags, char_t *fmt, ...) * Trace log. Customize this function to log trace output */ -void trace(int level, char_t *afmt, ...) +void goahead_trace(int level, char_t *afmt, ...) { #if DEBUG va_list args; diff --git a/cpukit/httpd/uemf.h b/cpukit/httpd/uemf.h index c63e75bd99..8945907dfb 100644 --- a/cpukit/httpd/uemf.h +++ b/cpukit/httpd/uemf.h @@ -649,7 +649,7 @@ extern sym_t *symEnter(sym_fd_t sd, char_t *name, value_t v, int arg); extern int symDelete(sym_fd_t sd, char_t *name); extern void symWalk(sym_fd_t sd, void (*fn)(sym_t *symp)); -extern void trace(int lev, char_t *fmt, ...); +extern void goahead_trace(int lev, char_t *fmt, ...); extern value_t valueInteger(long value); extern value_t valueString(char_t *value, int flags); diff --git a/cpukit/httpd/webs.c b/cpukit/httpd/webs.c index e198cc1e9a..cee03ee01c 100644 --- a/cpukit/httpd/webs.c +++ b/cpukit/httpd/webs.c @@ -193,7 +193,7 @@ int websOpenListen(int port, int retries) orig, port - 1); return -1; } - trace(0, T("webs: Listening for HTTP requests on port %d\n"), port); + goahead_trace(0, T("webs: Listening for HTTP requests on port %d\n"), port); /* * Determine the full URL address to access the home page for this web server @@ -269,7 +269,7 @@ static int websAccept(int sid, char *ipaddr, int port) * Arrange for a timeout to kill hung requests */ wp->timeout = emfCreateTimer(WEBS_TIMEOUT, websTimeout, (long) wp); - trace(5, T("webs: accept request\n")); + goahead_trace(5, T("webs: accept request\n")); return 0; } @@ -1144,7 +1144,7 @@ int websWrite(webs_t wp, char_t* fmt, ...) buf = NULL; rc = 0; if (gvsnprintf(&buf, WEBS_BUFSIZE, fmt, vargs) >= WEBS_BUFSIZE) { - trace(0, T("webs: websWrite lost data, buffer overflow\n")); + goahead_trace(0, T("webs: websWrite lost data, buffer overflow\n")); } va_end(vargs); a_assert(buf); -- cgit v1.2.3