浏览代码

- serunix fixed to compile on solaris
- serunix & gen_ha1 Makefiles changed to use main ser Makefile*
(which autodetect the needed libs a.s.o)
- t_fifo fixed to compile on solaris
- pa excluded from the modules compiled by default
(it needs external libraries); to compile it: make all include_modules=pa

Andrei Pelinescu-Onciul 21 年之前
父节点
当前提交
0b6d9f2f08
共有 7 个文件被更改,包括 66 次插入21 次删除
  1. 4 2
      Makefile
  2. 1 1
      Makefile.defs
  3. 1 0
      Makefile.modules
  4. 21 0
      modules/tm/t_fifo.c
  5. 11 11
      utils/gen_ha1/Makefile
  6. 11 7
      utils/serunix/Makefile
  7. 17 0
      utils/serunix/serunix.c

+ 4 - 2
Makefile

@@ -50,7 +50,8 @@ exclude_modules?= 			cpl ext extcmd \
 							im \
 							im \
 							jabber \
 							jabber \
 							cpl-c \
 							cpl-c \
-							auth_radius group_radius uri_radius 
+							auth_radius group_radius uri_radius \
+							pa
 # always exclude the CVS dir
 # always exclude the CVS dir
 override exclude_modules+= CVS $(skip_modules)
 override exclude_modules+= CVS $(skip_modules)
 
 
@@ -97,7 +98,8 @@ include Makefile.defs
 NAME=$(MAIN_NAME)
 NAME=$(MAIN_NAME)
 
 
 #export relevant variables to the sub-makes
 #export relevant variables to the sub-makes
-export DEFS PROFILE CC  LD MKDEP MKTAGS CFLAGS LDFLAGS MOD_CFLAGS MOD_LDFLAGS
+export DEFS PROFILE CC LD MKDEP MKTAGS CFLAGS LDFLAGS MOD_CFLAGS MOD_LDFLAGS 
+export LIBS
 export LEX YACC YACC_FLAGS
 export LEX YACC YACC_FLAGS
 export PREFIX LOCALBASE
 export PREFIX LOCALBASE
 # export relevant variables for recursive calls of this makefile 
 # export relevant variables for recursive calls of this makefile 

+ 1 - 1
Makefile.defs

@@ -48,7 +48,7 @@ MAIN_NAME=ser
 VERSION = 0
 VERSION = 0
 PATCHLEVEL = 8
 PATCHLEVEL = 8
 SUBLEVEL =   99
 SUBLEVEL =   99
-EXTRAVERSION = -dev2
+EXTRAVERSION = -dev3
 
 
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")

+ 1 - 0
Makefile.modules

@@ -35,6 +35,7 @@ include ../../Makefile.sources
 ifeq (,$(filter $(MOD_NAME), $(static_modules)))
 ifeq (,$(filter $(MOD_NAME), $(static_modules)))
 CFLAGS:=$(MOD_CFLAGS)
 CFLAGS:=$(MOD_CFLAGS)
 LDFLAGS:=$(MOD_LDFLAGS)
 LDFLAGS:=$(MOD_LDFLAGS)
+LIBS:=
 endif
 endif
 
 
 include ../../Makefile.rules
 include ../../Makefile.rules

+ 21 - 0
modules/tm/t_fifo.c

@@ -56,6 +56,27 @@
 #include "t_fwd.h"
 #include "t_fwd.h"
 #include "../../tsend.h"
 #include "../../tsend.h"
 
 
+
+/* AF_LOCAL is not defined on solaris */
+#if !defined(AF_LOCAL)
+#define AF_LOCAL AF_UNIX
+#endif
+#if !defined(PF_LOCAL)
+#define PF_LOCAL PF_UNIX
+#endif
+
+
+/* solaris doesn't have SUN_LEN */
+#ifndef SUN_LEN
+#define SUN_LEN(sa)	 ( strlen((sa)->sun_path) + \
+					 (size_t)(((struct sockaddr_un*)0)->sun_path) )
+#endif
+
+
+
+
+
+
 int tm_unix_tx_timeout = 2; /* Default is 2 seconds */
 int tm_unix_tx_timeout = 2; /* Default is 2 seconds */
 
 
 #define TWRITE_PARAMS          21
 #define TWRITE_PARAMS          21

+ 11 - 11
utils/gen_ha1/Makefile

@@ -1,16 +1,16 @@
+# $Id$
+#
+#  gen_ha1 Makefile
+# 
 
 
-all: gen_ha1
+include ../../Makefile.defs
 
 
-gen_ha1: gen_ha1.o calc.o ../../md5.o
-	gcc -o gen_ha1 gen_ha1.o calc.o ../../md5.o
+auto_gen=
+NAME=gen_ha1
+LIBS=../../md5.o
 
 
-gen_ha1.o: gen_ha1.c
-	gcc -c gen_ha1.c
 
 
-calc.o: calc.c calc.h
-	gcc -c calc.c
-
-
-clean:
-	rm -f *~ *.o gen_ha1
+include ../../Makefile.sources
+include ../../Makefile.rules
 
 
+modules:

+ 11 - 7
utils/serunix/Makefile

@@ -1,12 +1,16 @@
+# $Id$
+#
+#  serunix Makefile
+# 
 
 
-all: serunix
+include ../../Makefile.defs
 
 
-serunix: serunix.o
-	gcc -o serunix serunix.o
+auto_gen=
+NAME=serunix
 
 
-serunix.o: serunix.c
-	gcc -c serunix.c
 
 
-clean:
-	rm -f *~ *.o serunix
+include ../../Makefile.sources
+include ../../Makefile.rules
 
 
+
+modules:

+ 17 - 0
utils/serunix/serunix.c

@@ -33,6 +33,23 @@
 #include <sys/un.h>
 #include <sys/un.h>
 #include <errno.h>
 #include <errno.h>
 
 
+
+/* AF_LOCAL is not defined on solaris */
+#if !defined(AF_LOCAL)
+#define AF_LOCAL AF_UNIX
+#endif
+#if !defined(PF_LOCAL)
+#define PF_LOCAL PF_UNIX
+#endif
+
+
+/* solaris doesn't have SUN_LEN */
+#ifndef SUN_LEN
+#define SUN_LEN(sa)	 ( strlen((sa)->sun_path) + \
+					 (size_t)(((struct sockaddr_un*)0)->sun_path) )
+#endif
+
+
 #define BUF_SIZE 65536
 #define BUF_SIZE 65536
 #define DEFAULT_TIMEOUT 5
 #define DEFAULT_TIMEOUT 5