Browse Source

- fixed a few openbsd warnings
- changed intall doc & man path for non-linux systems
(which are non LSB compliant)

Andrei Pelinescu-Onciul 23 years ago
parent
commit
aee4712ee1
4 changed files with 21 additions and 13 deletions
  1. 7 7
      INSTALL
  2. 2 1
      Makefile
  3. 8 3
      Makefile.defs
  4. 4 2
      main.c

+ 7 - 7
INSTALL

@@ -3,9 +3,9 @@ $Id$
 
 Installation Notes
 
-Supported arhitectures: Linux/i386, Linux/armv4l, FreeBSD/i386,
+Supported arhitectures: Linux/i386, Linux/armv4l, FreeBSD/i386, OpenBSD/i386
 Solaris/sparc64 
-(for other arhitectures the Makefile must be edited)
+(for other arhitectures the Makefiles might need to be edited)
 
 There are various configuration options defined in the Makefile.
 
@@ -23,17 +23,17 @@ Requirements:
 - GNU install or BSD install (on Solaris "ginstall") if you want "make
   install", "make bin", "make sunpkg" to work
 - libmysqlclient & libz (zlib) if you want mysql support (the mysql module)
-- libxpat if you want the jabber gateway support (the jabber module)
+- libexpat if you want the jabber gateway support (the jabber module)
 
 
 OS Notes:
 
-- FreeBSD: make sure gmake, bison & flex are installed
+- FreeBSD/OpenBSD: make sure gmake, bison or yacc & flex are installed
 - Solaris: as above; you can use Solaris's yacc instead of bison. You might
   need also gtar and ginstall.
-- Windows: it works in windows (only the core) but you must install a recent
-  cygwin version (http://www.cygwin.com/) and also install a newer regex
-  library version (>=0.12). 
+- Windows: it works in windows (only the core, w/o shared mem. support) but you
+  must install a recent cygwin version (http://www.cygwin.com/) and also 
+  install a newer regex library version (>=0.12). 
     
 
 

+ 2 - 1
Makefile

@@ -3,7 +3,8 @@
 # sip_router makefile
 #
 # WARNING: requires gmake (GNU Make)
-#  Arch supported: Linux, FreeBSD, SunOS (tested on Solaris 8), WinNT (cygwin)
+#  Arch supported: Linux, FreeBSD, SunOS (tested on Solaris 8), OpenBSD (3.2),
+#  limited WinNT (cygwin) support
 
 auto_gen=lex.yy.c cfg.tab.c   #lexx, yacc etc
 

+ 8 - 3
Makefile.defs

@@ -36,8 +36,13 @@ ut-prefix = $(basedir)$(prefix)
 cfg-dir = etc/ser/
 bin-dir = sbin/
 modules-dir = lib/ser/modules/
-doc-dir = share/doc/ser/
-man-dir = share/man/
+ifeq ($(OS), linux)
+	doc-dir = share/doc/ser/
+	man-dir = share/man/
+else
+	doc-dir=doc/ser/
+	man-dir=man/
+endif
 ut-prefix = bin/
 # target dirs for various stuff
 cfg-target = $(prefix)/$(cfg-dir)
@@ -473,7 +478,7 @@ endif
 
 
 #os specific stuff
-ifeq ($(OS), Linux)
+ifeq ($(OS), linux)
 	#same as common
 endif
 

+ 4 - 2
main.c

@@ -82,7 +82,7 @@
 
 static char id[]="@(#) $Id$";
 static char version[]=  NAME " " VERSION " (" ARCH "/" OS ")" ;
-static char compiled[]= __TIME__ __DATE__ ;
+static char compiled[]= __TIME__ " " __DATE__ ;
 static char flags[]=
 "STATS:"
 #ifdef STATS
@@ -758,7 +758,9 @@ int add_interfaces(char* if_name, int family, unsigned short port)
 	int ret;
 
 #ifdef HAVE_SOCKADDR_SA_LEN
-	#define MAX(a,b) ( ((a)>(b))?(a):(b))
+	#ifndef MAX
+		#define MAX(a,b) ( ((a)>(b))?(a):(b))
+	#endif
 #endif
 	/* ipv4 or ipv6 only*/
 	s=socket(family, SOCK_DGRAM, 0);