浏览代码

- fixed cfg.y for icc (hack)
- many other small fixes

Andrei Pelinescu-Onciul 23 年之前
父节点
当前提交
f3f0a4de1a
共有 6 个文件被更改,包括 10 次插入7 次删除
  1. 2 0
      INSTALL
  2. 1 2
      Makefile.defs
  3. 2 2
      TODO
  4. 3 0
      cfg.y
  5. 1 1
      main.c
  6. 1 2
      modules/tm/uac.c

+ 2 - 0
INSTALL

@@ -22,6 +22,8 @@ Requirements:
 - GNU tar ("gtar" on Solaris) and gzip if you want "make tar" to work
 - 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)
 
 
 OS Notes:

+ 1 - 2
Makefile.defs

@@ -459,7 +459,6 @@ ifeq ($(YACC),)
 	YACC=bison
 endif
 YACC_FLAGS=-d -b cfg
-# on linux and freebsd keep it empty (e.g. LIBS= )
 # on solaris add -lxnet (e.g. LIBS= -lxnet)
 LIBS= -lfl -ldl -lresolv
 
@@ -484,7 +483,7 @@ ifeq  ($(OS), solaris)
 ifeq ($(CC_NAME), suncc)
 	LIBS= -lfast -ldl -lresolv
 endif
-	LIBS+= -L/usr/local/lib -lfl -L/usr/lib/mysql -lxnet -lrt -lnsl 
+	LIBS+= -L/usr/local/lib -lfl -lxnet -lrt -lnsl 
 	# -lrt needed for sched_yield
 endif
 

+ 2 - 2
TODO

@@ -32,7 +32,7 @@ x fix via address someday
 - fix listen=0.0.0.0 case
 x forward to received= if present
 - make it easier to register a statically linkable module.
-- add support for -u user and -g group (not only -u uid, -g uid)
+x add support for -u user and -g group (not only -u uid, -g uid)
 - change uid/gid after opening the sockets
 - add -t, -w, -u -g equivalents to the config file
 - exec improvments (add format strings to it)
@@ -47,7 +47,7 @@ x handle SIGCHLD, SIGHUP
 - try & use native compiler & ld if possible
 
 x make install
-- init.d scripts (and rc.local? for *BSD or Slackware)
+x init.d scripts (and rc.local? for *BSD or Slackware)
 x man page
 - autoconf scripts
 x Debian package build files

+ 3 - 0
cfg.y

@@ -29,6 +29,9 @@
 #include <dmalloc.h>
 #endif
 
+/* hack to avoid alloca usage in the generated C file (needed for compiler
+ with no built in alloca, like icc*/
+#undef _ALLOCA_H
 
 struct id_list{
 	char* s;

+ 1 - 1
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

+ 1 - 2
modules/tm/uac.c

@@ -151,7 +151,7 @@ int uac_init() {
 int uac_child_init( int rank ) 
 {
 	callid_suffix_len=snprintf(callid_suffix,CALLID_SUFFIX_LEN,
-			"%c%d@%*s", CID_SEP, my_pid(), 
+			"%c%d@%.*s", CID_SEP, my_pid(), 
 			sock_info[bind_idx].address_str.len,
 			sock_info[bind_idx].address_str.s );
 	if (callid_suffix_len==-1) {
@@ -219,7 +219,6 @@ int t_uac( str *msg_type, str *dst,
 	DBG("DEBUG: sufix_len = %d\n",callid_suffix_len);
 	DBG("DEBUG: NEW CALLID:%.*s[%d]:\n", callid_s.len, callid_s.s 
 		, callid_s.len);
-
 	new_cell = build_cell( NULL ) ; 
 	if (!new_cell) {
 		ret=E_OUT_OF_MEM;