public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gthomas@redhat.com>
To: "amassa@cts.com" <amassa@cts.com>
Cc: ecos-discuss@sourceware.cygnus.com
Subject: RE: [ECOS] GoAhead Web Server
Date: Wed, 25 Oct 2000 15:35:00 -0000	[thread overview]
Message-ID: <XFMail.20001025165727.gthomas@redhat.com> (raw)
In-Reply-To: <200010252213.PAA31785@penguin.cts.com>

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

 
On 25-Oct-2000 amassa@cts.com wrote:
> I am developing on Windows NT4 for the MBX860 platform.  I am in the process
> of compiling the goahead web server.  I am finding that I need to make quite
> a few changes, which seems to contradict previous messages posted to this
> board.
> 
> I was wondering if someone has compiled in the goahead web server and
> documented the changes they needed to make in order to get it working on
> their system.

I did have to make some patches for version 2.1 against the latest eCos.
With these [attached] patches, it runs fine on the MBX.



[-- Attachment #2: diffs --]
[-- Type: text/x-diff, Size: 5760 bytes --]

diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/ECOS/Makefile GoAhead/ECOS/Makefile
--- GoAhead.ORIG/ECOS/Makefile	Thu May 18 15:20:10 2000
+++ GoAhead/ECOS/Makefile	Tue Sep 19 09:02:16 2000
@@ -6,16 +6,17 @@
 # These definitions come from your eCos install tree
 #
 DEBUG	:= -g -Wall -O2
+#DEBUG	:= -g -Wall -O2 -DB_STATS -DB_VERIFY_CAUSES_SEVERE_OVERHEAD
 
 # For Cirrus Logic EDB72xx board
-PKG_INSTALL_DIR := /work/net_test/install
-COMMAND_PREFIX := arm-elf-
-CFLAGS := -mcpu=arm7tdmi -D__EDB7209 -D__EDB7212 $(DEBUG)
+#PKG_INSTALL_DIR := /work/assabet/test/install
+#COMMAND_PREFIX := arm-elf-
+#CFLAGS := -mcpu=strongarm1100 $(DEBUG)
 
 # For Motorola PowerPC MBX/860
-##PKG_INSTALL_DIR := /work/net_mbx/install
-##COMMAND_PREFIX := powerpc-eabi-
-##CFLAGS := -mcpu=860 -msoft-float $(DEBUG)
+PKG_INSTALL_DIR := /work/mbx/test/install
+COMMAND_PREFIX := powerpc-eabi-
+CFLAGS := -mcpu=860 -msoft-float $(DEBUG)
 
 # 
 # These should not need to be changed
@@ -75,7 +76,7 @@
 #
 #	Primary link
 #
-$(NAME): Makefile  main.o $(ARCH)
+$(NAME): Makefile  main.o $(ARCH) $(PKG_INSTALL_DIR)/lib/libtarget.a $(PKG_INSTALL_DIR)/lib/libextras.a
 	$(CC) -o $(NAME) $(CFLAGS) $(IFLAGS) \
 		main.o $(ARCH) $(LDFLAGS) 
 
diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/ECOS/main.c GoAhead/ECOS/main.c
--- GoAhead.ORIG/ECOS/main.c	Thu May 18 15:20:10 2000
+++ GoAhead/ECOS/main.c	Tue Sep 19 08:06:52 2000
@@ -41,7 +41,7 @@
 extern void defaultTraceHandler(int level, char_t *buf);
 
 #if B_STATS
-#error WARNING:  B_STATS directive is not supported in this OS!
+//#error WARNING:  B_STATS directive is not supported in this OS!
 #endif
 
 /*********************************** Code *************************************/
@@ -57,7 +57,7 @@
  *	60KB allows for several concurrent page requests.  If more space
  *	is required, malloc will be used for the overflow.
  */
-	bopen(NULL, (60 * 1024), B_USE_MALLOC);
+	bopen(NULL, (160 * 1024), B_USE_MALLOC);
 
 /*
  *	Initialize the web server
@@ -120,7 +120,8 @@
 /*
  *	Configure the web server options before opening the web server
  */
-	websSetDefaultPage(T("default.asp"));
+//	websSetDefaultPage(T("default.asp"));
+	websSetDefaultPage(T("index.html"));
 	websSetPassword(password);
 
 /* 
@@ -239,6 +240,7 @@
 #endif
 }
 
+#if 0
 /******************************************************************************/
 /*
  *	Wrappers for depreciated socket I/O functions
@@ -253,5 +255,6 @@
 {
     return read(s, buf, len);
 }
+#endif
 
 /******************************************************************************/
Only in GoAhead/ECOS: web_files
Only in GoAhead/ECOS: web_files.00
Only in GoAhead/ECOS: webcomp
Only in GoAhead/ECOS: webrom.c
Only in GoAhead/ECOS: webs
diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/balloc.c GoAhead/balloc.c
--- GoAhead.ORIG/balloc.c	Thu May 18 15:20:10 2000
+++ GoAhead/balloc.c	Tue Sep 19 08:06:52 2000
@@ -207,7 +207,11 @@
  *	queues for a suitable one.
  */
 
-void *balloc(B_ARGS_DEC, int size)
+#if B_STATS
+void *_balloc(char *file, int line, int size)
+#else
+void *_balloc(int size)
+#endif
 {
 	bType	*bp;
 	int		q, memSize;
@@ -353,6 +357,38 @@
 	return (void*) ((char*) bp + sizeof(bType));
 }
 
+static void 
+_bstatsShow(int handle, char_t *fmt, ...)
+{
+	va_list		args;
+	va_start(args, fmt);
+	vprintf(fmt, args);
+	va_end(args);
+}
+
+void *balloc(B_ARGS_DEC, int size)
+{
+#if B_STATS
+    void *res = _balloc(B_ARGS, size);
+#else
+    void *res = _balloc(size);
+#endif
+//    printf("balloc(%d) = 0x%x\n", size, res);
+    if (res == (void *)0) {
+        printf("balloc(%d) = 0x%x\n", size, res);
+#if B_STATS
+        bstats(0, _bstatsShow);
+#endif
+    }
+    if (bFreeLeft < 1024) {
+        printf("** Warning - memory low\n");
+#if B_STATS
+        bstats(0, _bstatsShow);
+#endif
+    }
+    return res;
+}
+
 /******************************************************************************/
 /*
  *	Free a block back to the relevant free q. We don't free back to the O/S
@@ -364,6 +400,8 @@
 {
 	bType	*bp;
 	int		q, memSize;
+
+//        printf("bfree(0x%x)\n", mp);
 
 #if B_VERIFY_CAUSES_SEVERE_OVERHEAD
 	verifyBallocSpace();
diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/default.c GoAhead/default.c
--- GoAhead.ORIG/default.c	Thu May 18 15:20:10 2000
+++ GoAhead/default.c	Tue Sep 19 08:06:53 2000
@@ -45,6 +45,7 @@
 	websStatType	sbuf;
 	char_t			*lpath, *tmp, *date;
 	int				bytes, flags, nchars;
+        int was_dir = 0;
 
 	a_assert(websValid(wp));
 	a_assert(url && *url);
@@ -64,12 +65,13 @@
 	nchars = gstrlen(lpath) - 1;
 	if (lpath[nchars] == '/' || lpath[nchars] == '\\') {
 		lpath[nchars] = '\0';
+                was_dir = 1;
 	}
 
 /*
  *	If the file is a directory, redirect using the nominated default page
  */
-	if (websPageIsDirectory(lpath)) {
+	if (was_dir || websPageIsDirectory(lpath)) {
 		nchars = gstrlen(path);
 		if (path[nchars-1] == '/' || path[nchars-1] == '\\') {
 			path[--nchars] = '\0';
@@ -84,6 +86,7 @@
 /*
  *	Open the document. Stat for later use.
  */
+        printf("Opening %s\n", lpath);
 	if (websPageOpen(wp, lpath, path, SOCKET_RDONLY | SOCKET_BINARY,
 				0666) < 0) {
 			websError(wp, 400, 
diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/uemf.h GoAhead/uemf.h
--- GoAhead.ORIG/uemf.h	Thu May 18 15:20:10 2000
+++ GoAhead/uemf.h	Tue Sep 19 06:38:07 2000
@@ -148,6 +148,7 @@
 	#include	<time.h>
 	#include	<network.h>
 	#include	<errno.h>
+        #define         NFDBITS  __NFDBITS
 #endif /* ECOS */
 
 /********************************** Includes **********************************/
@@ -199,7 +200,7 @@
 #endif /* LINUX && ! _STRUCT_TIMEVAL */
 
 #if ECOS
-	#define		O_RDONLY		1
+//	#define		O_RDONLY		1
 	#define		O_BINARY		2
 
 	#define		__NO_PACK		1

  reply	other threads:[~2000-10-25 15:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-25 15:14 amassa
2000-10-25 15:35 ` Gary Thomas [this message]
2000-10-25 16:25 amassa
2000-10-25 17:01 ` Gary Thomas
2002-11-19 12:53 [ECOS] GoAhead Web server rhea santos
2002-11-20  0:53 ` Gary Thomas
2002-11-20  0:59   ` Andrew Lunn
2002-11-20  1:14     ` sandeep
2002-11-20  9:07 Anthony Massa
2004-05-23 23:18 [ECOS] goAhead web server baljeet singh
2004-05-24  7:21 ` mohanlal jangir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=XFMail.20001025165727.gthomas@redhat.com \
    --to=gthomas@redhat.com \
    --cc=amassa@cts.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).