Index: Include/pyport.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v retrieving revision 2.62 diff -u -p -r2.62 pyport.h --- Include/pyport.h 4 Sep 2003 11:04:06 -0000 2.62 +++ Include/pyport.h 4 Sep 2003 11:19:11 -0000 @@ -428,7 +428,12 @@ extern double hypot(double, double); # define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE # define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE /* module init functions inside the core need no external linkage */ -# define PyMODINIT_FUNC void + /* except for Cygwin to handle embedding (FIXME: BeOS too?) */ +# if defined(__CYGWIN__) +# define PyMODINIT_FUNC __declspec(dllexport) void +# else /* __CYGWIN__ */ +# define PyMODINIT_FUNC void +# endif /* __CYGWIN__ */ # else /* Py_BUILD_CORE */ /* Building an extension module, or an embedded situation */ /* public Python functions and data are imported */ Index: Modules/gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.71 diff -u -p -r2.71 gcmodule.c --- Modules/gcmodule.c 17 Apr 2003 17:29:21 -0000 2.71 +++ Modules/gcmodule.c 4 Sep 2003 11:19:11 -0000 @@ -951,7 +951,7 @@ static PyMethodDef GcMethods[] = { {NULL, NULL} /* Sentinel */ }; -void +PyMODINIT_FUNC initgc(void) { PyObject *m; Index: Python/import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.222 diff -u -p -r2.222 import.c --- Python/import.c 11 Jul 2003 15:01:02 -0000 2.222 +++ Python/import.c 4 Sep 2003 11:19:11 -0000 @@ -2841,7 +2841,7 @@ setint(PyObject *d, char *name, int valu return err; } -void +PyMODINIT_FUNC initimp(void) { PyObject *m, *d; Index: Python/marshal.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v retrieving revision 1.74 diff -u -p -r1.74 marshal.c --- Python/marshal.c 30 Jul 2002 11:44:44 -0000 1.74 +++ Python/marshal.c 4 Sep 2003 11:19:12 -0000 @@ -875,7 +875,7 @@ static PyMethodDef marshal_methods[] = { {NULL, NULL} /* sentinel */ }; -void +PyMODINIT_FUNC PyMarshal_Init(void) { (void) Py_InitModule("marshal", marshal_methods);