diff --git a/acinclude.m4 b/acinclude.m4 index 576cffc..96cd771 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,7 +1,7 @@ # # Autoconf macros for configuring the build of Python extension modules # -# $Header: /root/cvs2svn/capisuite/capisuite/acinclude.m4,v 1.1 2003/02/19 08:19:52 gernot Exp $ +# $Header: /root/cvs2svn/capisuite/capisuite/acinclude.m4,v 1.2 2003/03/21 23:09:59 gernot Exp $ # # taken out of Postgres CVS by Gernot Hillier # @@ -19,6 +19,26 @@ AC_DEFUN(CS_SET_DOCDIR, AC_SUBST(docdir) ]) +AC_DEFUN(CS_TEST_GCC3, +[AC_MSG_CHECKING([for header]) +AC_TRY_CPP([#include ], + [ + AC_DEFINE([HAVE_OSTREAM],1,[we can #include instead of ostream.h - new gcc3 feature]) + AC_MSG_RESULT([yes]) + ], + AC_MSG_RESULT([use ostream.h instead]) +) +AC_MSG_CHECKING([for string::clear method]) +AC_TRY_COMPILE([#include ], + [std::string a; a.clear();], + [ + AC_DEFINE([HAVE_STRING_CLEAR],1,[we have string::clear]) + AC_MSG_RESULT([yes]) + ], + AC_MSG_RESULT([use assignment of "" instead]) +) +]) dnl CS_TEST_GCC + # PGAC_CHECK_PYTHON_DIRS # ----------------------- # Determine the name of various directory of a given Python installation. diff --git a/configure.in b/configure.in index 8f3b264..dc97515 100644 --- a/configure.in +++ b/configure.in @@ -15,6 +15,8 @@ AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_HEADERS([sys/time.h]) AC_HEADER_TIME +CS_TEST_GCC3 + CS_SET_DOCDIR AC_CHECK_LIB(capi20,capi20_register,,AC_MSG_ERROR(libcapi20 not found)) diff --git a/src/application/pythonscript.h b/src/application/pythonscript.h index 098f1fa..8fcbb4d 100644 --- a/src/application/pythonscript.h +++ b/src/application/pythonscript.h @@ -2,7 +2,7 @@ @brief Contains PythonScript - Read a python script and call a function in own thread @author Gernot Hillier - $Revision: 1.1 $ + $Revision: 1.2 $ */ /*************************************************************************** @@ -17,8 +17,13 @@ #ifndef PYTHONSCRIPT_H #define PYTHONSCRIPT_H +#include <../../config.h> #include -#include +#ifdef HAVE_OSTREAM + #include +#else + #include +#endif #include "applicationexception.h" class PycStringIO_CAPI; @@ -83,8 +88,12 @@ class PythonScript /* History $Log: pythonscript.h,v $ -Revision 1.1 2003/02/19 08:19:53 gernot -Initial revision +Revision 1.2 2003/03/21 23:09:59 gernot +- included autoconf tests for gcc-2.95 problems so that it will compile w/o + change for good old gcc-2.95 and gcc3 + +Revision 1.1.1.1 2003/02/19 08:19:53 gernot +initial checkin of 0.4 Revision 1.6 2003/02/10 14:17:09 ghillie merged from NATIVE_PTHREADS to HEAD diff --git a/src/backend/connection.cpp b/src/backend/connection.cpp index cfc7b9a..7723861 100644 --- a/src/backend/connection.cpp +++ b/src/backend/connection.cpp @@ -2,7 +2,7 @@ @brief Contains Connection - Encapsulates a CAPI connection with all its states and methods. @author Gernot Hillier - $Revision: 1.2 $ + $Revision: 1.3 $ */ /*************************************************************************** @@ -14,6 +14,7 @@ * * ***************************************************************************/ +#include <../../config.h> #include #include #include "capi.h" @@ -888,7 +889,11 @@ Connection::getDTMF() void Connection::clearDTMF() { +#ifdef HAVE_STRING_CLEAR received_dtmf.clear(); +#else + received_dtmf=""; +#endif } string @@ -967,6 +972,10 @@ Connection::buildBconfiguration(service_t service, string faxStationID, string f /* History $Log: connection.cpp,v $ +Revision 1.3 2003/03/21 23:09:59 gernot +- included autoconf tests for gcc-2.95 problems so that it will compile w/o + change for good old gcc-2.95 and gcc3 + Revision 1.2 2003/02/28 21:36:51 gernot - don't allocate new B3config in buildBconfiguration(), fixes bug 532 - limit stationID to 20 characters