Serhiy Storchaka
caa01f861c
Fixed GCC version testing.
11 years ago
Victor Stinner
a4c727131e
Fix "GCC diagnostic" in socketmodule.c
Fix regression of changeset 7c6e3358221a on GCC < 4.4. The _socket module
cannot be compiled on "x86 FreeBSD 7.2 3.x" buildbot anymore.
11 years ago
Serhiy Storchaka
b48af340b9
Silenced minor GCC warnings.
11 years ago
Serhiy Storchaka
1a1ff29659
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
overflows. Added few missed PyErr_NoMemory().
11 years ago
Charles-François Natali
6e6c59b508
Issue #23285 : PEP 475 -- Retry system calls failing with EINTR.
11 years ago
Serhiy Storchaka
b757c83ec6
Issue #22581 : Use more "bytes-like object" throughout the docs and comments.
11 years ago
Steve Dower
65e4cb10d9
Issue #22919 : Windows build updated to support VC 14.0 (Visual Studio 2015), which will be used for the official 3.5 release.
11 years ago
Charles-François Natali
ea07eb9469
Issue #22378 : socket module: add SO_MARK.
11 years ago
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
12 years ago
Victor Stinner
ae58649721
Issue #22043 : time.monotonic() is now always available
threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used.
12 years ago
Victor Stinner
1a62a680d6
Issue #22218 : Fix "comparison between signed and unsigned integers" warnings in
socketmodule.c.
12 years ago
Martin v. Löwis
17fd1e1013
Issue #22127 : fix typo.
12 years ago
Martin v. Löwis
eb1c28a849
Issue #22127 : Bypass IDNA for pure-ASCII host names (in particular for numeric IPs).
12 years ago
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
Victor Stinner
b6dab6bce8
Issue #22042 : Avoid dangerous C cast in socket.setblocking()
Avoid cast from (int*) to (u_long*), even if sizeof(int) == sizeof(u_long).
12 years ago
Berker Peksag
a6ec5ee3c8
Fix typo in socket.getaddrinfo() docstring.
Reported by Krishna Kumar Thakur on docs@.
12 years ago
Victor Stinner
ef7f140366
All modern compilers provide a offsetof() function
offsetof() is used directly in many other .c files without any issue.
12 years ago
Charles-François Natali
644b8f52a8
Issue #21455 : Add a default backlog to socket.listen().
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.
13 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