Minor changes for building epic5 in Cygwin.
Change to perl.c based on
http://www.mail-archive.com/modperl@perl.apache.org/msg09457.html
I would be happy to move the checks for static XS incompatibility and
AF_INET6 support into proper autoconf tests, if you guys would prefer.
Please CC: me on responses, if possible, thank you!
Index: configure.in
===================================================================
RCS file: /home/cvs/repository/epic5/configure.in,v
retrieving revision 1.53
diff -u -3 -p -r1.53 configure.in
--- configure.in 8 Sep 2006 22:52:49 -0000 1.53
+++ configure.in 29 Sep 2006 20:29:29 -0000
@@ -230,7 +230,7 @@ dnl
dnl Checking for headers, functions, and a type declarations
dnl
-AC_CHECK_HEADERS(fcntl.h inttypes.h math.h ndbm.h netdb.h regex.h
stddef.h stdint.h sys/fcntl.h sys/file.h sys/filio.h sys/select.h
sys/sysctl.h sys/syslimits.h sys/time.h sys/un.h termcap.h,)
+AC_CHECK_HEADERS(fcntl.h inttypes.h math.h ndbm.h netdb.h regex.h
stddef.h stdint.h sys/fcntl.h sys/file.h sys/filio.h sys/select.h
sys/sysctl.h sys/syslimits.h sys/time.h sys/un.h ncurses/termcap.h
termcap.h,)
AC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM),)
AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME),)
Index: include/defs.h.in
===================================================================
RCS file: /home/cvs/repository/epic5/include/defs.h.in,v
retrieving revision 1.40
diff -u -3 -p -r1.40 defs.h.in
--- include/defs.h.in 8 Sep 2006 22:52:50 -0000 1.40
+++ include/defs.h.in 29 Sep 2006 20:29:29 -0000
@@ -396,5 +396,8 @@
/* Define if you have the <sys/un.h> header file. */
#undef HAVE_SYS_UN_H
+/* Define if you have the <ncurses/termcap.h> header file. */
+#undef HAVE_NCURSES_TERMCAP_H
+
/* Define if you have the <termcap.h> header file. */
#undef HAVE_TERMCAP_H
Index: include/irc_std.h
===================================================================
RCS file: /home/cvs/repository/epic5/include/irc_std.h,v
retrieving revision 1.24
diff -u -3 -p -r1.24 irc_std.h
--- include/irc_std.h 4 Oct 2005 03:47:45 -0000 1.24
+++ include/irc_std.h 29 Sep 2006 20:29:29 -0000
@@ -68,8 +68,12 @@
/*
* Some systems define tputs, etc in this header
*/
-#ifdef HAVE_TERMCAP_H
-#include <termcap.h>
+#ifdef HAVE_NCURSES_TERMCAP_H
+# include <ncurses/termcap.h>
+#else
+# ifdef HAVE_TERMCAP_H
+# include <termcap.h>
+# endif
#endif
Index: source/perl.c
===================================================================
RCS file: /home/cvs/repository/epic5/source/perl.c,v
retrieving revision 1.17
diff -u -3 -p -r1.17 perl.c
--- source/perl.c 9 Jun 2006 03:19:14 -0000 1.17
+++ source/perl.c 29 Sep 2006 20:29:29 -0000
@@ -56,7 +56,13 @@ STRLEN trash;
#define SvPV_nolen(x) SvPV((x),trash)
#endif
-static XS (XS_cmd) {
+#ifdef __CYGWIN__
+# define EPIC_PERL_STATIC
+#else
+# define EPIC_PERL_STATIC static
+#endif
+
+EPIC_PERL_STATIC XS (XS_cmd) {
int foo;
dXSARGS;
for (foo=0; foo<items; foo++) {
@@ -65,7 +71,7 @@ static XS (XS_cmd) {
XSRETURN(0);
}
-static XS (XS_eval) {
+EPIC_PERL_STATIC XS (XS_eval) {
int foo;
dXSARGS;
for (foo=0; foo<items; foo++) {
@@ -74,7 +80,7 @@ static XS (XS_eval) {
XSRETURN(0);
}
-static XS (XS_expr) {
+EPIC_PERL_STATIC XS (XS_expr) {
int foo = 0;
char* retval=NULL;
char* arg=NULL;
@@ -89,7 +95,7 @@ static XS (XS_expr) {
XSRETURN(items);
}
-static XS (XS_call) {
+EPIC_PERL_STATIC XS (XS_call) {
int foo = 0;
char* retval=NULL;
char* arg=NULL;
@@ -104,7 +110,7 @@ static XS (XS_call) {
XSRETURN(items);
}
-static XS (XS_yell) {
+EPIC_PERL_STATIC XS (XS_yell) {
int foo;
dXSARGS;
for (foo=0; foo<items; foo++) {
Index: source/server.c
===================================================================
RCS file: /home/cvs/repository/epic5/source/server.c,v
retrieving revision 1.205
diff -u -3 -p -r1.205 server.c
--- source/server.c 24 Sep 2006 16:03:58 -0000 1.205
+++ source/server.c 29 Sep 2006 20:29:29 -0000
@@ -429,9 +429,11 @@ static int serverinfo_to_newserv (Server
if (my_stricmp(si->proto_type, "tcp4") == 0 ||
my_stricmp(si->proto_type, "4") == 0)
s->protocol = AF_INET;
+#ifdef AF_INET6
else if (my_stricmp(si->proto_type, "tcp6") == 0 ||
my_stricmp(si->proto_type, "6") == 0)
s->protocol = AF_INET6;
+#endif
else if (my_stricmp(si->proto_type, "tcp") == 0 ||
my_stricmp(si->proto_type, "any") == 0)
s->protocol = AF_UNSPEC;
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/