Browse code

- warnings fixed for gcc-3.4 - older solaris support (5.6)

Andrei Pelinescu-Onciul authored on 08/12/2004 19:06:12
Showing 8 changed files
... ...
@@ -45,12 +45,12 @@ skip_cfg_install?=
45 45
 skip_modules?=
46 46
 
47 47
 # if not set on the cmd. line or the env, exclude this modules:
48
-exclude_modules?= 			cpl ext extcmd avp_radius \
48
+exclude_modules?= 			cpl ext extcmd \
49 49
 							postgres snmp \
50 50
 							im \
51 51
 							jabber mysql \
52 52
 							cpl-c \
53
-							auth_radius group_radius uri_radius \
53
+							auth_radius group_radius uri_radius avp_radius \
54 54
 							pa
55 55
 # always exclude the CVS dir
56 56
 override exclude_modules+= CVS $(skip_modules)
... ...
@@ -50,7 +50,7 @@ MAIN_NAME=ser
50 50
 VERSION = 0
51 51
 PATCHLEVEL = 8
52 52
 SUBLEVEL =   99
53
-EXTRAVERSION = -dev24
53
+EXTRAVERSION = -dev25
54 54
 
55 55
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
56 56
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
... ...
@@ -778,7 +778,14 @@ endif
778 778
 ifeq ($(CC_NAME), suncc)
779 779
 	LIBS= -lfast -ldl -lresolv
780 780
 endif
781
-	LIBS+= -L/usr/local/lib -lfl -lxnet -lrt -lnsl 
781
+	OLD_SOLARIS= $(shell echo "$(OSREL)" | \
782
+				sed -e 's/^5\.[0-6][^0-9]*$$/yes/' )
783
+	LIBS+= -L/usr/local/lib -lfl -lxnet -lnsl 
784
+ifeq	($(OLD_SOLARIS), yes)
785
+		LIBS+=-lposix4
786
+else
787
+		LIBS+=-lrt
788
+endif
782 789
 	# -lrt needed for sched_yield
783 790
 endif
784 791
 
... ...
@@ -140,7 +140,7 @@ static inline
140 140
 #ifdef DBG_F_MALLOC 
141 141
 void fm_split_frag(struct fm_block* qm, struct fm_frag* frag,
142 142
 					unsigned long size,
143
-					char* file, char* func, unsigned int line)
143
+					const char* file, const char* func, unsigned int line)
144 144
 #else
145 145
 void fm_split_frag(struct fm_block* qm, struct fm_frag* frag,
146 146
 					unsigned long size)
... ...
@@ -234,7 +234,7 @@ struct fm_block* fm_malloc_init(char* address, unsigned long size)
234 234
 
235 235
 #ifdef DBG_F_MALLOC
236 236
 void* fm_malloc(struct fm_block* qm, unsigned long size,
237
-					char* file, char* func, unsigned int line)
237
+					const char* file, const char* func, unsigned int line)
238 238
 #else
239 239
 void* fm_malloc(struct fm_block* qm, unsigned long size)
240 240
 #endif
... ...
@@ -297,7 +297,7 @@ found:
297 297
 
298 298
 
299 299
 #ifdef DBG_F_MALLOC
300
-void fm_free(struct fm_block* qm, void* p, char* file, char* func, 
300
+void fm_free(struct fm_block* qm, void* p, const char* file, const char* func, 
301 301
 				unsigned int line)
302 302
 #else
303 303
 void fm_free(struct fm_block* qm, void* p)
... ...
@@ -338,7 +338,7 @@ void fm_free(struct fm_block* qm, void* p)
338 338
 
339 339
 #ifdef DBG_F_MALLOC
340 340
 void* fm_realloc(struct fm_block* qm, void* p, unsigned long size,
341
-					char* file, char* func, unsigned int line)
341
+					const char* file, const char* func, unsigned int line)
342 342
 #else
343 343
 void* fm_realloc(struct fm_block* qm, void* p, unsigned long size)
344 344
 #endif
... ...
@@ -81,8 +81,8 @@ struct fm_frag{
81 81
 		long reserved;
82 82
 	}u;
83 83
 #ifdef DBG_F_MALLOC
84
-	char* file;
85
-	char* func;
84
+	const char* file;
85
+	const char* func;
86 86
 	unsigned long line;
87 87
 	unsigned long check;
88 88
 #endif
... ...
@@ -113,13 +113,13 @@ struct fm_block* fm_malloc_init(char* address, unsigned long size);
113 113
 
114 114
 #ifdef DBG_F_MALLOC
115 115
 void* fm_malloc(struct fm_block*, unsigned long size,
116
-					char* file, char* func, unsigned int line);
116
+					const char* file, const char* func, unsigned int line);
117 117
 #else
118 118
 void* fm_malloc(struct fm_block*, unsigned long size);
119 119
 #endif
120 120
 
121 121
 #ifdef DBG_F_MALLOC
122
-void  fm_free(struct fm_block*, void* p, char* file, char* func, 
122
+void  fm_free(struct fm_block*, void* p, const char* file, const char* func, 
123 123
 				unsigned int line);
124 124
 #else
125 125
 void  fm_free(struct fm_block*, void* p);
... ...
@@ -127,7 +127,7 @@ void  fm_free(struct fm_block*, void* p);
127 127
 
128 128
 #ifdef DBG_F_MALLOC
129 129
 void*  fm_realloc(struct fm_block*, void* p, unsigned long size, 
130
-					char* file, char* func, unsigned int line);
130
+					const char* file, const char* func, unsigned int line);
131 131
 #else
132 132
 void*  fm_realloc(struct fm_block*, void* p, unsigned long size);
133 133
 #endif
... ...
@@ -301,7 +301,7 @@ static inline struct qm_frag* qm_find_free(struct qm_block* qm,
301 301
 static inline
302 302
 #ifdef DBG_QM_MALLOC
303 303
 int split_frag(struct qm_block* qm, struct qm_frag* f, unsigned long new_size,
304
-				char* file, char* func, unsigned int line)
304
+				const char* file, const char* func, unsigned int line)
305 305
 #else
306 306
 int split_frag(struct qm_block* qm, struct qm_frag* f, unsigned long new_size)
307 307
 #endif
... ...
@@ -348,7 +348,7 @@ int split_frag(struct qm_block* qm, struct qm_frag* f, unsigned long new_size)
348 348
 
349 349
 #ifdef DBG_QM_MALLOC
350 350
 void* qm_malloc(struct qm_block* qm, unsigned long size,
351
-					char* file, char* func, unsigned int line)
351
+					const char* file, const char* func, unsigned int line)
352 352
 #else
353 353
 void* qm_malloc(struct qm_block* qm, unsigned long size)
354 354
 #endif
... ...
@@ -411,7 +411,7 @@ void* qm_malloc(struct qm_block* qm, unsigned long size)
411 411
 
412 412
 
413 413
 #ifdef DBG_QM_MALLOC
414
-void qm_free(struct qm_block* qm, void* p, char* file, char* func, 
414
+void qm_free(struct qm_block* qm, void* p, const char* file, const char* func, 
415 415
 				unsigned int line)
416 416
 #else
417 417
 void qm_free(struct qm_block* qm, void* p)
... ...
@@ -496,7 +496,7 @@ void qm_free(struct qm_block* qm, void* p)
496 496
 
497 497
 #ifdef DBG_QM_MALLOC
498 498
 void* qm_realloc(struct qm_block* qm, void* p, unsigned long size,
499
-					char* file, char* func, unsigned int line)
499
+					const char* file, const char* func, unsigned int line)
500 500
 #else
501 501
 void* qm_realloc(struct qm_block* qm, void* p, unsigned long size)
502 502
 #endif
... ...
@@ -83,8 +83,8 @@ struct qm_frag{
83 83
 		long is_free;
84 84
 	}u;
85 85
 #ifdef DBG_QM_MALLOC
86
-	char* file;
87
-	char* func;
86
+	const char* file;
87
+	const char* func;
88 88
 	unsigned long line;
89 89
 	unsigned long check;
90 90
 #endif
... ...
@@ -128,21 +128,21 @@ struct qm_block{
128 128
 struct qm_block* qm_malloc_init(char* address, unsigned long size);
129 129
 
130 130
 #ifdef DBG_QM_MALLOC
131
-void* qm_malloc(struct qm_block*, unsigned long size, char* file, char* func, 
132
-					unsigned int line);
131
+void* qm_malloc(struct qm_block*, unsigned long size, const char* file,
132
+					const char* func, unsigned int line);
133 133
 #else
134 134
 void* qm_malloc(struct qm_block*, unsigned long size);
135 135
 #endif
136 136
 
137 137
 #ifdef DBG_QM_MALLOC
138
-void  qm_free(struct qm_block*, void* p, char* file, char* func, 
138
+void  qm_free(struct qm_block*, void* p, const char* file, const char* func, 
139 139
 				unsigned int line);
140 140
 #else
141 141
 void  qm_free(struct qm_block*, void* p);
142 142
 #endif
143 143
 #ifdef DBG_QM_MALLOC
144 144
 void* qm_realloc(struct qm_block*, void* p, unsigned long size,
145
-				char* file, char* func, unsigned int line);
145
+					const char* file, const char* func, unsigned int line);
146 146
 #else
147 147
 void* qm_realloc(struct qm_block*, void* p, unsigned long size);
148 148
 #endif
... ...
@@ -91,7 +91,8 @@ inline static void* sh_realloc(void* p, unsigned int size)
91 91
 */
92 92
 
93 93
 #ifdef DBG_QM_MALLOC
94
-void* _shm_resize( void* p, unsigned int s, char* file, char* func, int line)
94
+void* _shm_resize( void* p, unsigned int s, const char* file, const char* func,
95
+							int line)
95 96
 #else
96 97
 void* _shm_resize( void* p , unsigned int s)
97 98
 #endif
... ...
@@ -127,7 +127,7 @@ void shm_mem_destroy();
127 127
 
128 128
 
129 129
 inline static void* _shm_malloc(unsigned int size, 
130
-	char *file, char *function, int line )
130
+	const char *file, const char *function, int line )
131 131
 {
132 132
 	void *p;
133 133
 	
... ...
@@ -168,7 +168,8 @@ do { \
168 168
 
169 169
 
170 170
 
171
-void* _shm_resize(void* ptr, unsigned int size, char* f, char* fn, int line);
171
+void* _shm_resize(void* ptr, unsigned int size, const char* f, const char* fn,
172
+					int line);
172 173
 #define shm_resize(_p, _s ) _shm_resize((_p), (_s), \
173 174
 		__FILE__, __FUNCTION__, __LINE__ )
174 175
 /*#define shm_resize(_p, _s ) shm_realloc( (_p), (_s))*/