diff --git a/Arena/Implementation/icon.c b/Arena/Implementation/icon.c index f64faa6..ac25d8e 100644 --- a/Arena/Implementation/icon.c +++ b/Arena/Implementation/icon.c @@ -43,7 +43,7 @@ extern unsigned long windowColor; /* Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) */ -#if defined __QNX__ || (defined(sco) && !defined(sco_os5)) +#if defined __QNX__ || (defined(sco) && !defined(sco_os5)) || defined(__NetBSD__) #define index strchr #else extern char *index(); diff --git a/Arena/Implementation/neweditor.c b/Arena/Implementation/neweditor.c index e851d05..202a43d 100644 --- a/Arena/Implementation/neweditor.c +++ b/Arena/Implementation/neweditor.c @@ -174,7 +174,7 @@ int DeleteChar(EditorBuffer *buffer, int pos) } else /* size 1 -> we remove the bank */ { -#ifdef __STRICT_ANSI__ +#if 1 if(buffer_cell->prev) buffer_cell->prev->next = buffer_cell->next; else diff --git a/Arena/Implementation/util.c b/Arena/Implementation/util.c index 0946562..3de02c2 100644 --- a/Arena/Implementation/util.c +++ b/Arena/Implementation/util.c @@ -45,7 +45,7 @@ void HTList_addObjectFirst (HTList *me, void *newObject) /* howcome 26/1/95 */ } - +#ifndef __NetBSD__ char *strndup(char *s, int n) { char *pp; @@ -64,6 +64,7 @@ char *strndup(char *s, int n) return pp; } +#endif /* str_tok: a reentrant strtok */ diff --git a/Arena/Implementation/www.h b/Arena/Implementation/www.h index 701e68d..4a43fe8 100644 --- a/Arena/Implementation/www.h +++ b/Arena/Implementation/www.h @@ -1551,7 +1551,9 @@ typedef struct s_edit_view /* util.c */ void HTList_addObjectFirst (HTList *me, void *newObject); +#ifndef __NetBSD__ char *strndup(char *s, int n); +#endif char *str_tok(char *a, char *b, char **c); char *chop_str(char *p); Byte hex2byte(char c); diff --git a/Arena/netbsd/Makefile b/Arena/netbsd/Makefile index 7c8cd7f..cde92c9 100644 --- a/Arena/netbsd/Makefile +++ b/Arena/netbsd/Makefile @@ -8,7 +8,7 @@ WWW_MACH = netbsd # The ASIS repository's name for the machine we are on -ASIS_MACH = netbsd/amiga +ASIS_MACH = netbsd/amd64 # Options for cc #CC = cc @@ -17,15 +17,20 @@ ASIS_MACH = netbsd/amiga # Options for gcc CC = gcc -CFLAGS = -O -g -DNO_STRERROR +CFLAGS = -O -g -DNO_STRERROR -I /usr/X11R7/include +LFLAGS = -L /usr/X11R7/lib -Wl,-R/usr/pkg/lib #CFLAGS = -Wall -g -DNO_GETWD -DHAS_GETCWD # CFLAGS = -Wall -g #LFLAGS = -static +ifeq ($(shell uname -m),amd64) +CFLAGS += -DPOINTER_IS_64BIT +endif + # In both cases: Ask for static linking so that binary will be transportable # Directory for installed binary: -BINDIR = /usr/local/bin +BINDIR = /usr/arena/bin #BINDIR = ../../LineMode/sun4 #_________________ OK if normal W3 distribution @@ -108,9 +113,9 @@ OE = $(OBJ)/.created WWWLIB = -L$(USELIBDIR) -lwww XLIB = -L$(XLIBDIR) -lX11 -JPEGLIB = $(JPEGDIR)/$(WWW_MACH)/libjpeg.a -PNGLIB = $(PNGDIR)/$(WWW_MACH)/libpng.a -ZLIB = $(ZLIBDIR)/$(WWW_MACH)/libz.a +JPEGLIB = $(JPEGDIR)/Implementation/libjpeg.a +PNGLIB = $(PNGDIR)/Implementation/libpng.a +ZLIB = $(ZLIBDIR)/Implementation/libz.a OBJS = $(OBJ)/www.o $(OBJ)/display.o \ $(OBJ)/scrollbar.o $(OBJ)/toolbar.o $(OBJ)/entities.o $(OBJ)/forms.o \ diff --git a/Library/Implementation/HTString.c b/Library/Implementation/HTString.c index 36e0047..ee568a9 100644 --- a/Library/Implementation/HTString.c +++ b/Library/Implementation/HTString.c @@ -65,6 +65,7 @@ PUBLIC int strncasecomp (CONST char * a, CONST char * b, int n) /* ** strcasestr(s1,s2) -- like strstr(s1,s2) but case-insensitive. */ +#ifndef __NetBSD__ PUBLIC char * strcasestr (char * s1, char * s2) { char * ptr = s1; @@ -85,6 +86,7 @@ PUBLIC char * strcasestr (char * s1, char * s2) } return NULL; } +#endif diff --git a/Library/Implementation/HTString.h b/Library/Implementation/HTString.h index 7b2b851..5a3676c 100644 --- a/Library/Implementation/HTString.h +++ b/Library/Implementation/HTString.h @@ -68,7 +68,9 @@ Case-insensitive strstr This works like strstr() but is not case-sensitive. */ +#ifndef __NetBSD__ extern char * strcasestr (char * s1, char * s2); +#endif /* Strip white space off a string diff --git a/Library/netbsd/Makefile b/Library/netbsd/Makefile index fac6967..748384b 100644 --- a/Library/netbsd/Makefile +++ b/Library/netbsd/Makefile @@ -5,7 +5,7 @@ WWW_MACH = netbsd # The ASIS repository's name for the machine we are on -ASIS_MACH = netbsd/amiga +ASIS_MACH = netbsd/amd64 # Options for ANSI acc #CC = acc @@ -20,7 +20,7 @@ CFLAGS = -Wall -g -DNO_TIMEZONE # LFLAGS = -lresolv -static # Directory for installed binary: -BINDIR = /usr/local/bin +BINDIR = /usr/arena/bin #_________________ OK if normal W3 distribution # Where is the WWW source root?