(OPENZAP-11) use all the cflags from configure so we can build ss7 boost on freebsd and fix other code issues noted by more warnings from those cflags
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@530 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
16e3f8b852
commit
e8fd83456d
|
@ -176,8 +176,6 @@ PIKA_LIB=$(shell ls /usr/lib/libpikahmpapi.so 2>/dev/null)
|
|||
all: $(MYLIB) analogmod isdnmod boostmod ztmod wpmod
|
||||
|
||||
$(MYLIB): $(OBJS) $(HEADERS) $(SOURCES)
|
||||
#ar rcs $(MYLIB) $(OBJS) $(ADD_OBJS)
|
||||
#ranlib $(MYLIB)
|
||||
$(CC) -shared -Wl,-x -o $(MYLIB) $(OBJS) $(ADD_OBJS) -ldl
|
||||
|
||||
testapp: $(SRC)/testapp.c $(MYLIB)
|
||||
|
@ -255,35 +253,35 @@ uninstall:
|
|||
@rm -fr $(DESTDIR)$(PREFIX)
|
||||
|
||||
$(SRC)/ozmod/ozmod_skel/ozmod_skel.so: $(SRC)/ozmod/ozmod_skel/ozmod_skel.c
|
||||
$(CC) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_skel/ozmod_skel.c -o $(SRC)/ozmod/ozmod_skel/ozmod_skel.so -shared -Wl,-x -lm -lpthread -ldl -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
$(CC) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_skel/ozmod_skel.c -o $(SRC)/ozmod/ozmod_skel/ozmod_skel.so -shared -Wl,-x -lm -lpthread -ldl -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
skelmod: $(SRC)/ozmod/ozmod_skel/ozmod_skel.so
|
||||
|
||||
|
||||
$(SRC)/ozmod/ozmod_zt/ozmod_zt.so: $(SRC)/ozmod/ozmod_zt/ozmod_zt.c
|
||||
$(CC) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_zt/ozmod_zt.c -o $(SRC)/ozmod/ozmod_zt/ozmod_zt.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
$(CC) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_zt/ozmod_zt.c -o $(SRC)/ozmod/ozmod_zt/ozmod_zt.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
ztmod: $(SRC)/ozmod/ozmod_zt/ozmod_zt.so
|
||||
|
||||
$(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so: $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.c
|
||||
$(CC) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.c -o $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
$(CC) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.c -o $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
wpmod: $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so
|
||||
|
||||
$(SRC)/ozmod/ozmod_pika/ozmod_pika.so: $(SRC)/ozmod/ozmod_pika/ozmod_pika.c
|
||||
$(CC) -I$(PIKA_DIR) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_pika/ozmod_pika.c -o $(SRC)/ozmod/ozmod_pika/ozmod_pika.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) $(PIKA_LIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
$(CC) -I$(PIKA_DIR) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_pika/ozmod_pika.c -o $(SRC)/ozmod/ozmod_pika/ozmod_pika.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) $(PIKA_LIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
|
||||
pikamod: $(SRC)/ozmod/ozmod_pika/ozmod_pika.so
|
||||
|
||||
$(ISDN_OBJS): $(ISDN_HEADERS) $(ISDN_SOURCES) $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.c
|
||||
|
||||
$(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so: $(MYLIB) $(ISDN_OBJS)
|
||||
$(CC) -I$(SRC)/isdn/include/ $(INCS) $(ZAP_CFLAGS) -L. $(ISDN_OBJS) $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.c -o $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
$(CC) -I$(SRC)/isdn/include/ $(INCS) $(CFLAGS) -L. $(ISDN_OBJS) $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.c -o $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
isdnmod: $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so
|
||||
|
||||
$(SRC)/ozmod/ozmod_analog/ozmod_analog.so: $(MYLIB) $(ANALOG_OBJS) $(SRC)/ozmod/ozmod_analog/ozmod_analog.c
|
||||
$(CC) -I$(SRC)/analog/include/ $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_analog/ozmod_analog.c -o $(SRC)/ozmod/ozmod_analog/ozmod_analog.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
$(CC) -I$(SRC)/analog/include/ $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_analog/ozmod_analog.c -o $(SRC)/ozmod/ozmod_analog/ozmod_analog.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
analogmod: $(SRC)/ozmod/ozmod_analog/ozmod_analog.so
|
||||
|
||||
$(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so: $(MYLIB) $(BOOST_OBJS) $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c
|
||||
$(CC) -I/ozmod/ozmod_ss7_boost $(INCS) $(ZAP_CFLAGS) -L. $(BOOST_OBJS) $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c -o $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
$(CC) -I/ozmod/ozmod_ss7_boost $(INCS) $(CFLAGS) -L. $(BOOST_OBJS) $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c -o $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib
|
||||
boostmod: $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so
|
||||
|
||||
|
||||
|
|
|
@ -545,7 +545,7 @@ zap_status_t zap_channel_send_fsk_data(zap_channel_t *zchan, zap_fsk_data_state_
|
|||
zap_status_t zap_channel_clear_token(zap_channel_t *zchan, const char *token);
|
||||
zap_status_t zap_channel_add_token(zap_channel_t *zchan, char *token, int end);
|
||||
zap_status_t zap_channel_set_state(zap_channel_t *zchan, zap_channel_state_t state, int lock);
|
||||
zap_status_t zap_span_load_tones(zap_span_t *span, char *mapname);
|
||||
zap_status_t zap_span_load_tones(zap_span_t *span, const char *mapname);
|
||||
zap_size_t zap_channel_dequeue_dtmf(zap_channel_t *zchan, char *dtmf, zap_size_t len);
|
||||
zap_status_t zap_channel_queue_dtmf(zap_channel_t *zchan, const char *dtmf);
|
||||
void zap_channel_flush_dtmf(zap_channel_t *zchan);
|
||||
|
|
|
@ -82,10 +82,10 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
|
|||
//zap_status_t zap_analog_configure_span(zap_span_t *span, char *tonemap, uint32_t digit_timeout, uint32_t max_dialstr, zio_signal_cb_t sig_cb)
|
||||
{
|
||||
zap_analog_data_t *analog_data;
|
||||
char *tonemap = "us";
|
||||
const char *tonemap = "us";
|
||||
uint32_t digit_timeout = 10;
|
||||
uint32_t max_dialstr = 11;
|
||||
char *var, *val;
|
||||
const char *var, *val;
|
||||
int *intval;
|
||||
|
||||
assert(sig_cb != NULL);
|
||||
|
@ -107,7 +107,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
|
|||
memset(analog_data, 0, sizeof(*analog_data));
|
||||
assert(analog_data != NULL);
|
||||
|
||||
while(var = va_arg(ap, char *)) {
|
||||
while ((var = va_arg(ap, char *))) {
|
||||
if (!strcasecmp(var, "tonemap")) {
|
||||
if (!(val = va_arg(ap, char *))) {
|
||||
break;
|
||||
|
|
|
@ -1365,7 +1365,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
|
|||
isdn_data->mode = Q931_TE;
|
||||
dialect = Q931_Dialect_National;
|
||||
|
||||
while(var = va_arg(ap, char *)) {
|
||||
while((var = va_arg(ap, char *))) {
|
||||
if (!strcasecmp(var, "mode")) {
|
||||
if (!(val = va_arg(ap, char *))) {
|
||||
break;
|
||||
|
|
|
@ -1091,12 +1091,12 @@ static zap_state_map_t boost_state_map = {
|
|||
static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span)
|
||||
{
|
||||
zap_ss7_boost_data_t *ss7_boost_data = NULL;
|
||||
char *local_ip = "127.0.0.65", *remote_ip = "127.0.0.66";
|
||||
const char *local_ip = "127.0.0.65", *remote_ip = "127.0.0.66";
|
||||
int local_port = 5300, remote_port = 5300;
|
||||
char *var, *val;
|
||||
int *intval;
|
||||
|
||||
while(var = va_arg(ap, char *)) {
|
||||
while((var = va_arg(ap, char *))) {
|
||||
if (!strcasecmp(var, "local_ip")) {
|
||||
if (!(val = va_arg(ap, char *))) {
|
||||
break;
|
||||
|
|
|
@ -349,7 +349,7 @@ zap_status_t zap_span_close_all(void)
|
|||
return i ? ZAP_SUCCESS : ZAP_FAIL;
|
||||
}
|
||||
|
||||
zap_status_t zap_span_load_tones(zap_span_t *span, char *mapname)
|
||||
zap_status_t zap_span_load_tones(zap_span_t *span, const char *mapname)
|
||||
{
|
||||
zap_config_t cfg;
|
||||
char *var, *val;
|
||||
|
|
Loading…
Reference in New Issue