summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-09-20 10:43:24 (GMT)
committerChristian Heimes <christian@cheimes.de>2012-09-20 10:43:24 (GMT)
commit1c47222a256f2977dcbb36c05dce7a5ae8e6ae06 (patch)
treeaadc18979dd5ef6c6aae06f00100105b0d0ed460 /Modules
parent5cb31c9277500745b443dacf183fd16c7704577b (diff)
parentfe6e7e6b30464d7c742bddbe5e96d6ca886ae123 (diff)
downloadcpython-1c47222a256f2977dcbb36c05dce7a5ae8e6ae06.zip
cpython-1c47222a256f2977dcbb36c05dce7a5ae8e6ae06.tar.gz
cpython-1c47222a256f2977dcbb36c05dce7a5ae8e6ae06.tar.bz2
merge
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/_iomodule.c2
-rw-r--r--Modules/_io/iobase.c2
-rw-r--r--Modules/_io/textio.c2
-rw-r--r--Modules/posixmodule.c9
4 files changed, 11 insertions, 4 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index 0622c58..d3a87e7 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -185,7 +185,7 @@ PyDoc_STRVAR(open_doc,
"\n"
"* On output, if newline is None, any '\\n' characters written are\n"
" translated to the system default line separator, os.linesep. If\n"
-" newline is '' or '\n', no translation takes place. If newline is any\n"
+" newline is '' or '\\n', no translation takes place. If newline is any\n"
" of the other legal values, any '\\n' characters written are translated\n"
" to the given string.\n"
"\n"
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index dd052ae..babb019 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -442,7 +442,7 @@ PyDoc_STRVAR(iobase_readline_doc,
"\n"
"If limit is specified, at most limit bytes will be read.\n"
"\n"
- "The line terminator is always b'\n' for binary files; for text\n"
+ "The line terminator is always b'\\n' for binary files; for text\n"
"files, the newlines argument to open can be used to select the line\n"
"terminator(s) recognized.\n");
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index fb9b674..96434a8 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -648,7 +648,7 @@ PyDoc_STRVAR(textiowrapper_doc,
"\n"
"* On output, if newline is None, any '\\n' characters written are\n"
" translated to the system default line separator, os.linesep. If\n"
- " newline is '' or '\n', no translation takes place. If newline is any\n"
+ " newline is '' or '\\n', no translation takes place. If newline is any\n"
" of the other legal values, any '\\n' characters written are translated\n"
" to the given string.\n"
"\n"
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 54f6cd2..e0efebf 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -414,7 +414,14 @@ win32_warn_bytes_api()
#ifdef AT_FDCWD
-#define DEFAULT_DIR_FD AT_FDCWD
+/*
+ * Why the (int) cast? Solaris 10 defines AT_FDCWD as 0xffd19553 (-3041965);
+ * without the int cast, the value gets interpreted as uint (4291925331),
+ * which doesn't play nicely with all the initializer lines in this file that
+ * look like this:
+ * int dir_fd = DEFAULT_DIR_FD;
+ */
+#define DEFAULT_DIR_FD (int)AT_FDCWD
#else
#define DEFAULT_DIR_FD (-100)
#endif