summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Python/macmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c
index 8b38a2c..a4f7dc4 100644
--- a/Mac/Python/macmain.c
+++ b/Mac/Python/macmain.c
@@ -611,7 +611,7 @@ Py_Main(int argc, char **argv, char *filename)
Py_GetVersion(), Py_GetPlatform(), COPYRIGHT);
if (filename != NULL) {
- if ((fp = fopen(filename, "r")) == NULL) {
+ if ((fp = fopen(filename, "r" PY_STDIOTEXTMODE)) == NULL) {
fprintf(stderr, "%s: can't open file '%s'\n",
argv[0], filename);
PyMac_Exit(2);
@@ -630,7 +630,7 @@ Py_Main(int argc, char **argv, char *filename)
PySys_SetArgv(argc, argv);
if (filename == NULL && isatty((int)fileno(fp))) {
- FILE *fp = fopen(STARTUP, "r");
+ FILE *fp = fopen(STARTUP, "r" PY_STDIOTEXTMODE);
if (fp != NULL) {
(void) PyRun_SimpleFile(fp, STARTUP);
PyErr_Clear();