summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Include/pythonrun.h3
-rw-r--r--Modules/_codecsmodule.c2
-rw-r--r--Modules/_curses_panel.c2
-rw-r--r--Modules/_cursesmodule.c2
-rw-r--r--Modules/_localemodule.c2
-rw-r--r--Modules/_ssl.c2
-rw-r--r--Modules/_weakref.c2
-rw-r--r--Modules/arraymodule.c2
-rw-r--r--Modules/audioop.c2
-rw-r--r--Modules/binascii.c2
-rw-r--r--Modules/cPickle.c6
-rw-r--r--Modules/cStringIO.c6
-rw-r--r--Modules/cmathmodule.c2
-rw-r--r--Modules/cryptmodule.c2
-rw-r--r--Modules/dbmmodule.c2
-rw-r--r--Modules/dlmodule.c2
-rw-r--r--Modules/errnomodule.c2
-rw-r--r--Modules/fcntlmodule.c2
-rw-r--r--Modules/flmodule.c2
-rw-r--r--Modules/fpectlmodule.c4
-rw-r--r--Modules/fpetestmodule.c4
-rw-r--r--Modules/gdbmmodule.c2
-rw-r--r--Modules/grpmodule.c2
-rw-r--r--Modules/imageop.c2
-rw-r--r--Modules/main.c2
-rw-r--r--Modules/mathmodule.c2
-rw-r--r--Modules/md5module.c2
-rw-r--r--Modules/mpzmodule.c2
-rw-r--r--Modules/operator.c2
-rw-r--r--Modules/pcremodule.c2
-rw-r--r--Modules/posixmodule.c15
-rw-r--r--Modules/pwdmodule.c2
-rw-r--r--Modules/python.c2
-rw-r--r--Modules/readline.c2
-rw-r--r--Modules/regexmodule.c2
-rw-r--r--Modules/resource.c2
-rw-r--r--Modules/rgbimgmodule.c2
-rw-r--r--Modules/rotormodule.c2
-rw-r--r--Modules/shamodule.c2
-rw-r--r--Modules/signalmodule.c2
-rw-r--r--Modules/socketmodule.c2
-rw-r--r--Modules/stropmodule.c2
-rw-r--r--Modules/structmodule.c2
-rw-r--r--Modules/symtablemodule.c2
-rw-r--r--Modules/syslogmodule.c2
-rw-r--r--Modules/termios.c2
-rw-r--r--Modules/threadmodule.c2
-rw-r--r--Modules/timemodule.c2
-rw-r--r--Modules/timingmodule.c2
-rw-r--r--Modules/xreadlinesmodule.c2
-rw-r--r--Modules/xxmodule.c2
-rw-r--r--Modules/xxsubtype.c2
-rw-r--r--PC/WinMain.c2
53 files changed, 71 insertions, 61 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 2d7d2b6e96..7076dfea2b 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -78,6 +78,9 @@ DL_IMPORT(void) Py_Exit(int);
DL_IMPORT(int) Py_FdIsInteractive(FILE *, char *);
+/* Bootstrap */
+PyAPI_FUNC(int) Py_Main(int argc, char **argv);
+
/* In getpath.c */
PyAPI_FUNC(char *) Py_GetProgramFullPath(void);
PyAPI_FUNC(char *) Py_GetPrefix(void);
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c
index aed3c42938..d663293e88 100644
--- a/Modules/_codecsmodule.c
+++ b/Modules/_codecsmodule.c
@@ -703,7 +703,7 @@ static PyMethodDef _codecs_functions[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_codecs(void)
{
Py_InitModule("_codecs", _codecs_functions);
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c
index e616d90773..08c5f09ade 100644
--- a/Modules/_curses_panel.c
+++ b/Modules/_curses_panel.c
@@ -445,7 +445,7 @@ static PyMethodDef PyCurses_methods[] = {
/* Initialization function for the module */
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_curses_panel(void)
{
PyObject *m, *d, *v;
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index f819a9e57f..65f60f0d62 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -2474,7 +2474,7 @@ static PyMethodDef PyCurses_methods[] = {
/* Initialization function for the module */
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_curses(void)
{
PyObject *m, *d, *v, *c_api_object;
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index 5ed3eaf73d..ab86fa49ad 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -649,7 +649,7 @@ static struct PyMethodDef PyLocale_Methods[] = {
{NULL, NULL}
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_locale(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index baaa097a08..ad0b59b894 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -473,7 +473,7 @@ PyDoc_STRVAR(module_doc,
"Implementation module for SSL socket operations. See the socket module\n\
for documentation.");
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_ssl(void)
{
PyObject *m, *d;
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index 31e63d1859..86bd036cd3 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -109,7 +109,7 @@ weakref_functions[] = {
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_weakref(void)
{
PyObject *m;
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index e757d9f494..5bb5e2ceee 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1908,7 +1908,7 @@ static PyMethodDef a_methods[] = {
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initarray(void)
{
PyObject *m;
diff --git a/Modules/audioop.c b/Modules/audioop.c
index 9adbc7b45c..52824b84b6 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -1369,7 +1369,7 @@ static PyMethodDef audioop_methods[] = {
{ 0, 0 }
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initaudioop(void)
{
PyObject *m, *d;
diff --git a/Modules/binascii.c b/Modules/binascii.c
index ec07a7170a..0fe85fca60 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -1313,7 +1313,7 @@ static struct PyMethodDef binascii_module_methods[] = {
/* Initialization function for the module (*must* be called initbinascii) */
PyDoc_STRVAR(doc_binascii, "Conversion between binary data and ASCII");
-DL_EXPORT(void)
+PyMODINIT_FUNC
initbinascii(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index a43d7b9116..f8d9af85ac 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -4789,10 +4789,10 @@ init_stuff(PyObject *module_dict)
return 0;
}
-#ifndef DL_EXPORT /* declarations for DLL import/export */
-#define DL_EXPORT(RTYPE) RTYPE
+#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
+#define PyMODINIT_FUNC void
#endif
-DL_EXPORT(void)
+PyMODINIT_FUNC
initcPickle(void)
{
PyObject *m, *d, *di, *v, *k;
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index 2f85f417d9..dfab89a83b 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -701,10 +701,10 @@ static struct PycStringIO_CAPI CAPI = {
&Otype,
};
-#ifndef DL_EXPORT /* declarations for DLL import/export */
-#define DL_EXPORT(RTYPE) RTYPE
+#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
+#define PyMODINIT_FUNC void
#endif
-DL_EXPORT(void)
+PyMODINIT_FUNC
initcStringIO(void) {
PyObject *m, *d, *v;
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 5bb08f2913..8faa6bf185 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -391,7 +391,7 @@ static PyMethodDef cmath_methods[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initcmath(void)
{
PyObject *m;
diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c
index a1eaced218..050a356912 100644
--- a/Modules/cryptmodule.c
+++ b/Modules/cryptmodule.c
@@ -37,7 +37,7 @@ static PyMethodDef crypt_methods[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initcrypt(void)
{
Py_InitModule("crypt", crypt_methods);
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c
index dde5b49df3..d05a1bd849 100644
--- a/Modules/dbmmodule.c
+++ b/Modules/dbmmodule.c
@@ -339,7 +339,7 @@ static PyMethodDef dbmmodule_methods[] = {
{ 0, 0 },
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initdbm(void) {
PyObject *m, *d, *s;
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
index ea083e2ee5..927f4c0ac8 100644
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -209,7 +209,7 @@ insint(PyObject *d, char *name, int value)
Py_XDECREF(v);
}
-DL_EXPORT(void)
+PyMODINIT_FUNC
initdl(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c
index 74d4f0f310..cd3d2fab9b 100644
--- a/Modules/errnomodule.c
+++ b/Modules/errnomodule.c
@@ -57,7 +57,7 @@ Symbols that are not relevant to the underlying system are not defined.\n\
To map error codes to error messages, use the function os.strerror(),\n\
e.g. os.strerror(2) could return 'No such file or directory'.");
-DL_EXPORT(void)
+PyMODINIT_FUNC
initerrno(void)
{
PyObject *m, *d, *de;
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index f1d89cc7a7..360b54ee4c 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -462,7 +462,7 @@ all_ins(PyObject* d)
return 0;
}
-DL_EXPORT(void)
+PyMODINIT_FUNC
initfcntl(void)
{
PyObject *m, *d;
diff --git a/Modules/flmodule.c b/Modules/flmodule.c
index b3e7d1f809..2fe118d629 100644
--- a/Modules/flmodule.c
+++ b/Modules/flmodule.c
@@ -2126,7 +2126,7 @@ static PyMethodDef forms_methods[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initfl(void)
{
Py_InitModule("fl", forms_methods);
diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c
index c4b85d164a..c29bcef655 100644
--- a/Modules/fpectlmodule.c
+++ b/Modules/fpectlmodule.c
@@ -86,7 +86,7 @@ static Sigfunc sigfpe_handler;
static void fpe_reset(Sigfunc *);
static PyObject *fpe_error;
-DL_EXPORT(void) initfpectl(void);
+PyMODINIT_FUNC initfpectl(void);
static PyObject *turnon_sigfpe (PyObject *self,PyObject *args);
static PyObject *turnoff_sigfpe (PyObject *self,PyObject *args);
@@ -249,7 +249,7 @@ static void sigfpe_handler(int signo)
}
}
-DL_EXPORT(void) initfpectl(void)
+PyMODINIT_FUNC initfpectl(void)
{
PyObject *m, *d;
m = Py_InitModule("fpectl", fpectl_methods);
diff --git a/Modules/fpetestmodule.c b/Modules/fpetestmodule.c
index 565d0b7da9..aa14dd82a6 100644
--- a/Modules/fpetestmodule.c
+++ b/Modules/fpetestmodule.c
@@ -44,7 +44,7 @@
#include "Python.h"
static PyObject *fpe_error;
-DL_EXPORT(void) initfpetest(void);
+PyMODINIT_FUNC initfpetest(void);
static PyObject *test(PyObject *self,PyObject *args);
static double db0(double);
static double overflow(double);
@@ -172,7 +172,7 @@ static double overflow(double b)
return a;
}
-DL_EXPORT(void) initfpetest(void)
+PyMODINIT_FUNC initfpetest(void)
{
PyObject *m, *d;
diff --git a/Modules/gdbmmodule.c b/Modules/gdbmmodule.c
index 6e85ed3469..accf43894b 100644
--- a/Modules/gdbmmodule.c
+++ b/Modules/gdbmmodule.c
@@ -504,7 +504,7 @@ static PyMethodDef dbmmodule_methods[] = {
{ 0, 0 },
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initgdbm(void) {
PyObject *m, *d, *s;
diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c
index c834009940..8a889685fc 100644
--- a/Modules/grpmodule.c
+++ b/Modules/grpmodule.c
@@ -156,7 +156,7 @@ according to the password database. Check both databases to get\n\
complete membership information.)");
-DL_EXPORT(void)
+PyMODINIT_FUNC
initgrp(void)
{
PyObject *m, *d;
diff --git a/Modules/imageop.c b/Modules/imageop.c
index 7b925b8ab9..8c83cc3cf2 100644
--- a/Modules/imageop.c
+++ b/Modules/imageop.c
@@ -696,7 +696,7 @@ static PyMethodDef imageop_methods[] = {
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initimageop(void)
{
PyObject *m, *d;
diff --git a/Modules/main.c b/Modules/main.c
index cc07c29a02..cebb17b90d 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -105,7 +105,7 @@ usage(int exitcode, char* program)
/* Main program */
-DL_EXPORT(int)
+int
Py_Main(int argc, char **argv)
{
int c;
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 88b439f837..cbb00007ec 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -334,7 +334,7 @@ PyDoc_STRVAR(module_doc,
"This module is always available. It provides access to the\n"
"mathematical functions defined by the C standard.");
-DL_EXPORT(void)
+PyMODINIT_FUNC
initmath(void)
{
PyObject *m, *d, *v;
diff --git a/Modules/md5module.c b/Modules/md5module.c
index aa2bef8c4c..8ca2386354 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -253,7 +253,7 @@ static PyMethodDef md5_functions[] = {
/* Initialize this module. */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initmd5(void)
{
PyObject *m, *d;
diff --git a/Modules/mpzmodule.c b/Modules/mpzmodule.c
index 0cb6495642..5974df14d7 100644
--- a/Modules/mpzmodule.c
+++ b/Modules/mpzmodule.c
@@ -1644,7 +1644,7 @@ void mp_free(void *ptr, size_t size)
/* Initialize this module. */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initmpz(void)
{
PyObject *module;
diff --git a/Modules/operator.c b/Modules/operator.c
index fbe8c145aa..c1bf468955 100644
--- a/Modules/operator.c
+++ b/Modules/operator.c
@@ -219,7 +219,7 @@ spam2(ge,__ge__, "ge(a, b) -- Same as a>=b.")
/* Initialization function for the module (*must* be called initoperator) */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initoperator(void)
{
/* Create the module and add the functions */
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c
index 383dde86b2..656539a591 100644
--- a/Modules/pcremodule.c
+++ b/Modules/pcremodule.c
@@ -610,7 +610,7 @@ insint(PyObject *d, char *name, int value)
/* Initialization function for the module (*must* be called initpcre) */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initpcre(void)
{
PyObject *m, *d;
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index bf178f87fc..9b7640f19c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3211,6 +3211,7 @@ _PyPopenCreateProcess(char *cmdstring,
{
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
+ DWORD dwProcessFlags = 0; /* no NEW_CONSOLE by default for Ctrl+C handling */
char *s1,*s2, *s3 = " /c ";
const char *szConsoleSpawn = "w9xpopen.exe";
int i;
@@ -3303,6 +3304,16 @@ _PyPopenCreateProcess(char *cmdstring,
s1,
s3,
cmdstring);
+ /* Not passing CREATE_NEW_CONSOLE has been known to
+ cause random failures on win9x. Specifically a
+ dialog:
+ "Your program accessed mem currently in use at xxx"
+ and a hopeful warning about the stability of your
+ system.
+ Cost is Ctrl+C wont kill children, but anyone
+ who cares can have a go!
+ */
+ dwProcessFlags |= CREATE_NEW_CONSOLE;
}
}
@@ -3328,7 +3339,7 @@ _PyPopenCreateProcess(char *cmdstring,
NULL,
NULL,
TRUE,
- 0, /* no new console so Ctrl+C kills child too */
+ dwProcessFlags,
NULL,
NULL,
&siStartInfo,
@@ -6746,7 +6757,7 @@ all_ins(PyObject *d)
#define MODNAME "posix"
#endif
-DL_EXPORT(void)
+PyMODINIT_FUNC
INITFUNC(void)
{
PyObject *m, *v;
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index b51b7f91e1..cb139bb036 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -157,7 +157,7 @@ static PyMethodDef pwd_methods[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initpwd(void)
{
PyObject *m;
diff --git a/Modules/python.c b/Modules/python.c
index 316dd3b663..f9262e8a20 100644
--- a/Modules/python.c
+++ b/Modules/python.c
@@ -2,8 +2,6 @@
#include "Python.h"
-extern DL_EXPORT(int) Py_Main(int, char **);
-
int
main(int argc, char **argv)
{
diff --git a/Modules/readline.c b/Modules/readline.c
index afd80db98e..a2efd47f62 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -652,7 +652,7 @@ call_readline(char *prompt)
PyDoc_STRVAR(doc_module,
"Importing this module enables command line editing using GNU readline.");
-DL_EXPORT(void)
+PyMODINIT_FUNC
initreadline(void)
{
PyObject *m;
diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c
index 4c7035e501..db541612e2 100644
--- a/Modules/regexmodule.c
+++ b/Modules/regexmodule.c
@@ -642,7 +642,7 @@ static struct PyMethodDef regex_global_methods[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initregex(void)
{
PyObject *m, *d, *v;
diff --git a/Modules/resource.c b/Modules/resource.c
index 5ed98a1f0a..b1dd5d1f35 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -210,7 +210,7 @@ resource_methods[] = {
/* Module initialization */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initresource(void)
{
PyObject *m, *v;
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c
index 596ea4f671..904c64b642 100644
--- a/Modules/rgbimgmodule.c
+++ b/Modules/rgbimgmodule.c
@@ -751,7 +751,7 @@ rgbimg_methods[] = {
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initrgbimg(void)
{
PyObject *m, *d;
diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c
index 7137b00b17..dcca0c6174 100644
--- a/Modules/rotormodule.c
+++ b/Modules/rotormodule.c
@@ -615,7 +615,7 @@ rotor_methods[] = {
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initrotor(void)
{
Rotor_Type.ob_type = &PyType_Type;
diff --git a/Modules/shamodule.c b/Modules/shamodule.c
index 14e51ea6eb..5b9040d9a6 100644
--- a/Modules/shamodule.c
+++ b/Modules/shamodule.c
@@ -525,7 +525,7 @@ static struct PyMethodDef SHA_functions[] = {
#define insint(n,v) { PyModule_AddIntConstant(m,n,v); }
-DL_EXPORT(void)
+PyMODINIT_FUNC
initsha(void)
{
PyObject *m;
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 25d5d94a5a..0f9574fe29 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -469,7 +469,7 @@ SIGINT, SIGTERM, etc. -- signal numbers\n\
A signal handler function is called with two arguments:\n\
the first is the signal number, the second is the interrupted stack frame.");
-DL_EXPORT(void)
+PyMODINIT_FUNC
initsignal(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 8024006c66..b9358b7510 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3008,7 +3008,7 @@ PyDoc_STRVAR(socket_doc,
"Implementation module for socket operations. See the socket module\n\
for documentation.");
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_socket(void)
{
PyObject *m;
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c
index 09bcc3d305..8eb64a070a 100644
--- a/Modules/stropmodule.c
+++ b/Modules/stropmodule.c
@@ -1203,7 +1203,7 @@ strop_methods[] = {
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initstrop(void)
{
PyObject *m, *s;
diff --git a/Modules/structmodule.c b/Modules/structmodule.c
index 5d4de116d8..093cd7b9e1 100644
--- a/Modules/structmodule.c
+++ b/Modules/structmodule.c
@@ -1499,7 +1499,7 @@ static PyMethodDef struct_methods[] = {
/* Module initialization */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initstruct(void)
{
PyObject *m;
diff --git a/Modules/symtablemodule.c b/Modules/symtablemodule.c
index e24e72fb10..9854a1cf6c 100644
--- a/Modules/symtablemodule.c
+++ b/Modules/symtablemodule.c
@@ -43,7 +43,7 @@ static PyMethodDef symtable_methods[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
init_symtable(void)
{
PyObject *m;
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c
index 2d886e1e5b..75deb1b8d7 100644
--- a/Modules/syslogmodule.c
+++ b/Modules/syslogmodule.c
@@ -155,7 +155,7 @@ static PyMethodDef syslog_methods[] = {
/* Initialization function for the module */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initsyslog(void)
{
PyObject *m;
diff --git a/Modules/termios.c b/Modules/termios.c
index ed78ece933..3ace25c4e1 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -892,7 +892,7 @@ static struct constant {
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
PyInit_termios(void)
{
PyObject *m;
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index b872dd0213..896d4faa60 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -360,7 +360,7 @@ A lock is not owned by the thread that locked it; another thread may\n\
unlock it. A thread attempting to lock a lock that it has already locked\n\
will block until another thread unlocks it. Deadlocks may ensue.");
-DL_EXPORT(void)
+PyMODINIT_FUNC
initthread(void)
{
PyObject *m, *d;
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index eb48c2bd10..13da2ffe24 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -620,7 +620,7 @@ strftime() -- convert time tuple to string according to format specification\n\
strptime() -- parse string to time tuple according to format specification");
-DL_EXPORT(void)
+PyMODINIT_FUNC
inittime(void)
{
PyObject *m;
diff --git a/Modules/timingmodule.c b/Modules/timingmodule.c
index 4e10e31349..56e057a656 100644
--- a/Modules/timingmodule.c
+++ b/Modules/timingmodule.c
@@ -52,7 +52,7 @@ static PyMethodDef timing_methods[] = {
};
-DL_EXPORT(void) inittiming(void)
+PyMODINIT_FUNC inittiming(void)
{
(void)Py_InitModule("timing", timing_methods);
}
diff --git a/Modules/xreadlinesmodule.c b/Modules/xreadlinesmodule.c
index 8c6b91f201..3009768192 100644
--- a/Modules/xreadlinesmodule.c
+++ b/Modules/xreadlinesmodule.c
@@ -168,7 +168,7 @@ static PyMethodDef xreadlines_functions[] = {
{NULL, NULL}
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initxreadlines(void)
{
XReadlinesObject_Type.ob_type = &PyType_Type;
diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c
index 2264dfb5c0..125d2ece1a 100644
--- a/Modules/xxmodule.c
+++ b/Modules/xxmodule.c
@@ -218,7 +218,7 @@ static PyMethodDef xx_methods[] = {
/* Initialization function for the module (*must* be called initxx) */
-DL_EXPORT(void)
+PyMODINIT_FUNC
initxx(void)
{
PyObject *m;
diff --git a/Modules/xxsubtype.c b/Modules/xxsubtype.c
index 90134678d3..c826b6e633 100644
--- a/Modules/xxsubtype.c
+++ b/Modules/xxsubtype.c
@@ -263,7 +263,7 @@ static PyMethodDef xxsubtype_functions[] = {
{NULL, NULL} /* sentinel */
};
-DL_EXPORT(void)
+PyMODINIT_FUNC
initxxsubtype(void)
{
PyObject *m;
diff --git a/PC/WinMain.c b/PC/WinMain.c
index 7ee1ad69f3..00dc18d484 100644
--- a/PC/WinMain.c
+++ b/PC/WinMain.c
@@ -5,8 +5,6 @@
#include "Python.h"
-extern int Py_Main(int, char **);
-
int WINAPI WinMain(
HINSTANCE hInstance, /* handle to current instance */
HINSTANCE hPrevInstance, /* handle to previous instance */