From: Martin v. Löwis Date: Sat, 28 Jul 2012 19:55:20 +0000 (+0200) Subject: Issue #15431: Declare PyImport_FrozenModules conditionally on Unix only. X-Git-Tag: v3.3.0b2~87^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee365ac2547a280a5cde0e945a02654c0afb3f9e;p=thirdparty%2FPython%2Fcpython.git Issue #15431: Declare PyImport_FrozenModules conditionally on Unix only. --- diff --git a/Modules/_freeze_importlib.c b/Modules/_freeze_importlib.c index a96e76e9d395..65b29e1f8c2a 100644 --- a/Modules/_freeze_importlib.c +++ b/Modules/_freeze_importlib.c @@ -21,6 +21,13 @@ static struct _frozen _PyImport_FrozenModules[] = { {0, 0, 0} /* sentinel */ }; +#ifndef MS_WINDOWS +/* On Windows, this links with the regular pythonXY.dll, so this variable comes + from frozen.obj. In the Makefile, frozen.o is not linked into this executable, + so we define the variable here. */ +struct _frozen *PyImport_FrozenModules; +#endif + const char header[] = "/* Auto-generated by Modules/_freeze_importlib.c */"; int @@ -91,8 +98,8 @@ main(int argc, char *argv[]) data_size = PyBytes_GET_SIZE(marshalled); /* Open the file in text mode. The hg checkout should be using the eol extension, - which in turn should cause the existing file to use CRLF */ - outfile = fopen(outpath, "wt"); + which in turn should cause the EOL style match the C library's text mode */ + outfile = fopen(outpath, "w"); if (outfile == NULL) { fprintf(stderr, "cannot open '%s' for writing\n", outpath); return 1;