Browse code

sun compilation fixes

Andrei Pelinescu-Onciul authored on 12/02/2002 20:45:43
Showing 6 changed files
... ...
@@ -9,7 +9,7 @@
9 9
 VERSION = 0
10 10
 PATCHLEVEL = 8
11 11
 SUBLEVEL = 6
12
-EXTRAVERSION =
12
+EXTRAVERSION = 1
13 13
 
14 14
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
15 15
 OS = $(shell uname -s)
... ...
@@ -97,11 +97,11 @@ MKTAGS=ctags -R .
97 97
 
98 98
 ifeq ($(mode), release)
99 99
 	CFLAGS=-O9 -funroll-loops  -Wcast-align $(PROFILE) -Winline\
100
-			-malign-double -malign-loops=4
100
+			-malign-loops=4
101 101
 			#-Wmissing-prototypes \
102 102
 	
103 103
 ifneq (,$(findstring 3.0, $(CC_VER)))
104
-	CFLAGS=-minline-all-stringops \
104
+	CFLAGS=-minline-all-stringops -malign-double \
105 105
 				-march=athlon \
106 106
 				#-mcpu=athlon
107 107
 endif
... ...
@@ -140,7 +140,7 @@ ifeq  ($(OS), SunOS)
140 140
 	endif
141 141
 
142 142
 YACC=yacc
143
-LIBS+=-L/usr/local/lib -lxnet # or -lnsl -lsocket or -lglibc ?
143
+LIBS+=-L/usr/local/lib -lxnet -lrt # or -lnsl -lsocket or -lglibc ?
144 144
 
145 145
 endif
146 146
 ifeq ($(OS), FreeBSD)
... ...
@@ -17,7 +17,7 @@
17 17
 
18 18
 
19 19
 
20
-typedef  volatile int lock_t;
20
+typedef  volatile int fl_lock_t;
21 21
 
22 22
 
23 23
 
... ...
@@ -26,7 +26,7 @@ typedef  volatile int lock_t;
26 26
 
27 27
 
28 28
 /*test and set lock, ret 1 if lock held by someone else, 0 otherwise*/
29
-inline static int tsl(lock_t* lock)
29
+inline static int tsl(fl_lock_t* lock)
30 30
 {
31 31
 	volatile char val;
32 32
 #ifdef __i386
... ...
@@ -47,7 +47,7 @@ inline static int tsl(lock_t* lock)
47 47
 
48 48
 
49 49
 
50
-inline static void get_lock(lock_t* lock)
50
+inline static void get_lock(fl_lock_t* lock)
51 51
 {
52 52
 	
53 53
 	while(tsl(lock)){
... ...
@@ -57,7 +57,7 @@ inline static void get_lock(lock_t* lock)
57 57
 
58 58
 
59 59
 
60
-inline static void release_lock(lock_t* lock)
60
+inline static void release_lock(fl_lock_t* lock)
61 61
 {
62 62
 	char val;
63 63
 
... ...
@@ -43,7 +43,7 @@ static int shm_shmid=-1; /*shared memory id*/
43 43
 #endif
44 44
 
45 45
 #ifdef FAST_LOCK
46
-lock_t* mem_lock=0;
46
+fl_lock_t* mem_lock=0;
47 47
 #else
48 48
 int shm_semid=-1; /*semaphore id*/
49 49
 #endif
... ...
@@ -198,7 +198,7 @@ int shm_mem_init()
198 198
 		return -1;
199 199
 	}
200 200
 #ifdef FAST_LOCK
201
-	mem_lock=shm_malloc_unsafe(sizeof(lock_t));
201
+	mem_lock=shm_malloc_unsafe(sizeof(fl_lock_t));
202 202
 	init_lock(*mem_lock);
203 203
 #endif
204 204
 	
... ...
@@ -50,7 +50,7 @@
50 50
 #ifdef FAST_LOCK
51 51
 #include "../fastlock.h"
52 52
 	
53
-	extern lock_t* mem_lock;
53
+	extern fl_lock_t* mem_lock;
54 54
 #else
55 55
 extern  int shm_semid;
56 56
 #endif
... ...
@@ -18,9 +18,9 @@ check_via=no     # (cmd. line: -v)
18 18
 dns=off           # (cmd. line: -r)
19 19
 rev_dns=off      # (cmd. line: -R)
20 20
 #port=5070
21
-listen=10.0.0.179
21
+#listen=10.0.0.179
22 22
 #listen=127.0.0.1
23
-#listen=192.168.57.33
23
+listen=192.168.57.33
24 24
 loop_checks=0
25 25
 # for more info: sip_router -h
26 26
 
... ...
@@ -6,8 +6,8 @@
6 6
 
7 7
 
8 8
 debug=3          # debug level (cmd line: -dddddddddd)
9
-fork=yes          # (cmd. line: -D)
10
-#fork=no
9
+#fork=yes          # (cmd. line: -D)
10
+fork=no
11 11
 log_stderror=yes # (cmd line: -E)
12 12
 #log_stderror=no	# (cmd line: -E)
13 13
 
... ...
@@ -17,8 +17,8 @@ check_via=no     # (cmd. line: -v)
17 17
 dns=off           # (cmd. line: -r)
18 18
 rev_dns=off      # (cmd. line: -R)
19 19
 #port=5070
20
-listen=10.0.0.179
21
-#listen=192.168.57.33
20
+#listen=10.0.0.179
21
+listen=192.168.57.33
22 22
 loop_checks=0
23 23
 # for more info: sip_router -h
24 24
 
... ...
@@ -27,13 +27,10 @@ loop_checks=0
27 27
 loadmodule "modules/tm/tm.so"
28 28
 #loadmodule "modules/rr/rr.so"
29 29
 loadmodule "modules/maxfwd/maxfwd.so"
30
-loadmodule "modules/sl/sl.so"
30
+#loadmodule "modules/sl/sl.so"
31 31
 
32 32
 
33 33
 route{
34
-             if ( !sl_filter_ACK() ){
35
-                log("SER : error in sl_filter_ACK!\n");
36
-             };
37 34
 
38 35
              if ( mf_is_maxfwd_present() )
39 36
              {
... ...
@@ -44,7 +41,6 @@ route{
44 44
                    if ( mf_is_maxfwd_zero() )
45 45
                    {
46 46
                      log("SER: MAX FORWARD header is zero\n");
47
-                     sl_send_reply("483","Too Many Hops");
48 47
                      drop();
49 48
                    };
50 49
              }else{