From 10719e58c8db353a52f7d440095a7c84300df18b Mon Sep 17 00:00:00 2001 From: Brian West Date: Mon, 16 Jun 2014 11:14:42 -0500 Subject: [PATCH] work around macro definition of fileno breaking our c++ code --- src/mod/endpoints/mod_verto/mcast/MCAST.pm | 2 +- src/mod/endpoints/mod_verto/mcast/mcast_cpp.cpp | 2 +- src/mod/endpoints/mod_verto/mcast/mcast_cpp.h | 2 +- src/mod/endpoints/mod_verto/mcast/mcast_wrap.cpp | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mod/endpoints/mod_verto/mcast/MCAST.pm b/src/mod/endpoints/mod_verto/mcast/MCAST.pm index 531665035b..dc2d01f1f7 100644 --- a/src/mod/endpoints/mod_verto/mcast/MCAST.pm +++ b/src/mod/endpoints/mod_verto/mcast/MCAST.pm @@ -76,7 +76,7 @@ sub DESTROY { *send = *MCASTc::McastHandle_send; *recv = *MCASTc::McastHandle_recv; -*fileno = *MCASTc::McastHandle_fileno; +*filenum = *MCASTc::McastHandle_filenum; sub DISOWN { my $self = shift; my $ptr = tied(%$self); diff --git a/src/mod/endpoints/mod_verto/mcast/mcast_cpp.cpp b/src/mod/endpoints/mod_verto/mcast/mcast_cpp.cpp index 2e3eca6c6d..879d6e0550 100644 --- a/src/mod/endpoints/mod_verto/mcast/mcast_cpp.cpp +++ b/src/mod/endpoints/mod_verto/mcast/mcast_cpp.cpp @@ -63,7 +63,7 @@ char *McastHandle::recv(int ms) return NULL; } -int McastHandle::fileno(void) +int McastHandle::filenum(void) { return handle.sock; } diff --git a/src/mod/endpoints/mod_verto/mcast/mcast_cpp.h b/src/mod/endpoints/mod_verto/mcast/mcast_cpp.h index 5990871a0f..bc9e85822d 100644 --- a/src/mod/endpoints/mod_verto/mcast/mcast_cpp.h +++ b/src/mod/endpoints/mod_verto/mcast/mcast_cpp.h @@ -49,7 +49,7 @@ class McastHandle { virtual ~McastHandle(); int send(const char *data); char *recv(int ms = 0); - int fileno(void); + int filenum(void); }; #ifdef __cplusplus diff --git a/src/mod/endpoints/mod_verto/mcast/mcast_wrap.cpp b/src/mod/endpoints/mod_verto/mcast/mcast_wrap.cpp index 77725cf4bd..4a92825535 100644 --- a/src/mod/endpoints/mod_verto/mcast/mcast_wrap.cpp +++ b/src/mod/endpoints/mod_verto/mcast/mcast_wrap.cpp @@ -1888,7 +1888,7 @@ XS(_wrap_McastHandle_recv) { } -XS(_wrap_McastHandle_fileno) { +XS(_wrap_McastHandle_filenum) { { McastHandle *arg1 = (McastHandle *) 0 ; int result; @@ -1898,14 +1898,14 @@ XS(_wrap_McastHandle_fileno) { dXSARGS; if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: McastHandle_fileno(self);"); + SWIG_croak("Usage: McastHandle_filenum(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_McastHandle, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "McastHandle_fileno" "', argument " "1"" of type '" "McastHandle *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "McastHandle_filenum" "', argument " "1"" of type '" "McastHandle *""'"); } arg1 = reinterpret_cast< McastHandle * >(argp1); - result = (int)(arg1)->fileno(); + result = (int)(arg1)->filenum(); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; XSRETURN(argvi); @@ -1952,7 +1952,7 @@ static swig_command_info swig_commands[] = { {"MCASTc::delete_McastHandle", _wrap_delete_McastHandle}, {"MCASTc::McastHandle_send", _wrap_McastHandle_send}, {"MCASTc::McastHandle_recv", _wrap_McastHandle_recv}, -{"MCASTc::McastHandle_fileno", _wrap_McastHandle_fileno}, +{"MCASTc::McastHandle_filenum", _wrap_McastHandle_filenum}, {0,0} }; /* -----------------------------------------------------------------------------