author | Mike Sullivan <Mike.Sullivan@Oracle.COM> |
Mon, 11 Mar 2013 10:38:09 -0700 | |
branch | s11-update |
changeset 2520 | ceec631e74d1 |
parent 841 | 1a62cefa636d |
permissions | -rw-r--r-- |
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset
|
1 |
diff --git Python-2.6.4/Modules/posixmodule.c Python-2.6.4/Modules/posixmodule.c |
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset
|
2 |
--- Python-2.6.4/Modules/posixmodule.c |
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset
|
3 |
+++ Python-2.6.4/Modules/posixmodule.c |
841
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
4 |
@@ -1997,6 +1997,8 @@ |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
5 |
char *res = NULL; |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
6 |
PyObject *dynamic_return; |
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset
|
7 |
|
841
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
8 |
+ int maxsize = pathconf(".", _PC_PATH_MAX); |
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset
|
9 |
+ |
841
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
10 |
Py_BEGIN_ALLOW_THREADS |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
11 |
do { |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
12 |
bufsize = bufsize + bufsize_incr; |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
13 |
@@ -2013,7 +2015,7 @@ |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
14 |
if (res == NULL) { |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
15 |
free(tmpbuf); |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
16 |
} |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
17 |
- } while ((res == NULL) && (errno == ERANGE)); |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
18 |
+ } while ((res == NULL) && (errno == ERANGE) && (bufsize < maxsize)); |
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
19 |
Py_END_ALLOW_THREADS |
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset
|
20 |
|
841
1a62cefa636d
7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
115
diff
changeset
|
21 |
if (res == NULL) |