mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
issue #4678
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2005-11-01 Kevin P. Fleming <kpfleming@digium.com>
|
2005-11-01 Kevin P. Fleming <kpfleming@digium.com>
|
||||||
|
|
||||||
|
* many files: more Cygwin build system support (issue #4678)
|
||||||
|
|
||||||
* apps/app_parkandannounce.c (parkandannounce_exec): supply parent channel to ast_request_and_dial so channel variables can be inherited (issue #5564)
|
* apps/app_parkandannounce.c (parkandannounce_exec): supply parent channel to ast_request_and_dial so channel variables can be inherited (issue #5564)
|
||||||
* include/asterisk/channel.h: add parent_channel field
|
* include/asterisk/channel.h: add parent_channel field
|
||||||
* channel.c (__ast_request_and_dial): use parent_channel field to inherit variables into new channel
|
* channel.c (__ast_request_and_dial): use parent_channel field to inherit variables into new channel
|
||||||
|
21
Makefile
21
Makefile
@@ -216,6 +216,7 @@ endif
|
|||||||
INCLUDE+=-Iinclude -I../include
|
INCLUDE+=-Iinclude -I../include
|
||||||
ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
|
ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
|
||||||
ASTCFLAGS+=$(OPTIMIZE)
|
ASTCFLAGS+=$(OPTIMIZE)
|
||||||
|
ASTOBJ=-o asterisk
|
||||||
|
|
||||||
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
||||||
PROC=$(shell uname -m)
|
PROC=$(shell uname -m)
|
||||||
@@ -263,6 +264,15 @@ ifeq (${OSARCH},SunOS)
|
|||||||
INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
|
INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(findstring CYGWIN,${OSARCH}),CYGWIN)
|
||||||
|
CYGLOADER=cygwin_a
|
||||||
|
OSARCH=CYGWIN
|
||||||
|
ASTOBJ=-shared -o asterisk.dll -Wl,--out-implib=libasterisk.dll.a -Wl,--export-all-symbols
|
||||||
|
ASTLINK=
|
||||||
|
LIBS+=-lpthread -lncurses -lm -lresolv
|
||||||
|
ASTSBINDIR=${MODULES_DIR}
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
|
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
|
||||||
ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
|
ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
|
||||||
endif
|
endif
|
||||||
@@ -471,8 +481,11 @@ stdtime/libtime.a: FORCE
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
|
cygwin_a:
|
||||||
$(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
|
$(MAKE) -C cygwin all
|
||||||
|
|
||||||
|
asterisk: ${CYGLOADER} editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
|
||||||
|
$(CC) $(DEBUG) ${ASTOBJ} $(ASTLINK) $(OBJS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
|
||||||
|
|
||||||
muted: muted.o
|
muted: muted.o
|
||||||
$(CC) $(AUDIO_LIBS) -o muted muted.o
|
$(CC) $(AUDIO_LIBS) -o muted muted.o
|
||||||
@@ -595,7 +608,9 @@ bininstall: all
|
|||||||
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
|
||||||
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
|
||||||
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
|
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
|
||||||
$(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/
|
if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi
|
||||||
|
if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi
|
||||||
|
if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
|
||||||
ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
|
ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
|
||||||
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
|
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
|
||||||
$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
|
$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
|
||||||
|
1
acl.c
1
acl.c
@@ -68,6 +68,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include "asterisk/utils.h"
|
#include "asterisk/utils.h"
|
||||||
#include "asterisk/lock.h"
|
#include "asterisk/lock.h"
|
||||||
#include "asterisk/srv.h"
|
#include "asterisk/srv.h"
|
||||||
|
#include "asterisk/compat.h"
|
||||||
|
|
||||||
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||||
AST_MUTEX_DEFINE_STATIC(routeseq_lock);
|
AST_MUTEX_DEFINE_STATIC(routeseq_lock);
|
||||||
|
@@ -22,7 +22,7 @@ APPS=app_dial.so app_playback.so app_voicemail.so app_directory.so app_mp3.so\
|
|||||||
app_enumlookup.so app_transfer.so app_setcidnum.so app_cdr.so \
|
app_enumlookup.so app_transfer.so app_setcidnum.so app_cdr.so \
|
||||||
app_hasnewvoicemail.so app_sayunixtime.so app_cut.so app_read.so \
|
app_hasnewvoicemail.so app_sayunixtime.so app_cut.so app_read.so \
|
||||||
app_setcdruserfield.so app_random.so app_ices.so app_eval.so \
|
app_setcdruserfield.so app_random.so app_ices.so app_eval.so \
|
||||||
app_nbscat.so app_sendtext.so app_exec.so app_sms.so \
|
app_nbscat.so app_sendtext.so app_exec.so \
|
||||||
app_groupcount.so app_txtcidname.so app_controlplayback.so \
|
app_groupcount.so app_txtcidname.so app_controlplayback.so \
|
||||||
app_talkdetect.so app_alarmreceiver.so app_userevent.so app_verbose.so \
|
app_talkdetect.so app_alarmreceiver.so app_userevent.so app_verbose.so \
|
||||||
app_test.so app_forkcdr.so app_math.so app_realtime.so \
|
app_test.so app_forkcdr.so app_math.so app_realtime.so \
|
||||||
@@ -63,7 +63,13 @@ ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so -lres_adsi.so -lres_monitor.so
|
||||||
|
else
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
APPS+=app_sms.so
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# If you have UnixODBC you can use ODBC voicemail
|
# If you have UnixODBC you can use ODBC voicemail
|
||||||
@@ -81,10 +87,10 @@ clean:
|
|||||||
rm -f *.so *.o look .depend
|
rm -f *.so *.o look .depend
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
app_rpt.so : app_rpt.o
|
app_rpt.so : app_rpt.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -ltonezone
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltonezone
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||||
@@ -92,16 +98,16 @@ install: all
|
|||||||
rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
|
rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
|
||||||
|
|
||||||
app_curl.so: app_curl.o
|
app_curl.so: app_curl.o
|
||||||
$(CC) $(SOLINK) -o $@ $< $(CURLLIBS)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
|
||||||
|
|
||||||
app_sql_postgres.o: app_sql_postgres.c
|
app_sql_postgres.o: app_sql_postgres.c
|
||||||
$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
|
$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
|
||||||
|
|
||||||
app_sql_postgres.so: app_sql_postgres.o
|
app_sql_postgres.so: app_sql_postgres.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -L/usr/local/pgsql/lib -lpq
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
|
||||||
|
|
||||||
app_sql_odbc.so: app_sql_odbc.o
|
app_sql_odbc.so: app_sql_odbc.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -lodbc
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
|
||||||
|
|
||||||
look: look.c
|
look: look.c
|
||||||
$(CC) -pipe -O6 -g look.c -o look -lncurses
|
$(CC) -pipe -O6 -g look.c -o look -lncurses
|
||||||
|
@@ -132,7 +132,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifndef SOLARIS
|
#if !defined(SOLARIS) && !defined(__CYGWIN__)
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#else
|
#else
|
||||||
#define quad_t int64_t
|
#define quad_t int64_t
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifndef SOLARIS
|
#if !defined(SOLARIS) && !defined(__CYGWIN__)
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#else
|
#else
|
||||||
#define quad_t int64_t
|
#define quad_t int64_t
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifndef SOLARIS
|
#if !defined(SOLARIS) && !defined(__CYGWIN__)
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#else
|
#else
|
||||||
#define quad_t int64_t
|
#define quad_t int64_t
|
||||||
|
@@ -956,7 +956,7 @@ static yyconst yy_state_type yy_NUL_trans[33] =
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifndef SOLARIS
|
#if !defined(SOLARIS) && !defined(__CYGWIN__)
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#else
|
#else
|
||||||
#define quad_t int64_t
|
#define quad_t int64_t
|
||||||
|
@@ -2048,6 +2048,8 @@ int main(int argc, char *argv[])
|
|||||||
ast_verbose("[ Reading Master Configuration ]");
|
ast_verbose("[ Reading Master Configuration ]");
|
||||||
ast_readconfig();
|
ast_readconfig();
|
||||||
|
|
||||||
|
#ifndef __CYGWIN__
|
||||||
|
|
||||||
if (!is_child_of_nonroot && ast_set_priority(option_highpriority)) {
|
if (!is_child_of_nonroot && ast_set_priority(option_highpriority)) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -2083,6 +2085,8 @@ int main(int argc, char *argv[])
|
|||||||
ast_verbose("Running as user '%s'\n", runuser);
|
ast_verbose("Running as user '%s'\n", runuser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* __CYGWIN__ */
|
||||||
|
|
||||||
term_init();
|
term_init();
|
||||||
printf(term_end());
|
printf(term_end());
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
15
cdr/Makefile
15
cdr/Makefile
@@ -13,7 +13,12 @@
|
|||||||
|
|
||||||
MODS=cdr_csv.so cdr_manager.so cdr_custom.so
|
MODS=cdr_csv.so cdr_manager.so cdr_custom.so
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -lasterisk.dll
|
||||||
|
else
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
||||||
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
||||||
@@ -110,23 +115,23 @@ clean:
|
|||||||
rm -f *.so *.o .depend
|
rm -f *.so *.o .depend
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
ifneq ($(wildcard .depend),)
|
ifneq ($(wildcard .depend),)
|
||||||
include .depend
|
include .depend
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cdr_odbc.so: cdr_odbc.o
|
cdr_odbc.so: cdr_odbc.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -lodbc $(MLFLAGS)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc $(MLFLAGS)
|
||||||
|
|
||||||
cdr_tds.so: cdr_tds.o
|
cdr_tds.so: cdr_tds.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -ltds $(MLFLAGS)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltds $(MLFLAGS)
|
||||||
|
|
||||||
cdr_pgsql.so: cdr_pgsql.o
|
cdr_pgsql.so: cdr_pgsql.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -lpq -lz $(MLFLAGS)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lpq -lz $(MLFLAGS)
|
||||||
|
|
||||||
cdr_sqlite.so: cdr_sqlite.o
|
cdr_sqlite.so: cdr_sqlite.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -lsqlite $(MLFLAGS)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lsqlite $(MLFLAGS)
|
||||||
|
|
||||||
depend: .depend
|
depend: .depend
|
||||||
|
|
||||||
|
@@ -14,11 +14,11 @@
|
|||||||
# the GNU General Public License
|
# the GNU General Public License
|
||||||
#
|
#
|
||||||
|
|
||||||
CHANNEL_LIBS=chan_modem.so chan_sip.so \
|
CHANNEL_LIBS=chan_sip.so chan_agent.so chan_mgcp.so chan_iax2.so chan_local.so chan_skinny.so chan_features.so
|
||||||
chan_modem_aopen.so \
|
|
||||||
chan_modem_bestdata.so \
|
ifneq (${OSARCH},CYGWIN)
|
||||||
chan_agent.so chan_mgcp.so chan_iax2.so \
|
CHANNEL_LIBS+=chan_modem.so chan_modem_aopen.so chan_modem_bestdata.so
|
||||||
chan_local.so chan_skinny.so chan_features.so
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
||||||
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
||||||
@@ -35,6 +35,12 @@ ifeq (${OSARCH},Linux)
|
|||||||
CHANH323LIB=-ldl
|
CHANH323LIB=-ldl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so
|
||||||
|
CYG_CHAN_AGENT=-lres_monitor.so
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(PROC),sparc64)
|
ifeq ($(PROC),sparc64)
|
||||||
PROC=ultrasparc
|
PROC=ultrasparc
|
||||||
CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
|
CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
|
||||||
@@ -53,9 +59,11 @@ endif
|
|||||||
|
|
||||||
ifneq (${OSARCH},Darwin)
|
ifneq (${OSARCH},Darwin)
|
||||||
ifneq (${OSARCH},SunOS)
|
ifneq (${OSARCH},SunOS)
|
||||||
|
ifneq (${OSARCH},CYGWIN)
|
||||||
CHANNEL_LIBS+=chan_oss.so chan_modem_i4l.so
|
CHANNEL_LIBS+=chan_oss.so chan_modem_i4l.so
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq (${OSARCH},SunOS)
|
ifeq (${OSARCH},SunOS)
|
||||||
SOLINK+=-lrt
|
SOLINK+=-lrt
|
||||||
@@ -113,7 +121,10 @@ ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS+=-DCRYPTO
|
CFLAGS+=-DCRYPTO
|
||||||
|
|
||||||
|
ifneq ($(OSARCH),CYGWIN)
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS+=#-DVOFRDUMPER
|
CFLAGS+=#-DVOFRDUMPER
|
||||||
|
|
||||||
@@ -140,7 +151,7 @@ clean:
|
|||||||
rm -f busy.h ringtone.h gentone gentone-ulaw
|
rm -f busy.h ringtone.h gentone gentone-ulaw
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS}
|
||||||
|
|
||||||
ifneq ($(wildcard .depend),)
|
ifneq ($(wildcard .depend),)
|
||||||
include .depend
|
include .depend
|
||||||
@@ -180,7 +191,7 @@ chan_oss.so: chan_oss.o
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
|
chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
|
||||||
$(CC) $(SOLINK) -o $@ chan_iax2.o iax2-parser.o iax2-provision.o
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} chan_iax2.o iax2-parser.o iax2-provision.o ${CYGSOLIB}
|
||||||
|
|
||||||
chan_zap.o: chan_zap.c
|
chan_zap.o: chan_zap.c
|
||||||
$(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
|
$(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
|
||||||
@@ -189,7 +200,10 @@ chan_zap.so: chan_zap.o
|
|||||||
$(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPR2) -ltonezone
|
$(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPR2) -ltonezone
|
||||||
|
|
||||||
chan_sip.so: chan_sip.o
|
chan_sip.so: chan_sip.o
|
||||||
$(CC) $(SOLINK) -o $@ chan_sip.o
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} chan_sip.o ${CYGSOLIB}
|
||||||
|
|
||||||
|
chan_agent.so: chan_agent.o
|
||||||
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} chan_agent.o ${CYGSOLIB} ${CYG_CHAN_AGENT}
|
||||||
|
|
||||||
chan_alsa.o: $(ALSA_SRC)
|
chan_alsa.o: $(ALSA_SRC)
|
||||||
|
|
||||||
|
@@ -11,6 +11,11 @@
|
|||||||
# the GNU General Public License
|
# the GNU General Public License
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -lasterisk.dll
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard g723.1/coder.c),)
|
ifneq ($(wildcard g723.1/coder.c),)
|
||||||
MODG723=codec_g723_1.so
|
MODG723=codec_g723_1.so
|
||||||
LIBG723=g723.1/libg723.a
|
LIBG723=g723.1/libg723.a
|
||||||
@@ -92,28 +97,28 @@ $(LIBILBC):
|
|||||||
$(MAKE) -C ilbc all
|
$(MAKE) -C ilbc all
|
||||||
|
|
||||||
$(MODILBC): codec_ilbc.o $(LIBILBC)
|
$(MODILBC): codec_ilbc.o $(LIBILBC)
|
||||||
$(CC) $(SOLINK) -o $@ $< $(LIBILBC)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBILBC)
|
||||||
|
|
||||||
codec_g723_1.so : codec_g723_1.o $(LIBG723)
|
codec_g723_1.so : codec_g723_1.o $(LIBG723)
|
||||||
$(CC) $(SOLINK) -o $@ $< $(LIBG723)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBG723)
|
||||||
|
|
||||||
codec_g723_1b.o : codec_g723_1.c
|
codec_g723_1b.o : codec_g723_1.c
|
||||||
$(CC) -c -o $@ $(CFLAGS) -DANNEX_B -Dsingle $<
|
$(CC) -c -o $@ $(CFLAGS) -DANNEX_B -Dsingle $<
|
||||||
|
|
||||||
codec_g723_1b.so : codec_g723_1b.o $(LIBG723B)
|
codec_g723_1b.so : codec_g723_1b.o $(LIBG723B)
|
||||||
$(CC) $(SOLINK) -o $@ $< $(LIBG723B) -lm
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBG723B) -lm
|
||||||
|
|
||||||
codec_gsm.so: codec_gsm.o $(LIBGSMT)
|
codec_gsm.so: codec_gsm.o $(LIBGSMT)
|
||||||
$(CC) $(SOLINK) -o $@ $< $(LIBGSM)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBGSM)
|
||||||
|
|
||||||
$(MODSPEEX): codec_speex.o
|
$(MODSPEEX): codec_speex.o
|
||||||
$(CC) $(SOLINK) -o $@ $< $(LIBSPEEX)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBSPEEX)
|
||||||
|
|
||||||
codec_lpc10.so: codec_lpc10.o $(LIBLPC10)
|
codec_lpc10.so: codec_lpc10.o $(LIBLPC10)
|
||||||
$(CC) $(SOLINK) -o $@ $< $(LIBLPC10) -lm
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(LIBLPC10) -lm
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
ifneq ($(wildcard .depend),)
|
ifneq ($(wildcard .depend),)
|
||||||
include .depend
|
include .depend
|
||||||
|
@@ -36,6 +36,7 @@ WAV49 = -DWAV49
|
|||||||
######### which support MMX instructions. This should be newer pentiums,
|
######### which support MMX instructions. This should be newer pentiums,
|
||||||
######### ppro's, etc, as well as the AMD K6 and K7. The compile will
|
######### ppro's, etc, as well as the AMD K6 and K7. The compile will
|
||||||
######### probably require gcc.
|
######### probably require gcc.
|
||||||
|
PROC=$(shell uname -m)
|
||||||
|
|
||||||
ifneq (${OSARCH},Darwin)
|
ifneq (${OSARCH},Darwin)
|
||||||
ifneq (${OSARCH},SunOS)
|
ifneq (${OSARCH},SunOS)
|
||||||
@@ -90,7 +91,11 @@ PG =
|
|||||||
# CCFLAGS = -c -O
|
# CCFLAGS = -c -O
|
||||||
|
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC $(OPTIMIZE)
|
CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops $(OPTIMIZE)
|
||||||
|
ifneq ($(findstring CYGWIN,${OSARCH}),CYGWIN)
|
||||||
|
CCFLAGS += -fPIC
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
|
|
||||||
|
6
config.c
6
config.c
@@ -33,7 +33,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#define AST_INCLUDE_GLOB 1
|
#define AST_INCLUDE_GLOB 1
|
||||||
#ifdef AST_INCLUDE_GLOB
|
#ifdef AST_INCLUDE_GLOB
|
||||||
#ifdef __Darwin__
|
#if defined(__Darwin__) || defined(__CYGWIN__)
|
||||||
#define GLOB_ABORTED GLOB_ABEND
|
#define GLOB_ABORTED GLOB_ABEND
|
||||||
#endif
|
#endif
|
||||||
# include <glob.h>
|
# include <glob.h>
|
||||||
@@ -693,7 +693,11 @@ int config_text_file_save(const char *configfile, const struct ast_config *cfg,
|
|||||||
}
|
}
|
||||||
time(&t);
|
time(&t);
|
||||||
ast_copy_string(date, ctime(&t), sizeof(date));
|
ast_copy_string(date, ctime(&t), sizeof(date));
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
if ((f = fopen(fn, "w+"))) {
|
||||||
|
#else
|
||||||
if ((f = fopen(fn, "w"))) {
|
if ((f = fopen(fn, "w"))) {
|
||||||
|
#endif
|
||||||
if ((option_verbose > 1) && !option_debug)
|
if ((option_verbose > 1) && !option_debug)
|
||||||
ast_verbose( VERBOSE_PREFIX_2 "Saving '%s': ", fn);
|
ast_verbose( VERBOSE_PREFIX_2 "Saving '%s': ", fn);
|
||||||
fprintf(f, ";!\n");
|
fprintf(f, ";!\n");
|
||||||
|
6
cygwin/Makefile
Executable file
6
cygwin/Makefile
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
OBJS=cygloader.o
|
||||||
|
all: $(OBJS)
|
||||||
|
$(OBJS) : %.o: %.c
|
||||||
|
$(CC) $< -o asterisk.exe
|
||||||
|
clean:
|
||||||
|
rm -f asterisk.exe
|
33
cygwin/cygloader.c
Executable file
33
cygwin/cygloader.c
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#include <unistd.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define OK 0
|
||||||
|
#define MODULE_NOT_FOUND 1
|
||||||
|
#define INVALID_NUMBER_ARGUMENTS 2
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
/* Asterisk entry point */
|
||||||
|
char* error = NULL;
|
||||||
|
int (*ast_main)(int argc, char **argv);
|
||||||
|
|
||||||
|
void *handle = dlopen ("asterisk.dll", RTLD_GLOBAL);
|
||||||
|
if (handle == NULL) {
|
||||||
|
fputs (dlerror(), stderr);
|
||||||
|
fputs ("\r\n", stderr);
|
||||||
|
return MODULE_NOT_FOUND;
|
||||||
|
}
|
||||||
|
printf("\r\nAsterisk module loaded successfully");
|
||||||
|
ast_main = dlsym(handle, "main");
|
||||||
|
if ((error = dlerror()) != NULL) {
|
||||||
|
fputs("Asterisk main not found", stderr);
|
||||||
|
fputs(error, stderr);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
printf("\r\nAsterisk entry point found");
|
||||||
|
/* run asterisk main */
|
||||||
|
(*ast_main)(argc, argv);
|
||||||
|
dlclose(handle);
|
||||||
|
printf("\r\nAsterisk stopped");
|
||||||
|
return OK;
|
||||||
|
}
|
4
db.c
4
db.c
@@ -53,6 +53,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include "asterisk/manager.h"
|
#include "asterisk/manager.h"
|
||||||
#include "db1-ast/include/db.h"
|
#include "db1-ast/include/db.h"
|
||||||
|
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
#define dbopen __dbopen
|
||||||
|
#endif
|
||||||
|
|
||||||
static DB *astdb;
|
static DB *astdb;
|
||||||
AST_MUTEX_DEFINE_STATIC(dblock);
|
AST_MUTEX_DEFINE_STATIC(dblock);
|
||||||
|
|
||||||
|
@@ -35,25 +35,29 @@ endif
|
|||||||
|
|
||||||
GSMLIB=../codecs/gsm/lib/libgsm.a
|
GSMLIB=../codecs/gsm/lib/libgsm.a
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -lasterisk.dll
|
||||||
|
else
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
endif
|
||||||
all: depend $(FORMAT_LIBS)
|
all: depend $(FORMAT_LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.so *.o .depend
|
rm -f *.so *.o .depend
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
ifneq ($(wildcard .depend),)
|
ifneq ($(wildcard .depend),)
|
||||||
include .depend
|
include .depend
|
||||||
endif
|
endif
|
||||||
|
|
||||||
format_mp3.so : format_mp3.o
|
format_mp3.so : format_mp3.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -lm
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm
|
||||||
|
|
||||||
format_ogg_vorbis.so : format_ogg_vorbis.o
|
format_ogg_vorbis.so : format_ogg_vorbis.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -logg -lvorbis -lvorbisenc -lm
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||||
|
@@ -33,7 +33,12 @@ FUNC_SOURCES=$(BUILTINS:.o=.c)
|
|||||||
|
|
||||||
FUNC_STRUCTS=$(shell grep 'struct ast_custom_function' $(FUNC_SOURCES) | awk '{print $$3};')
|
FUNC_STRUCTS=$(shell grep 'struct ast_custom_function' $(FUNC_SOURCES) | awk '{print $$3};')
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -lasterisk.dll
|
||||||
|
else
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
||||||
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
||||||
@@ -45,7 +50,7 @@ clean:
|
|||||||
rm -f *.so *.o .depend pbx_functions.h
|
rm -f *.so *.o .depend pbx_functions.h
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
#$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC
|
#$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC
|
||||||
|
|
||||||
@@ -59,7 +64,7 @@ pbx_functions.h: $(FUNC_SOURCES)
|
|||||||
pbx_functions.o: pbx_functions.h
|
pbx_functions.o: pbx_functions.h
|
||||||
|
|
||||||
pbx_functions.so: pbx_functions.o #$(BUILTINS)
|
pbx_functions.so: pbx_functions.o #$(BUILTINS)
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
for x in $(FUNCS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
for x in $(FUNCS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||||
|
@@ -63,8 +63,12 @@ int unsetenv(const char *name);
|
|||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#define _WIN32_WINNT 0x0500
|
#define _WIN32_WINNT 0x0500
|
||||||
#include <windows.h>
|
#ifndef INET_ADDRSTRLEN
|
||||||
#include <w32api/ws2tcpip.h>
|
#define INET_ADDRSTRLEN 16
|
||||||
|
#endif
|
||||||
|
#ifndef INET6_ADDRSTRLEN
|
||||||
|
#define INET6_ADDRSTRLEN 46
|
||||||
|
#endif
|
||||||
#endif /* __CYGWIN__ */
|
#endif /* __CYGWIN__ */
|
||||||
|
|
||||||
#define HAVE_VASPRINTF
|
#define HAVE_VASPRINTF
|
||||||
|
@@ -41,6 +41,10 @@
|
|||||||
0x20 } }
|
0x20 } }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BSD
|
#ifdef BSD
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define AST_MUTEX_INIT_W_CONSTRUCTORS
|
#define AST_MUTEX_INIT_W_CONSTRUCTORS
|
||||||
|
10
pbx/Makefile
10
pbx/Makefile
@@ -28,7 +28,13 @@ GTK_LIBS=`${CROSS_COMPILE_BIN}gtk-config --libs gthread`
|
|||||||
MOC=$(QTDIR)/bin/moc
|
MOC=$(QTDIR)/bin/moc
|
||||||
KDE_FLAGS=-I$(KDEDIR)/include -I$(KDEDIR)/include/kde -I$(QTDIR)/include
|
KDE_FLAGS=-I$(KDEDIR)/include -I$(KDEDIR)/include/kde -I$(QTDIR)/include
|
||||||
KDE_LIBS=-L$(KDEDIR)/lib -L$(QTDIR)/lib -lqt -lkdecore -lkdeui
|
KDE_LIBS=-L$(KDEDIR)/lib -L$(QTDIR)/lib -lqt -lkdecore -lkdeui
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -L../res -lasterisk.dll
|
||||||
|
else
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
endif
|
||||||
|
|
||||||
KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o
|
KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o
|
||||||
|
|
||||||
@@ -53,13 +59,13 @@ pbx_kdeconsole.so: $(KDE_CONSOLE_OBJS)
|
|||||||
$(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS)
|
$(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS)
|
||||||
|
|
||||||
pbx_dundi.so: dundi-parser.o pbx_dundi.o
|
pbx_dundi.so: dundi-parser.o pbx_dundi.o
|
||||||
$(CC) $(SOLINK) -o $@ pbx_dundi.o dundi-parser.o -lz
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB}
|
||||||
|
|
||||||
%.moc : %.h
|
%.moc : %.h
|
||||||
$(MOC) $< -o $@
|
$(MOC) $< -o $@
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
ifneq ($(wildcard .depend),)
|
ifneq ($(wildcard .depend),)
|
||||||
include .depend
|
include .depend
|
||||||
|
30
res/Makefile
30
res/Makefile
@@ -11,8 +11,7 @@
|
|||||||
# the GNU General Public License
|
# the GNU General Public License
|
||||||
#
|
#
|
||||||
|
|
||||||
MODS=res_adsi.so res_features.so res_musiconhold.so res_indications.so res_monitor.so \
|
MODS=res_indications.so res_monitor.so res_adsi.so res_agi.so res_features.so
|
||||||
res_agi.so
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
|
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
|
||||||
ifneq (${OSARCH},FreeBSD)
|
ifneq (${OSARCH},FreeBSD)
|
||||||
@@ -41,6 +40,15 @@ ifeq ($(findstring BSD,${OSARCH}),BSD)
|
|||||||
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
||||||
|
CYGSOLIB=-L.. -L. -lasterisk.dll
|
||||||
|
CYG_RES_CONFIG_ODBC_LIB=-lres_odbc.so
|
||||||
|
CYG_RES_FEATURES_LIB=-lres_adsi.so -lres_monitor.so
|
||||||
|
else
|
||||||
|
MODS+=res_musiconhold.so
|
||||||
|
endif
|
||||||
|
|
||||||
CRYPTO_LIBS=-lssl -lcrypto
|
CRYPTO_LIBS=-lssl -lcrypto
|
||||||
|
|
||||||
CFLAGS+=
|
CFLAGS+=
|
||||||
@@ -52,7 +60,11 @@ endif
|
|||||||
#
|
#
|
||||||
# Work around buggy RedHat 9.0
|
# Work around buggy RedHat 9.0
|
||||||
#
|
#
|
||||||
|
ifeq (${OSARCH},CYGWIN)
|
||||||
|
CFLAGS+=-DOPENSSL_NO_KRB5
|
||||||
|
else
|
||||||
CFLAGS+=-DOPENSSL_NO_KRB5 -fPIC
|
CFLAGS+=-DOPENSSL_NO_KRB5 -fPIC
|
||||||
|
endif
|
||||||
|
|
||||||
all: depend $(MODS)
|
all: depend $(MODS)
|
||||||
|
|
||||||
@@ -63,19 +75,25 @@ install: all
|
|||||||
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
||||||
|
|
||||||
res_crypto.so: res_crypto.o
|
res_crypto.so: res_crypto.o
|
||||||
$(CC) $(SOLINK) -o $@ $< $(CRYPTO_LIBS)
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.so *.o .depend
|
rm -f *.so *.o .depend
|
||||||
|
|
||||||
res_odbc.so: res_odbc.o
|
res_odbc.so: res_odbc.o
|
||||||
$(CC) $(SOLINK) -o $@ $< -lodbc
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
|
||||||
|
|
||||||
res_osp.so: res_osp.o $(OSPLIB)
|
res_osp.so: res_osp.o $(OSPLIB)
|
||||||
$(CC) $(SOLINK) -o $@ $^
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(OSPLIB)
|
||||||
|
|
||||||
%.so : %.o
|
%.so : %.o
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
||||||
|
|
||||||
|
res_features.so: res_features.o
|
||||||
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${CYG_RES_FEATURES_LIB}
|
||||||
|
|
||||||
|
res_config_odbc.so: res_config_odbc.o
|
||||||
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${CYG_RES_CONFIG_ODBC_LIB}
|
||||||
|
|
||||||
ifneq ($(wildcard .depend),)
|
ifneq ($(wildcard .depend),)
|
||||||
include .depend
|
include .depend
|
||||||
|
@@ -9,9 +9,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Stuff moved from Makefile.inc to reduce clutter */
|
/* Stuff moved from Makefile.inc to reduce clutter */
|
||||||
|
#ifndef __CYGWIN__
|
||||||
#ifndef TM_GMTOFF
|
#ifndef TM_GMTOFF
|
||||||
#define TM_GMTOFF tm_gmtoff
|
#define TM_GMTOFF tm_gmtoff
|
||||||
#define TM_ZONE tm_zone
|
#define TM_ZONE tm_zone
|
||||||
|
#endif
|
||||||
#define STD_INSPIRED 1
|
#define STD_INSPIRED 1
|
||||||
#define PCTS 1
|
#define PCTS 1
|
||||||
#define HAVE_LONG_DOUBLE 1
|
#define HAVE_LONG_DOUBLE 1
|
||||||
|
7
utils.c
7
utils.c
@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#include "asterisk/logger.h"
|
#include "asterisk/logger.h"
|
||||||
#include "asterisk/md5.h"
|
#include "asterisk/md5.h"
|
||||||
#include "asterisk/options.h"
|
#include "asterisk/options.h"
|
||||||
|
#include "asterisk/compat.h"
|
||||||
|
|
||||||
#define AST_API_MODULE /* ensure that inlinable API functions will be built in this module if required */
|
#define AST_API_MODULE /* ensure that inlinable API functions will be built in this module if required */
|
||||||
#include "asterisk/strings.h"
|
#include "asterisk/strings.h"
|
||||||
@@ -57,7 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
static char base64[64];
|
static char base64[64];
|
||||||
static char b2a[256];
|
static char b2a[256];
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||||
|
|
||||||
/* duh? ERANGE value copied from web... */
|
/* duh? ERANGE value copied from web... */
|
||||||
#define ERANGE 34
|
#define ERANGE 34
|
||||||
@@ -741,10 +742,14 @@ int vasprintf(char **strp, const char *fmt, va_list ap)
|
|||||||
#endif /* !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC) */
|
#endif /* !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC) */
|
||||||
|
|
||||||
#ifndef HAVE_STRTOQ
|
#ifndef HAVE_STRTOQ
|
||||||
|
#ifndef LONG_MIN
|
||||||
#define LONG_MIN (-9223372036854775807L-1L)
|
#define LONG_MIN (-9223372036854775807L-1L)
|
||||||
/* min value of a "long int" */
|
/* min value of a "long int" */
|
||||||
|
#endif
|
||||||
|
#ifndef LONG_MAX
|
||||||
#define LONG_MAX 9223372036854775807L
|
#define LONG_MAX 9223372036854775807L
|
||||||
/* max value of a "long int" */
|
/* max value of a "long int" */
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert a string to a quad integer.
|
* Convert a string to a quad integer.
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__CYGWIN__)
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
Reference in New Issue
Block a user