forgot to cc the list...
Am 11.08.2010 20:11, schrieb Andrei Pelinescu-Onciul:
> On Aug 11, 2010 at 18:39, Klaus Darilion<klaus.mailinglists(a)pernau.at> wrote:
>>
>>
>> Am 11.08.2010 17:19, schrieb Andrei Pelinescu-Onciul:
>>> On Aug 11, 2010 at 17:13, Klaus Darilion<klaus.mailinglists(a)pernau.at> wrote:
>>>> Hi Andrei!
>>>>
>>>> Am 11.08.2010 16:18, schrieb Andrei Pelinescu-Onciul:
>>>>> + - all the module functions can now be called with any constant expression
>>>>> + as parameters. E.g.: f("7 *" +" 6 = " + 7 * 6);
>>>>
>>>> What is the result of this example?
>>>
>>> f("7 * 6 = 42")
>>
>>
>> ... + 7 * 6)
>> ^ ^
>> | |
>> A B
>>
>> IMO it is very confusing (if not even wrong) that A is a string
>> concat and B is a arithmetic operation. What happens with:
>>
>> ... + 7 + 6) ?
>
> f("7 + 6 = 76") :-)
>
> but
>
> f("7 +" +" 6 = " + (7 + 6)) is f("7 + 6 = 13"), as expected.
>
> I agree it's confusing, but when I wanted to add a separate operator for
> string concat (e.g. '.') lots of people opposed it on the grounds that
> it will be too difficult for a script writer to use 2 different operators
> (or something similar).
> Now we have auto-conversion everywhere...
>
> Maybe we can revisit this and the option of declaring only typed
> variable for a future release.
I can't remember if I was for or against a dedicated concat parameter,
but now I think a dedicated parameter would be good. '.' might be
confusing as well once we support float numbers.
Is it possible to analyze how sr evaluates the term?
regards
klaus
Hi.
I have ported kamailio to Dragonfly BSD and fixed a couple of bugs in
the build system in the process. I have 4 patches to the Makefiles
which I created for kamailio-3.0.1, but have verified will apply to the
current master branch. Two are bug fixes and the other 2 are to get it
to compile and run on Dragonfly.
I have attached all 4 patches to this email. There are comments in
the top of each of the patches about what they do. All patches can be
applied from the root of the source tree.
It turns out that kamailio is not going to serve our needs at this time,
so I don't have much more time to put into it. However, I am in hopes
that the developers will utilize the patches for Dragonfly as well.
I would like to see kamailio natively support Dragonfly BSD for the
benefit of both communities and in case we ever need it ourselves in the
future, since our environment is all Dragonfly BSD based.
The patches primarily just make kamailio treat Dragonfly the same as
FreeBSD.
kamailio-3.0.1 compiled, installed, and ran successfully with these
patches. However, after applying them to todays master branch from the
git repository, make was successful, but "make install" errored with
install -m 755 msilo.so
/u1/falcon/ports/kamailio-20100724/package/kamailio-20100724/kamailio-20100724/usr/pkg/lib/ser/modules_s
CC (gcc) [M nathelper.so] nathelper.o
CC (gcc) [M nathelper.so] natping.o
CC (gcc) [M nathelper.so] nhelpr_funcs.o
CC (gcc) [M nathelper.so] rtpproxy_stream.o
rtpproxy_stream.c: In function 'rtpproxy_stream':
rtpproxy_stream.c:61: error: array type has incomplete element type
rtpproxy_stream.c:61: warning: unused variable 'v'
rtpproxy_stream.c: In function 'rtpproxy_stop_stream':
rtpproxy_stream.c:151: error: array type has incomplete element type
rtpproxy_stream.c:151: warning: unused variable 'v'
gmake[1]: *** [rtpproxy_stream.o] Error 1
gmake: *** [install-modules_s] Error 1
I don't know if it is Dragonfly related or if it is just a temporary bug
introduced in the current master branch.
Additional notes:
To successfully compile on Dragonfly BSD after applying the patches
to kamailio-3.0.1 these are the commands I used.
# export CFLAGS=-D__FreeBSD__
# gmake prefix=/usr/pkg
# gmake prefix=/usr/pkg install
Regards,
Vince
Module: sip-router
Branch: master
Commit: c07c2b5e599a2b97fc21d04731f1f9d409859d43
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c07c2b5…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Aug 13 11:45:39 2010 +0200
core: DragonFly kqueue support enabled
- fixed kqueue support check for DragonFly (seems to be always
supported since it was forked from FreeBSD 4.8).
- in dragonfly case define both __OS_freebsd and __OS_dragonfly so
that we can make some exceptions for dragonfly (e.g. no >= 4.1
version check at runtime before enabling kqueue).
- assume SCTP in 2.6 is at least on par with SCTP in FreeBSD 7.1.
---
Makefile.defs | 27 +++++++++++++++------------
io_wait.c | 10 ++++++++--
2 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index 440179c..73edb4b 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -626,18 +626,20 @@ $(info target architecture <$(ARCH)>, host architecture <$(HOST_ARCH)>)
# adds support for Application Server interface
# Sometimes is needes correct non-quoted $OS. HACK: gcc translates known OS to number ('linux'), so there is added underscore
-# Tell it that dragonflybsd is equivalent to compiling for freebsd.
-# This will cause __OS_freebsd to be defined below.
ifeq ($(OS), dragonfly)
- EQUIV_OS := freebsd
+ # Tell it that dragonflybsd is equivalent to compiling for freebsd, but
+ # define also __OS_dragonfly (for fine-tunning like kqueue support).
+ os_defs := -D__OS_freebsd -D__OS_dragonfly
+ EQUIV_OS = freebsd
else
- EQUIV_OS := $(OS)
+ os_defs := -D__OS_$(OS)
+ EQUIV_OS = $(OS)
endif
C_DEFS= $(extra_defs) \
-DNAME='"$(MAIN_NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \
-DOS='$(OS)_' -DOS_QUOTED='"$(OS)"' -DCOMPILER='"$(CC_VER)"'\
- -D__CPU_$(ARCH) -D__OS_$(EQUIV_OS) \
+ -D__CPU_$(ARCH) $(os_defs) \
-DSER_VER=$(SER_VER) \
-DCFG_DIR='"$(cfg_target)"'\
-DPKG_MALLOC \
@@ -1820,11 +1822,9 @@ ifeq ($(OS), dragonfly)
else
LIBS= #dlopen is in libc
endif
- # check for ver >= 4.1
- ifeq ($(shell [ $(OSREL_N) -gt 4001 ] && echo has_kqueue), has_kqueue)
- ifeq ($(NO_KQUEUE),)
- C_DEFS+=-DHAVE_KQUEUE
- endif
+ # dragonfly was forked from freebsd 4.8 => all version have kqueue
+ ifeq ($(NO_KQUEUE),)
+ C_DEFS+=-DHAVE_KQUEUE
endif
ifeq ($(NO_SELECT),)
C_DEFS+=-DHAVE_SELECT
@@ -1840,8 +1840,11 @@ ifeq ($(OS), dragonfly)
$(info "sctp development files not installed -- sctp disabled")
override SCTP :=
endif
- ifeq ($(shell [ $(OSREL_N) -lt 7000 ] && echo sctp), sctp)
-$(info "old freebsd version (>= 7.0 needed) -- sctp disabled")
+ # FIXME: don't know what's the status of SCTP on dragonfly
+ # (we suppose the 2.6 version is >= the version in
+ # in freebsd 7.0)
+ ifeq ($(shell [ $(OSREL_N) -lt 2006 ] && echo sctp), sctp)
+$(info "old dragonfly version (>= 2.6 needed) -- sctp disabled")
override SCTP :=
endif
diff --git a/io_wait.c b/io_wait.c
index 0c73402..62cdee9 100644
--- a/io_wait.c
+++ b/io_wait.c
@@ -340,10 +340,13 @@ char* check_poll_method(enum poll_types poll_method)
#ifndef HAVE_KQUEUE
ret="kqueue not supported, try re-compiling with -DHAVE_KQUEUE";
#else
- /* only in FreeBSD 4.1, NETBSD 2.0, OpenBSD 2.9, Darwin */
+ /* only in FreeBSD 4.1, NETBSD 2.0, OpenBSD 2.9, Darwin, DragonFly */
#ifdef __OS_freebsd
+ /* all DragonFly versions have kqueque */
+ #ifndef __OS_dragonfly
if (_os_ver<0x0401) /* if ver < 4.1 */
ret="kqueue not supported on FreeBSD < 4.1";
+ #endif /* __OS_dragonfly */
#elif defined (__OS_netbsd)
if (_os_ver<0x020000) /* if ver < 2.0 */
ret="kqueue not supported on NetBSD < 2.0";
@@ -388,9 +391,12 @@ enum poll_types choose_poll_method()
#endif
#ifdef HAVE_KQUEUE
if (poll_method==0)
- /* only in FreeBSD 4.1, NETBSD 2.0, OpenBSD 2.9, Darwin */
+ /* only in FreeBSD 4.1, NETBSD 2.0, OpenBSD 2.9, Darwin, DragonFly */
#ifdef __OS_freebsd
+ /* all DragonFly versions have kqueque */
+ #ifndef __OS_dragonfly
if (_os_ver>=0x0401) /* if ver >= 4.1 */
+ #endif /**__OS_dragonfly
#elif defined (__OS_netbsd)
if (_os_ver>=0x020000) /* if ver >= 2.0 */
#elif defined (__OS_openbsd)