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
|
#endif
|
||||||
static int Connection_SetOCIAttr(udt_Connection*, PyObject*, ub4*);
|
static int Connection_SetOCIAttr(udt_Connection*, PyObject*, ub4*);
|
||||||
#ifdef ORACLE_10GR2
|
#ifdef ORACLE_10GR2
|
||||||
|
#if !defined(AIX5) || defined(ORACLE_11g)
|
||||||
static PyObject *Connection_Ping(udt_Connection*, PyObject*);
|
static PyObject *Connection_Ping(udt_Connection*, PyObject*);
|
||||||
|
#endif
|
||||||
static PyObject *Connection_Shutdown(udt_Connection*, PyObject*, PyObject*);
|
static PyObject *Connection_Shutdown(udt_Connection*, PyObject*, PyObject*);
|
||||||
static PyObject *Connection_Startup(udt_Connection*, PyObject*, PyObject*);
|
static PyObject *Connection_Startup(udt_Connection*, PyObject*, PyObject*);
|
||||||
static PyObject *Connection_Subscribe(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 },
|
{ "__enter__", (PyCFunction) Connection_ContextManagerEnter, METH_NOARGS },
|
||||||
{ "__exit__", (PyCFunction) Connection_ContextManagerExit, METH_VARARGS },
|
{ "__exit__", (PyCFunction) Connection_ContextManagerExit, METH_VARARGS },
|
||||||
#ifdef ORACLE_10GR2
|
#ifdef ORACLE_10GR2
|
||||||
|
#if !defined(AIX5) || defined(ORACLE_11g)
|
||||||
{ "ping", (PyCFunction) Connection_Ping, METH_NOARGS },
|
{ "ping", (PyCFunction) Connection_Ping, METH_NOARGS },
|
||||||
|
#endif
|
||||||
{ "shutdown", (PyCFunction) Connection_Shutdown,
|
{ "shutdown", (PyCFunction) Connection_Shutdown,
|
||||||
METH_VARARGS | METH_KEYWORDS},
|
METH_VARARGS | METH_KEYWORDS},
|
||||||
{ "startup", (PyCFunction) Connection_Startup,
|
{ "startup", (PyCFunction) Connection_Startup,
|
||||||
|
@ -1551,6 +1555,7 @@ static PyObject *Connection_ContextManagerExit(
|
||||||
|
|
||||||
|
|
||||||
#ifdef ORACLE_10GR2
|
#ifdef ORACLE_10GR2
|
||||||
|
#if !defined(AIX5) || defined(ORACLE_11g)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Connection_Ping()
|
// Connection_Ping()
|
||||||
// Makes a round trip call to the server to confirm that the connection and
|
// 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);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -196,6 +196,8 @@ extraCompileArgs = ["-DBUILD_VERSION=%s" % BUILD_VERSION]
|
||||||
extraLinkArgs = []
|
extraLinkArgs = []
|
||||||
if sys.platform == "aix4":
|
if sys.platform == "aix4":
|
||||||
extraCompileArgs.append("-qcpluscmt")
|
extraCompileArgs.append("-qcpluscmt")
|
||||||
|
elif sys.platform == "aix5":
|
||||||
|
extraCompileArgs.append("-DAIX5")
|
||||||
elif sys.platform == "cygwin":
|
elif sys.platform == "cygwin":
|
||||||
extraCompileArgs.append("-mno-cygwin")
|
extraCompileArgs.append("-mno-cygwin")
|
||||||
extraLinkArgs.append("-Wl,--enable-runtime-pseudo-reloc")
|
extraLinkArgs.append("-Wl,--enable-runtime-pseudo-reloc")
|
||||||
|
|
Loading…
Reference in New Issue