Victor Stinner
e254e53c83
Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket. repr(socket.socket) already works fine.
12 years ago
Berker Peksag
a6ec5ee3c8
Fix typo in socket.getaddrinfo() docstring.
Reported by Krishna Kumar Thakur on docs@.
12 years ago
Vinay Sajip
ed6783f315
Issue #10141 , Issue 20065: Changed #if to take CAN_RAW into account.
12 years ago
Vinay Sajip
ecfc98c67b
Issue #10141 : updated new usages of AF_CAN to be in #ifdef AF_CAN rather than #ifdef HAVE_LINUX_CAN_H to allow compilation on older Linuxes.
12 years ago
Charles-François Natali
b4062e8f8a
Issue #20065 : socketmodule: Fix build error when AF_CAN is defined without the
proper CAN headers.
12 years ago
Benjamin Peterson
a677d7628b
remove overly strict assertion ( closes #20251 )
12 years ago
Benjamin Peterson
c6b37e21f5
merge 3.3 ( #20246 )
12 years ago
Benjamin Peterson
fbf648ebba
complain when nbytes > buflen to fix possible buffer overflow ( closes #20246 )
12 years ago
Brett Cannon
b05cbe61b3
Issue #12837 : Silence a Clang compiler warning on OS X.
Now makes CPython build without warnings on OS X under Clang with
-Wno-unused-value -Wno-empty-body -Qunused-arguments
-Wno-deprecated-declarations.
Thanks to David Watson for taking an initial stab at a solution.
12 years ago
Christian Heimes
af01f66817
Issue #16136 : Remove VMS support and VMS-related code
12 years ago
Guido van Rossum
638aebd58e
Fix broken docstring continuation line for detach().
12 years ago
Victor Stinner
9a954838ab
Close #19827 : On UNIX, setblocking() and settimeout() methods of socket.socket
can now avoid a second syscall if the ioctl() function can be used, or if the
non-blocking flag of the socket is unchanged.
12 years ago
Benjamin Peterson
1314ef73d0
add SO_PRIORITY ( closes #19802 )
Patch by Claudiu Popa.
12 years ago
Victor Stinner
e990c6e952
Fix sock_recvfrom_guts(): recvfrom() size is limited to an int on Windows, not
on other OSes!
12 years ago
Jason R. Coombs
8ec784c2df
Issue #7171 : Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix).
12 years ago
Georg Brandl
6083a4bc1c
Re #18521 : remove assignments of variables that are immediately reassigned.
12 years ago
Charles-François Natali
0cc86850b6
Issue #16201 : socket: Use inet_pton()/inet_addr() instead of ad-hoc parsing for
numeric IP addresses.
12 years ago
Charles-François Natali
24aa041731
Use INADDR_BROADCAST instead of hard-coded value (it's part of POSIX and
already appears without #ifdef a couple lines above).
13 years ago
Victor Stinner
daf455554b
Issue #18571 : Implementation of the PEP 446: file descriptors and file handles
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
13 years ago
Serhiy Storchaka
9594942716
Issue #18783 : Removed existing mentions of Python long type in docstrings,
error messages and comments.
13 years ago
Christian Heimes
9228837e31
Issue #18549 : Eliminate dead code in socket_ntohl().
CID 982369
13 years ago
Victor Stinner
14b9b11098
If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified.
13 years ago
Victor Stinner
9a644b23cc
Issue #9566 : recv(), recvfrom(), send(), sendall() and sendto() methods
of socket.socket objects now truncate the input buffer to INT_MAX bytes on
Windows to avoid an integer overflow.
(sendall() still send the whole buffer.)
13 years ago
Christian Heimes
d2774c7d09
Issue #18259 : Declare sethostname in socketmodule.c for AIX
13 years ago
Ronald Oussoren
a822d36675
Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
13 years ago
Victor Stinner
640c35ce13
Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
multiprocessing.h: remove unused MIN and MAX macros
13 years ago
Victor Stinner
a534fc4b3b
Close #18109 : os.uname() now decodes fields from the locale encoding, and
socket.gethostname() now decodes the hostname from the locale encoding, instead
of using the UTF-8 encoding in strict mode.
13 years ago
Ronald Oussoren
27a4ac535f
Issue #17269 : Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
13 years ago
Giampaolo Rodola'
80e1c43ddf
Fix issue #17996 : expose socket.AF_LINK constant on BSD and OSX.
13 years ago
Charles-François Natali
b10c71daa2
Backed out changeset c0f2b038fc12
13 years ago
Charles-François Natali
c7c333d25d
Issue #17683 : socket module: return AF_UNIX addresses in Linux abstract
namespace as string.
13 years ago
Charles-Francois Natali
74ca886788
Issue #17917 : Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
when applicable.
13 years ago
Benjamin Peterson
18b7191653
C89 declaration compliance
13 years ago
Kristján Valur Jónsson
868f0aac37
issue #9090 : Take the same approach for socketmodule as daytimemodule
when it needs support from timemodule (which is a .so on linux):
link in timemodule.c for the required functions.
13 years ago
Kristján Valur Jónsson
620e36419a
issue #9090 : Limit the fix to windows since getting a portable simple
time function on non-windows isn't quite simple.
13 years ago
Kristján Valur Jónsson
6ebc8f3f38
Issue #9090 : Error code 10035 calling socket.recv() on a socket with a timeout
(WSAEWOULDBLOCK - A non-blocking socket operation could not be completed
immediately)
13 years ago
Terry Jan Reedy
0f84764a09
Issue #17047 : remove doubled words added in 3.3
as reported by Serhiy Storchaka and Matthew Barnett.
13 years ago
Antoine Pitrou
4de7457009
Issue #17173 : Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
13 years ago
Charles-François Natali
773e42dff8
Issue #15359 : Add CAN_BCM protocol support to the socket module. Patch by Brian
Thorne.
13 years ago
Serhiy Storchaka
74f49ab28b
Issue #15989 : Fix several occurrences of integer overflow
when result of PyInt_AsLong() or PyLong_AsLong() narrowed
to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
13 years ago
Serhiy Storchaka
441d30fac7
Issue #15989 : Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
13 years ago
Serhiy Storchaka
7898043868
Issue #15989 : Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
13 years ago
Petri Lehtinen
ab7dd183f3
#8853 : Allow port to be of type long for socket.getaddrinfo()
13 years ago
Andrew Svetlov
0832af6628
Issue #16717 : get rid of socket.error, replace with OSError
13 years ago
Benjamin Peterson
57b667261c
expose TCP_FASTOPEN and MSG_FASTOPEN
13 years ago
Jesus Cea
14c81aba50
#16135 : Removal of OS/2 support (Modules/*)
13 years ago
Christian Heimes
15b6885fe0
Make sure that *really* no more than sizeof(ifr.ifr_name) chars are strcpy-ed to ifr.ifr_name and that the string is *always* NUL terminated. New code shouldn't use strcpy(), too. CID 719692
13 years ago
Matthias Klose
d182a6c77e
Modules/socketmodule.c: netdb_lock: define static.
14 years ago
Matthias Klose
c551776f8e
Modules/socketmodule.c: netdb_lock: define static.
14 years ago
Atsuo Ishimoto
da0fc14d46
Issue #7171 : Add Windows implementation of ``inet_ntop`` and ``inet_pton`` to socket module.
14 years ago