Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
22ffac1b
Commit
22ffac1b
authored
Mar 06, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use setvbuf unless HAVE_SETVBUF is defined.
parent
859c797a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
Modules/main.c
Modules/main.c
+12
-4
No files found.
Modules/main.c
View file @
22ffac1b
...
...
@@ -205,25 +205,33 @@ Py_Main(argc, argv)
_setmode
(
fileno
(
stdout
),
O_BINARY
);
#endif
#ifndef MPW
#ifdef HAVE_SETVBUF
setvbuf
(
stdin
,
(
char
*
)
NULL
,
_IONBF
,
BUFSIZ
);
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IONBF
,
BUFSIZ
);
setvbuf
(
stderr
,
(
char
*
)
NULL
,
_IONBF
,
BUFSIZ
);
#else
#else
/* !HAVE_SETVBUF */
setbuf
(
stdin
,
(
char
*
)
NULL
);
setbuf
(
stdout
,
(
char
*
)
NULL
);
setbuf
(
stderr
,
(
char
*
)
NULL
);
#endif
/* !HAVE_SETVBUF */
#else
/* MPW */
/* On MPW (3.2) unbuffered seems to hang */
setvbuf
(
stdin
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
setvbuf
(
stderr
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
#endif
#endif
/* MPW */
}
else
if
(
Py_InteractiveFlag
)
{
#ifdef MS_WINDOWS
/* Doesn't have to have line-buffered -- use unbuffered */
setvbuf
(
stdin
,
(
char
*
)
NULL
,
_IONBF
,
BUFSIZ
);
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IONBF
,
BUFSIZ
);
#else
#else
/* !MS_WINDOWS */
#ifdef HAVE_SETVBUF
setvbuf
(
stdin
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IOLBF
,
BUFSIZ
);
#endif
#endif
/* HAVE_SETVBUF */
#endif
/* !MS_WINDOWS */
/* Leave stderr alone - it should be unbuffered anyway. */
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment