summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix SF bug #1072182, problems with signed characters.Neal Norwitz2005-12-191-1/+2
| | | | Most of these can be backported.
* Add const to several API functions that take char *.Jeremy Hylton2005-12-101-1/+1
| | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *.
* Patch #1288833: Removed thread lock from socket.getaddrinfo onHye-Shik Chang2005-09-241-1/+6
| | | | | FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3). (Reported by Maxim Sobolev)
* - Changes donated by Elemental Security to make it work on AIX 5.3Guido van Rossum2005-09-141-23/+19
| | | | | with IBM's 64-bit compiler (SF patch #1284289). This also closes SF bug #105470: test_pwd fails on 64bit system (Opteron).
* patch [ 756021 ] Allow socket.inet_aton("255.255.255.255") on WindowsGeorg Brandl2005-08-261-7/+12
|
* Fix apparently trivial buffer overflow (SF bug 1060396).Jeremy Hylton2004-11-071-1/+1
| | | | memset() wrote one past the end of the buffer, which was likely to be unused padding or a yet-to-be-initialized local variable. This routine is already tested by test_socket.
* Just remove the #include of signal.h. That it was C++-commented outMichael W. Hudson2004-10-141-1/+0
| | | | was a mistake of mine in updating patch #975056 (I think).
* Use C89 style comment for old compilersNeal Norwitz2004-10-141-1/+1
|
* Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter2004-10-131-1/+1
| | | | a few remaining calls to signal() were converted to PyOS_setsig().
* Silence a compiler warning by supplying the correct argument type toRaymond Hettinger2004-09-281-2/+2
| | | | the htons() function.
* Patch for compilation on IRIX from rwgk on http://python.org/sf/728330Trent Mick2004-09-131-0/+10
|
* Apply patch from http://python.org/sf/728330 to fix socket module ↵Trent Mick2004-09-071-1/+13
| | | | compilation on Solaris 2.6, HP-UX 11, AIX 5.1 and (possibly) some IRIX versions.
* Patch #1015012. Improve markup and punctuation in libsocket.texDave Cole2004-08-261-2/+2
|
* Back out 1.289, which breaks platforms needing addrinfo.h, andMartin v. Löwis2004-08-251-31/+0
| | | | | 1.293, 1.298, and 1.300, which have tried to fix this for specific platforms.
* Updated the socketpair() docstring and documentation to explain that theDave Cole2004-08-231-2/+4
| | | | | default famility is AF_UNIX if defined for the platform, otherwise the default is AF_INET.
* Removed unnecessary calls to signal() to ignore SIGPIPE. SIGPIPE is ignoredDave Cole2004-08-231-13/+0
| | | | in initsigs() inside pythonrun.c.
* Bug #1001857: socketmodule does not build under cygwinJason Tishler2004-08-091-0/+4
| | | | Restore clean building under Cygwin.
* Patch #1003700: Add socketpair function to socket module.Dave Cole2004-08-091-0/+62
|
* Restore compilation on MSVC++ 6.0Raymond Hettinger2004-08-031-0/+4
|
* Fix [ 1001018 ]: Windows: setdefaulttimeout causes unnecessary timeouts onMark Hammond2004-08-031-3/+24
| | | | connect error
* Patch #984654: Add more address family constants.Martin v. Löwis2004-07-191-0/+60
|
* [Patch #947352 from Jason Andryuk] Add support for AF_PACKET hardware addressesAndrew M. Kuchling2004-07-101-6/+15
|
* [Patch #982665 ] add SO_EXCLUSIVEADDRUSE constantAndrew M. Kuchling2004-07-101-0/+4
|
* OS/2 EMX needs addrinfo.h for code included from getaddrinfo.cAndrew MacIntyre2004-07-071-0/+4
|
* Added socket.getservbyport(), and make its second argument and that ofBarry Warsaw2004-06-281-5/+39
| | | | getservbyname() optional. Update the tests and the docs.
* Patch #929192: Improvements to bluetooth support.Martin v. Löwis2004-06-031-78/+169
| | | | | | | | Added setbdaddr and makebdaddr. Extended makesockaddr to understand Bluetooth addresses. Changed getsockaddr to expect the Bluetooth addresses as a string, not a six element tuple. Reformatted some of the Bluetooth code to be more consistent with PEP 7.
* Patch #924294: Do not check for AF_INET6 if it is not defined.Martin v. Löwis2004-06-021-1/+1
| | | | Will backport to 2.3.
* Band-aid type fix forMichael W. Hudson2004-05-261-0/+19
| | | | | | | [ 728330 ] Don't define _SGAPI on IRIX The Right Thing would be nice, for now this'll do. At least it isn't going to break anything *other* than IRIX...
* Fixes for AF_UNIX support on OS/2:Andrew MacIntyre2004-04-111-0/+4
| | | | | | | | | - return the full size of the sockaddr_un structure, without which bind() fails with EINVAL; - set test_socketserver to use a socket name that meets the form required by the underlying implementation; - don't bother exercising the forking AF_UNIX tests on EMX - its fork() can't handle the stress.
* OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation thatAndrew MacIntyre2004-04-041-4/+4
| | | | | the socket name must start with /socket32/. Unlike Unix systems, this file never exists in the file system.
* Make socket.sslerror a subclass of socket.error .Brett Cannon2004-03-231-0/+2
| | | | Added socket.error to the socket module's C API.
* Make socketmodule compile again on a modern Linux (that supports Bluetooth).Anthony Baxter2004-02-161-1/+1
| | | | The Bluetooth code was obviously never tested on Linux.
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-101-3/+1
|
* Add FreeBSD support for bluetooth sockets.Hye-Shik Chang2004-02-021-14/+38
| | | | (SF Patch #888148, reviewed by loewis)
* Patch #874083: Bluetooth support for socket module.Martin v. Löwis2004-01-311-0/+101
|
* Add IPV6_ socket options from RFCs 3493 and 3542. Fixes #867012.Martin v. Löwis2003-12-301-0/+71
|
* Fix erroneus argument parsing of socket.htons() on 64bit big endianHye-Shik Chang2003-12-171-1/+1
| | | | machines.
* Patch #849595: Add socket.shutdown() constants.Martin v. Löwis2003-11-271-2/+25
|
* Getting rid of code dependent on GUSI or the MetroWerks compiler.Jack Jansen2003-11-191-5/+0
|
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* Simplify and speedup uses of Py_BuildValue():Raymond Hettinger2003-10-121-2/+2
| | | | | | * Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c) * Py_BuildValue("()",a) --> PyTuple_New(0) * Py_BuildValue("O", a) --> Py_INCREF(a)
* made the SGI INET_ADDRSTRLEN define apply for any compiler on Irix. Both theAnthony Baxter2003-10-041-4/+7
| | | | SGI compiler and GCC seem to need this.
* Patch #813445: Add missing socket.IPPROTO_IPV6. Backported to 2.3.Martin v. Löwis2003-10-031-0/+3
|
* Release host name memory. Fixes #783312. Will backport to 2.3.Martin v. Löwis2003-08-071-6/+12
|
* Patch #781722: Reject AF_INET6 if IPv6 is disabled. Will backport to 2.3.Martin v. Löwis2003-08-051-0/+8
|
* Get socketmodule compiling on IRIX 6.5.10.Jeremy Hylton2003-07-171-2/+11
| | | | | | I don't think the fix here is very good, but I'm not sure what would be better. In particular, we should not be defining _SGIAPI, but lots of things break if we remove it.
* Fix [ 766669 ] Consistent GPF on exitMark Hammond2003-07-091-1/+1
| | | | | Use Py_AtExit instead of atexit so we are called during Py_Finalize() rather than during DLL teardown.
* SF patch #760257: add socket.timeout exceptionRaymond Hettinger2003-06-291-38/+113
| | | | | | | | | (Contributed by Bob Halley) Added a new exception, socket.timeout so that timeouts can be differentiated from other socket exceptions. Docs, more tests, and newsitem to follow.
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-8/+36
| | | | riscospath.extsep, and use os.extsep throughout.
* Yet another addition to [731644]: only use the lock if thread-supportJust van Rossum2003-05-091-2/+2
| | | | is enabled.