... | ... |
@@ -252,6 +252,39 @@ endif #CC_NAME, suncc |
252 | 252 |
endif #CC_NAME, gcc |
253 | 253 |
endif #ARCH, sparc64 |
254 | 254 |
|
255 |
+ #if ipaq/netwinder |
|
256 |
+ifeq ($(ARCH), armv4l) |
|
257 |
+ # if gcc |
|
258 |
+ifeq ($(CC_NAME), gcc) |
|
259 |
+ #common stuff |
|
260 |
+ CFLAGS=-O9 -funroll-loops -Wcast-align $(PROFILE) -Winline\ |
|
261 |
+ -Wall \ |
|
262 |
+ #if gcc 3.0 |
|
263 |
+ifeq ($(CC_SHORTVER), 3.0) |
|
264 |
+ CFLAGS+= -mcpu=strongarm1100 |
|
265 |
+ #-mcpu=athlon |
|
266 |
+else |
|
267 |
+ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5]) |
|
268 |
+$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \ |
|
269 |
+ for better results) |
|
270 |
+ |
|
271 |
+ CFLAGS+= |
|
272 |
+else |
|
273 |
+ #really old version |
|
274 |
+$(warning You are using an old and unsupported gcc \ |
|
275 |
+ version ($(CC_SHORTVER)), compile at your own risk!) |
|
276 |
+ |
|
277 |
+endif # CC_SHORTVER, 2.9x |
|
278 |
+endif # CC_SHORTVER, 3.0 |
|
279 |
+ |
|
280 |
+else # CC_NAME, gcc |
|
281 |
+ #other compilers |
|
282 |
+$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) |
|
283 |
+endif #CC_NAME, gcc |
|
284 |
+endif #ARCH, i386 |
|
285 |
+ |
|
286 |
+ |
|
287 |
+ |
|
255 | 288 |
|
256 | 289 |
|
257 | 290 |
# setting LDFLAGS |
... | ... |
@@ -71,13 +71,14 @@ static inline void shm_lock() |
71 | 71 |
{ |
72 | 72 |
|
73 | 73 |
struct sembuf sop; |
74 |
+ int ret; |
|
74 | 75 |
|
75 | 76 |
sop.sem_num=0; |
76 | 77 |
sop.sem_op=-1; /*down*/ |
77 | 78 |
sop.sem_flg=0 /*SEM_UNDO*/; |
78 | 79 |
again: |
79 |
- semop(shm_semid, &sop, 1); |
|
80 |
-#if 0 |
|
80 |
+ ret=semop(shm_semid, &sop, 1); |
|
81 |
+ |
|
81 | 82 |
switch(ret){ |
82 | 83 |
case 0: /*ok*/ |
83 | 84 |
break; |
... | ... |
@@ -88,7 +89,6 @@ again: |
88 | 89 |
LOG(L_ERR, "ERROR: sh_lock: error waiting on semaphore: %s\n", |
89 | 90 |
strerror(errno)); |
90 | 91 |
} |
91 |
-#endif |
|
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
|
... | ... |
@@ -96,13 +96,13 @@ again: |
96 | 96 |
static inline void shm_unlock() |
97 | 97 |
{ |
98 | 98 |
struct sembuf sop; |
99 |
+ int ret; |
|
99 | 100 |
|
100 | 101 |
sop.sem_num=0; |
101 | 102 |
sop.sem_op=1; /*up*/ |
102 | 103 |
sop.sem_flg=0 /*SEM_UNDO*/; |
103 | 104 |
again: |
104 |
- semop(shm_semid, &sop, 1); |
|
105 |
-#if 0 |
|
105 |
+ ret=semop(shm_semid, &sop, 1); |
|
106 | 106 |
/*should ret immediately*/ |
107 | 107 |
switch(ret){ |
108 | 108 |
case 0: /*ok*/ |
... | ... |
@@ -114,7 +114,6 @@ again: |
114 | 114 |
LOG(L_ERR, "ERROR: sh_lock: error waiting on semaphore: %s\n", |
115 | 115 |
strerror(errno)); |
116 | 116 |
} |
117 |
-#endif |
|
118 | 117 |
} |
119 | 118 |
|
120 | 119 |
/* ret -1 on erro*/ |
... | ... |
@@ -8,7 +8,7 @@ |
8 | 8 |
debug=3 # debug level (cmd line: -dddddddddd) |
9 | 9 |
#fork=yes # (cmd. line: -D) |
10 | 10 |
fork=yes |
11 |
-#fork=no |
|
11 |
+fork=no |
|
12 | 12 |
log_stderror=yes # (cmd line: -E) |
13 | 13 |
#log_stderror=no # (cmd line: -E) |
14 | 14 |
|
... | ... |
@@ -18,9 +18,10 @@ 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 | 23 |
#listen=192.168.57.33 |
24 |
+listen=192.168.57.72 |
|
24 | 25 |
loop_checks=0 |
25 | 26 |
# for more info: sip_router -h |
26 | 27 |
|