Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(479)

Side by Side Diff: Modules/selectmodule.c

Issue 9862: PIPE_BUF is invalid on AIX
Patch Set: Created 9 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « configure.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* select - Module containing unix select(2) call. 1 /* select - Module containing unix select(2) call.
2 Under Unix, the file descriptors are small integers. 2 Under Unix, the file descriptors are small integers.
3 Under Win32, select only exists for sockets, and sockets may 3 Under Win32, select only exists for sockets, and sockets may
4 have any value except INVALID_SOCKET. 4 have any value except INVALID_SOCKET.
5 */ 5 */
6 6
7 #include "Python.h" 7 #include "Python.h"
8 #include <structmember.h> 8 #include <structmember.h>
9 9
10 #ifdef __APPLE__ 10 #ifdef __APPLE__
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 PyObject *m; 1779 PyObject *m;
1780 m = PyModule_Create(&selectmodule); 1780 m = PyModule_Create(&selectmodule);
1781 if (m == NULL) 1781 if (m == NULL)
1782 return NULL; 1782 return NULL;
1783 1783
1784 SelectError = PyErr_NewException("select.error", NULL, NULL); 1784 SelectError = PyErr_NewException("select.error", NULL, NULL);
1785 Py_INCREF(SelectError); 1785 Py_INCREF(SelectError);
1786 PyModule_AddObject(m, "error", SelectError); 1786 PyModule_AddObject(m, "error", SelectError);
1787 1787
1788 #ifdef PIPE_BUF 1788 #ifdef PIPE_BUF
1789 #ifdef HAVE_BROKEN_PIPE_BUF
1790 #undef PIPE_BUF
1791 #define PIPE_BUF 512
1792 #endif
1789 PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF); 1793 PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF);
1790 #endif 1794 #endif
1791 1795
1792 #if defined(HAVE_POLL) 1796 #if defined(HAVE_POLL)
1793 #ifdef __APPLE__ 1797 #ifdef __APPLE__
1794 if (select_have_broken_poll()) { 1798 if (select_have_broken_poll()) {
1795 if (PyObject_DelAttrString(m, "poll") == -1) { 1799 if (PyObject_DelAttrString(m, "poll") == -1) {
1796 PyErr_Clear(); 1800 PyErr_Clear();
1797 } 1801 }
1798 } else { 1802 } else {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 /* NETDEV filter flags */ 1923 /* NETDEV filter flags */
1920 #ifdef EVFILT_NETDEV 1924 #ifdef EVFILT_NETDEV
1921 PyModule_AddIntConstant(m, "KQ_NOTE_LINKUP", NOTE_LINKUP); 1925 PyModule_AddIntConstant(m, "KQ_NOTE_LINKUP", NOTE_LINKUP);
1922 PyModule_AddIntConstant(m, "KQ_NOTE_LINKDOWN", NOTE_LINKDOWN); 1926 PyModule_AddIntConstant(m, "KQ_NOTE_LINKDOWN", NOTE_LINKDOWN);
1923 PyModule_AddIntConstant(m, "KQ_NOTE_LINKINV", NOTE_LINKINV); 1927 PyModule_AddIntConstant(m, "KQ_NOTE_LINKINV", NOTE_LINKINV);
1924 #endif 1928 #endif
1925 1929
1926 #endif /* HAVE_KQUEUE */ 1930 #endif /* HAVE_KQUEUE */
1927 return m; 1931 return m;
1928 } 1932 }
OLDNEW
« no previous file with comments | « configure.in ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+