Make AIX5 happy as OCIPing does not appear to be available on that platform
under Oracle 10g Release 2. Thanks to Pierre-Yves Fontaniere for the patch.
This commit is contained in:
parent
0665dff62b
commit
fb2e048851
|
@ -73,7 +73,9 @@ static PyObject *Connection_GetOCIAttr(udt_Connection*, ub4*);
|
|||
#endif
|
||||
static int Connection_SetOCIAttr(udt_Connection*, PyObject*, ub4*);
|
||||
#ifdef ORACLE_10GR2
|
||||
#if !defined(AIX5) || defined(ORACLE_11g)
|
||||
static PyObject *Connection_Ping(udt_Connection*, PyObject*);
|
||||
#endif
|
||||
static PyObject *Connection_Shutdown(udt_Connection*, PyObject*, PyObject*);
|
||||
static PyObject *Connection_Startup(udt_Connection*, PyObject*, PyObject*);
|
||||
static PyObject *Connection_Subscribe(udt_Connection*, PyObject*, PyObject*);
|
||||
|
@ -96,7 +98,9 @@ static PyMethodDef g_ConnectionMethods[] = {
|
|||
{ "__enter__", (PyCFunction) Connection_ContextManagerEnter, METH_NOARGS },
|
||||
{ "__exit__", (PyCFunction) Connection_ContextManagerExit, METH_VARARGS },
|
||||
#ifdef ORACLE_10GR2
|
||||
#if !defined(AIX5) || defined(ORACLE_11g)
|
||||
{ "ping", (PyCFunction) Connection_Ping, METH_NOARGS },
|
||||
#endif
|
||||
{ "shutdown", (PyCFunction) Connection_Shutdown,
|
||||
METH_VARARGS | METH_KEYWORDS},
|
||||
{ "startup", (PyCFunction) Connection_Startup,
|
||||
|
@ -1551,6 +1555,7 @@ static PyObject *Connection_ContextManagerExit(
|
|||
|
||||
|
||||
#ifdef ORACLE_10GR2
|
||||
#if !defined(AIX5) || defined(ORACLE_11g)
|
||||
//-----------------------------------------------------------------------------
|
||||
// Connection_Ping()
|
||||
// Makes a round trip call to the server to confirm that the connection and
|
||||
|
@ -1572,6 +1577,7 @@ static PyObject *Connection_Ping(
|
|||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
2
setup.py
2
setup.py
|
@ -196,6 +196,8 @@ extraCompileArgs = ["-DBUILD_VERSION=%s" % BUILD_VERSION]
|
|||
extraLinkArgs = []
|
||||
if sys.platform == "aix4":
|
||||
extraCompileArgs.append("-qcpluscmt")
|
||||
elif sys.platform == "aix5":
|
||||
extraCompileArgs.append("-DAIX5")
|
||||
elif sys.platform == "cygwin":
|
||||
extraCompileArgs.append("-mno-cygwin")
|
||||
extraLinkArgs.append("-Wl,--enable-runtime-pseudo-reloc")
|
||||
|
|
Loading…
Reference in New Issue