- included autoconf tests for gcc-2.95 problems so that it will compile w/o

change for good old gcc-2.95 and gcc3


git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@58 4ebea2bb-67d4-0310-8558-a5799e421b66
This commit is contained in:
gernot 2003-03-21 23:09:59 +00:00
parent ae14dfc25a
commit aa76c2b64b
4 changed files with 46 additions and 6 deletions

View File

@ -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 <ostream> header])
AC_TRY_CPP([#include <ostream>],
[
AC_DEFINE([HAVE_OSTREAM],1,[we can #include<ostream> 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 <string>],
[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.

View File

@ -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))

View File

@ -2,7 +2,7 @@
@brief Contains PythonScript - Read a python script and call a function in own thread
@author Gernot Hillier <gernot@hillier.de>
$Revision: 1.1 $
$Revision: 1.2 $
*/
/***************************************************************************
@ -17,8 +17,13 @@
#ifndef PYTHONSCRIPT_H
#define PYTHONSCRIPT_H
#include <../../config.h>
#include <Python.h>
#include <ostream>
#ifdef HAVE_OSTREAM
#include <ostream>
#else
#include <ostream.h>
#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

View File

@ -2,7 +2,7 @@
@brief Contains Connection - Encapsulates a CAPI connection with all its states and methods.
@author Gernot Hillier <gernot@hillier.de>
$Revision: 1.2 $
$Revision: 1.3 $
*/
/***************************************************************************
@ -14,6 +14,7 @@
* *
***************************************************************************/
#include <../../config.h>
#include <fstream>
#include <pthread.h>
#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