sharedlibs = [
('/usr/lib/libc.so', 'getpid'),
('/lib/libc.so.6', 'getpid'),
+ ('/usr/bin/cygwin1.dll', 'getpid'),
]
for s, func in sharedlibs:
static PyTypeObject Dltype = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"dl", /*tp_name*/
sizeof(dlobject), /*tp_basicsize*/
Py_XDECREF(v);
}
-void
+DL_EXPORT(void)
initdl(void)
{
PyObject *m, *d, *x;
return;
}
+ /* Initialize object type */
+ Dltype.ob_type = &PyType_Type;
+
/* Create the module and add the functions */
m = Py_InitModule("dl", dl_methods);
exts.append( Extension('dl', ['dlmodule.c']) )
# Sun yellow pages. Some systems have the functions in libc.
- if (self.compiler.find_library_file(lib_dirs, 'nsl')):
- libs = ['nsl']
- else:
- libs = []
- exts.append( Extension('nis', ['nismodule.c'],
- libraries = libs) )
+ if platform not in ['cygwin']:
+ if (self.compiler.find_library_file(lib_dirs, 'nsl')):
+ libs = ['nsl']
+ else:
+ libs = []
+ exts.append( Extension('nis', ['nismodule.c'],
+ libraries = libs) )
# Curses support, requring the System V version of curses, often
# provided by the ncurses library.