Index: Makefile =================================================================== RCS file: /usr/cvsroot/asterisk/Makefile,v retrieving revision 1.216 diff -u -r1.216 Makefile --- Makefile 16 Oct 2005 03:08:58 -0000 1.216 +++ Makefile 21 Oct 2005 20:36:12 -0000 @@ -322,6 +322,11 @@ LIBS+=-lncurses -lm endif +ifeq (${OSARCH},CYGWIN_NT-5.1) + LIBS+=-lpthread -lresolv +endif + + ifeq (${OSARCH},Darwin) LIBS+=-lresolv ASTCFLAGS+=-D__Darwin__ Index: acl.c =================================================================== RCS file: /usr/cvsroot/asterisk/acl.c,v retrieving revision 1.57 diff -u -r1.57 acl.c --- acl.c 14 Sep 2005 20:46:49 -0000 1.57 +++ acl.c 21 Oct 2005 20:36:12 -0000 @@ -35,6 +35,9 @@ #include #include #include +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif #include #include #include Index: ast_expr2.c =================================================================== RCS file: /usr/cvsroot/asterisk/ast_expr2.c,v retrieving revision 1.5 diff -u -r1.5 ast_expr2.c --- ast_expr2.c 25 Sep 2005 17:03:18 -0000 1.5 +++ ast_expr2.c 21 Oct 2005 20:36:14 -0000 @@ -132,7 +132,7 @@ #include #include #include -#ifndef SOLARIS +#if !defined(SOLARIS) && !defined(__CYGWIN__) #include #else #define quad_t int64_t Index: ast_expr2.fl =================================================================== RCS file: /usr/cvsroot/asterisk/ast_expr2.fl,v retrieving revision 1.7 diff -u -r1.7 ast_expr2.fl --- ast_expr2.fl 29 Aug 2005 22:03:37 -0000 1.7 +++ ast_expr2.fl 21 Oct 2005 20:36:14 -0000 @@ -5,7 +5,7 @@ #include #include #include -#ifndef SOLARIS +#if !defined(SOLARIS) && !defined(__CYGWIN__) #include #else #define quad_t int64_t Index: ast_expr2.y =================================================================== RCS file: /usr/cvsroot/asterisk/ast_expr2.y,v retrieving revision 1.8 diff -u -r1.8 ast_expr2.y --- ast_expr2.y 25 Sep 2005 17:03:18 -0000 1.8 +++ ast_expr2.y 21 Oct 2005 20:36:15 -0000 @@ -18,7 +18,7 @@ #include #include #include -#ifndef SOLARIS +#if !defined(SOLARIS) && !defined(__CYGWIN__) #include #else #define quad_t int64_t Index: ast_expr2f.c =================================================================== RCS file: /usr/cvsroot/asterisk/ast_expr2f.c,v retrieving revision 1.4 diff -u -r1.4 ast_expr2f.c --- ast_expr2f.c 25 Sep 2005 17:03:18 -0000 1.4 +++ ast_expr2f.c 21 Oct 2005 20:36:16 -0000 @@ -956,7 +956,7 @@ #include #include #include -#ifndef SOLARIS +#if !defined(SOLARIS) && !defined(__CYGWIN__) #include #else #define quad_t int64_t Index: config.c =================================================================== RCS file: /usr/cvsroot/asterisk/config.c,v retrieving revision 1.78 diff -u -r1.78 config.c --- config.c 17 Oct 2005 13:53:50 -0000 1.78 +++ config.c 21 Oct 2005 20:36:17 -0000 @@ -34,7 +34,11 @@ #define GLOB_ABORTED GLOB_ABEND #endif # include +#ifdef __CYGWIN__ +#define GLOB_ABORTED GLOB_ABEND #endif +#endif + #include "asterisk.h" Index: manager.c =================================================================== RCS file: /usr/cvsroot/asterisk/manager.c,v retrieving revision 1.127 diff -u -r1.127 manager.c --- manager.c 14 Oct 2005 20:37:40 -0000 1.127 +++ manager.c 21 Oct 2005 20:36:18 -0000 @@ -32,6 +32,9 @@ #include #include #include +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif #include #include #include Index: netsock.c =================================================================== RCS file: /usr/cvsroot/asterisk/netsock.c,v retrieving revision 1.2 diff -u -r1.2 netsock.c --- netsock.c 14 Sep 2005 20:46:49 -0000 1.2 +++ netsock.c 21 Oct 2005 20:36:18 -0000 @@ -31,6 +31,9 @@ #include #include #include +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif #include #include #include Index: rtp.c =================================================================== RCS file: /usr/cvsroot/asterisk/rtp.c,v retrieving revision 1.150 diff -u -r1.150 rtp.c --- rtp.c 14 Oct 2005 17:02:20 -0000 1.150 +++ rtp.c 21 Oct 2005 20:36:19 -0000 @@ -31,6 +31,9 @@ #include #include #include +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif #include #include #include Index: utils.c =================================================================== RCS file: /usr/cvsroot/asterisk/utils.c,v retrieving revision 1.75 diff -u -r1.75 utils.c --- utils.c 21 Oct 2005 14:09:03 -0000 1.75 +++ utils.c 21 Oct 2005 20:36:19 -0000 @@ -55,7 +55,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 Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.894 diff -u -r1.894 chan_sip.c --- channels/chan_sip.c 17 Oct 2005 22:26:33 -0000 1.894 +++ channels/chan_sip.c 21 Oct 2005 20:36:26 -0000 @@ -37,6 +37,9 @@ #include #include #include +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif #include #include #include Index: db1-ast/db/db.c =================================================================== RCS file: /usr/cvsroot/asterisk/db1-ast/db/db.c,v retrieving revision 1.3 diff -u -r1.3 db.c --- db1-ast/db/db.c 27 Oct 2003 20:00:41 -0000 1.3 +++ db1-ast/db/db.c 21 Oct 2005 20:36:26 -0000 @@ -44,7 +44,7 @@ #include -#ifndef __APPLE__ +#if !defined(__APPLE__) && !defined(__CYGWIN__) #define dbopen __dbopen #endif @@ -76,7 +76,7 @@ errno = EINVAL; return (NULL); } -#ifndef __APPLE__ +#if !defined(__APPLE__) && !defined(__CYGWIN__) #undef dbopen #define weak_alias(original, alias) \ asm (".weak " #alias "\n" #alias " = " #original); Index: db1-ast/include/db.h =================================================================== RCS file: /usr/cvsroot/asterisk/db1-ast/include/db.h,v retrieving revision 1.6 diff -u -r1.6 db.h --- db1-ast/include/db.h 14 Dec 2004 23:36:30 -0000 1.6 +++ db1-ast/include/db.h 21 Oct 2005 20:36:26 -0000 @@ -69,7 +69,7 @@ #endif /* __FreeBSD__ */ #endif -#ifdef SOLARIS +#if defined(SOLARIS) || defined(__CYGWIN__) #define __P(p) p #define __BEGIN_DECLS #define __END_DECLS Index: include/asterisk/compat.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/compat.h,v retrieving revision 1.2 diff -u -r1.2 compat.h --- include/asterisk/compat.h 8 Sep 2005 02:26:35 -0000 1.2 +++ include/asterisk/compat.h 21 Oct 2005 20:36:27 -0000 @@ -59,12 +59,6 @@ int unsetenv(const char *name); #endif /* SOLARIS */ -#ifdef __CYGWIN__ -#define _WIN32_WINNT 0x0500 -#include -#include -#endif /* __CYGWIN__ */ - #define HAVE_VASPRINTF #define HAVE_STRTOQ Index: include/asterisk/lock.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/lock.h,v retrieving revision 1.37 diff -u -r1.37 lock.h --- include/asterisk/lock.h 9 Sep 2005 05:35:14 -0000 1.37 +++ include/asterisk/lock.h 21 Oct 2005 20:36:27 -0000 @@ -51,7 +51,7 @@ /* From now on, Asterisk REQUIRES Recursive (not error checking) mutexes and will not run without them. */ -#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) && defined(PTHREAD_MUTEX_RECURSIVE_NP) #define PTHREAD_MUTEX_INIT_VALUE PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP #define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP #else Index: stdtime/localtime.c =================================================================== RCS file: /usr/cvsroot/asterisk/stdtime/localtime.c,v retrieving revision 1.13 diff -u -r1.13 localtime.c --- stdtime/localtime.c 14 Sep 2005 20:46:50 -0000 1.13 +++ stdtime/localtime.c 21 Oct 2005 20:36:28 -0000 @@ -128,7 +128,7 @@ #define MY_TZNAME_MAX 255 #endif /* !defined TZNAME_MAX */ -#ifdef SOLARIS +#if defined(SOLARIS) || defined(__CYGWIN__) #undef TM_ZONE #undef TM_GMTOFF #endif