[Asterisk-cvs] asterisk ChangeLog, 1.8, 1.9 Makefile, 1.217,
1.218 acl.c, 1.58, 1.59 ast_expr2.c, 1.5, 1.6 ast_expr2.fl,
1.7, 1.8 ast_expr2.y, 1.8, 1.9 ast_expr2f.c, 1.5,
1.6 asterisk.c, 1.188, 1.189 config.c, 1.81, 1.82 db.c, 1.25,
1.26 utils.c, 1.82, 1.83
kpfleming
kpfleming
Tue Nov 1 17:01:31 CST 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv16806
Modified Files:
ChangeLog Makefile acl.c ast_expr2.c ast_expr2.fl ast_expr2.y
ast_expr2f.c asterisk.c config.c db.c utils.c
Log Message:
issue #4678
Index: ChangeLog
===================================================================
RCS file: /usr/cvsroot/asterisk/ChangeLog,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ChangeLog 1 Nov 2005 21:11:56 -0000 1.8
+++ ChangeLog 1 Nov 2005 21:53:29 -0000 1.9
@@ -1,5 +1,7 @@
2005-11-01 Kevin P. Fleming <kpfleming at 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)
* include/asterisk/channel.h: add parent_channel field
* channel.c (__ast_request_and_dial): use parent_channel field to inherit variables into new channel
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -d -r1.217 -r1.218
--- Makefile 25 Oct 2005 12:47:54 -0000 1.217
+++ Makefile 1 Nov 2005 21:53:29 -0000 1.218
@@ -216,6 +216,7 @@
INCLUDE+=-Iinclude -I../include
ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
ASTCFLAGS+=$(OPTIMIZE)
+ASTOBJ=-o asterisk
ifeq ($(findstring BSD,${OSARCH}),BSD)
PROC=$(shell uname -m)
@@ -263,6 +264,15 @@
INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
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),)
ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
endif
@@ -471,8 +481,11 @@
exit 1; \
fi
-asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
- $(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
+cygwin_a:
+ $(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
$(CC) $(AUDIO_LIBS) -o muted muted.o
@@ -595,7 +608,9 @@
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
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
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
Index: acl.c
===================================================================
RCS file: /usr/cvsroot/asterisk/acl.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- acl.c 24 Oct 2005 20:12:04 -0000 1.58
+++ acl.c 1 Nov 2005 21:53:29 -0000 1.59
@@ -68,6 +68,7 @@
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/srv.h"
+#include "asterisk/compat.h"
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
AST_MUTEX_DEFINE_STATIC(routeseq_lock);
Index: ast_expr2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/ast_expr2.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ast_expr2.c 25 Sep 2005 17:03:18 -0000 1.5
+++ ast_expr2.c 1 Nov 2005 21:53:29 -0000 1.6
@@ -132,7 +132,7 @@
#include <string.h>
#include <locale.h>
#include <ctype.h>
-#ifndef SOLARIS
+#if !defined(SOLARIS) && !defined(__CYGWIN__)
#include <err.h>
#else
#define quad_t int64_t
Index: ast_expr2.fl
===================================================================
RCS file: /usr/cvsroot/asterisk/ast_expr2.fl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ast_expr2.fl 29 Aug 2005 22:03:37 -0000 1.7
+++ ast_expr2.fl 1 Nov 2005 21:53:29 -0000 1.8
@@ -5,7 +5,7 @@
#include <string.h>
#include <locale.h>
#include <ctype.h>
-#ifndef SOLARIS
+#if !defined(SOLARIS) && !defined(__CYGWIN__)
#include <err.h>
#else
#define quad_t int64_t
Index: ast_expr2.y
===================================================================
RCS file: /usr/cvsroot/asterisk/ast_expr2.y,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ast_expr2.y 25 Sep 2005 17:03:18 -0000 1.8
+++ ast_expr2.y 1 Nov 2005 21:53:29 -0000 1.9
@@ -18,7 +18,7 @@
#include <string.h>
#include <locale.h>
#include <ctype.h>
-#ifndef SOLARIS
+#if !defined(SOLARIS) && !defined(__CYGWIN__)
#include <err.h>
#else
#define quad_t int64_t
Index: ast_expr2f.c
===================================================================
RCS file: /usr/cvsroot/asterisk/ast_expr2f.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ast_expr2f.c 26 Oct 2005 23:11:36 -0000 1.5
+++ ast_expr2f.c 1 Nov 2005 21:53:29 -0000 1.6
@@ -956,7 +956,7 @@
#include <string.h>
#include <locale.h>
#include <ctype.h>
-#ifndef SOLARIS
+#if !defined(SOLARIS) && !defined(__CYGWIN__)
#include <err.h>
#else
#define quad_t int64_t
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- asterisk.c 1 Nov 2005 17:22:25 -0000 1.188
+++ asterisk.c 1 Nov 2005 21:53:29 -0000 1.189
@@ -2048,6 +2048,8 @@
ast_verbose("[ Reading Master Configuration ]");
ast_readconfig();
+#ifndef __CYGWIN__
+
if (!is_child_of_nonroot && ast_set_priority(option_highpriority)) {
exit(1);
}
@@ -2083,6 +2085,8 @@
ast_verbose("Running as user '%s'\n", runuser);
}
+#endif /* __CYGWIN__ */
+
term_init();
printf(term_end());
fflush(stdout);
Index: config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/config.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- config.c 31 Oct 2005 21:08:55 -0000 1.81
+++ config.c 1 Nov 2005 21:53:29 -0000 1.82
@@ -33,7 +33,7 @@
#include <sys/stat.h>
#define AST_INCLUDE_GLOB 1
#ifdef AST_INCLUDE_GLOB
-#ifdef __Darwin__
+#if defined(__Darwin__) || defined(__CYGWIN__)
#define GLOB_ABORTED GLOB_ABEND
#endif
# include <glob.h>
@@ -693,7 +693,11 @@
}
time(&t);
ast_copy_string(date, ctime(&t), sizeof(date));
+#ifdef __CYGWIN__
+ if ((f = fopen(fn, "w+"))) {
+#else
if ((f = fopen(fn, "w"))) {
+#endif
if ((option_verbose > 1) && !option_debug)
ast_verbose( VERBOSE_PREFIX_2 "Saving '%s': ", fn);
fprintf(f, ";!\n");
Index: db.c
===================================================================
RCS file: /usr/cvsroot/asterisk/db.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- db.c 26 Oct 2005 18:54:24 -0000 1.25
+++ db.c 1 Nov 2005 21:53:29 -0000 1.26
@@ -53,6 +53,10 @@
#include "asterisk/manager.h"
#include "db1-ast/include/db.h"
+#ifdef __CYGWIN__
+#define dbopen __dbopen
+#endif
+
static DB *astdb;
AST_MUTEX_DEFINE_STATIC(dblock);
Index: utils.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- utils.c 1 Nov 2005 20:26:29 -0000 1.82
+++ utils.c 1 Nov 2005 21:53:29 -0000 1.83
@@ -44,6 +44,7 @@
#include "asterisk/logger.h"
#include "asterisk/md5.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 */
#include "asterisk/strings.h"
@@ -57,7 +58,7 @@
static char base64[64];
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... */
#define ERANGE 34
@@ -741,10 +742,14 @@
#endif /* !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC) */
#ifndef HAVE_STRTOQ
+#ifndef LONG_MIN
#define LONG_MIN (-9223372036854775807L-1L)
/* min value of a "long int" */
+#endif
+#ifndef LONG_MAX
#define LONG_MAX 9223372036854775807L
/* max value of a "long int" */
+#endif
/*
* Convert a string to a quad integer.
More information about the svn-commits
mailing list