Neal Norwitz
1ac754fa10
Check return result from Py_InitModule*(). This API can fail.
...
Probably should be backported.
2006-01-19 06:09:39 +00:00
Neal Norwitz
658516617c
Get socketmodule to build after adding netlink support.
2006-01-16 04:31:40 +00:00
Martin v. Löwis
d056005482
Change build format of netlink addresses.
2006-01-15 07:49:20 +00:00
Martin v. Löwis
11017b172d
Patch #1103116 : AF_NETLINK sockets basic support.
2006-01-14 18:12:57 +00:00
Neal Norwitz
30b5c5d011
Fix SF bug #1072182 , problems with signed characters.
...
Most of these can be backported.
2005-12-19 06:05:18 +00:00
Jeremy Hylton
af68c874a6
Add const to several API functions that take char *.
...
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 *.
2005-12-10 18:50:16 +00:00
Hye-Shik Chang
9ceebd5445
Patch #1288833 : Removed thread lock from socket.getaddrinfo on
...
FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3).
(Reported by Maxim Sobolev)
2005-09-24 14:58:47 +00:00
Guido van Rossum
8ee3e5aa93
- Changes donated by Elemental Security to make it work on AIX 5.3
...
with IBM's 64-bit compiler (SF patch #1284289 ). This also closes SF
bug #105470 : test_pwd fails on 64bit system (Opteron).
2005-09-14 18:09:42 +00:00
Georg Brandl
d2e3ba7a35
patch [ 756021 ] Allow socket.inet_aton("255.255.255.255") on Windows
2005-08-26 08:34:00 +00:00
Jeremy Hylton
80961f3ca9
Fix apparently trivial buffer overflow (SF bug 1060396).
...
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.
2004-11-07 14:24:25 +00:00
Michael W. Hudson
3079391b8d
Just remove the #include of signal.h. That it was C++-commented out
...
was a mistake of mine in updating patch #975056 (I think).
2004-10-14 13:27:14 +00:00
Neal Norwitz
f7c8d9320b
Use C89 style comment for old compilers
2004-10-14 03:48:30 +00:00
Anthony Baxter
9ceaa72ebe
Patch #975056 - fixes for restartable signals on *BSD. In addition,
...
a few remaining calls to signal() were converted to PyOS_setsig().
2004-10-13 14:48:50 +00:00
Raymond Hettinger
87de0ca741
Silence a compiler warning by supplying the correct argument type to
...
the htons() function.
2004-09-28 02:19:40 +00:00
Trent Mick
8ea5bdf784
Patch for compilation on IRIX from rwgk on http://python.org/sf/728330
2004-09-13 17:48:41 +00:00
Trent Mick
a708d6e3b0
Apply patch from http://python.org/sf/728330 to fix socket module compilation on Solaris 2.6, HP-UX 11, AIX 5.1 and (possibly) some IRIX versions.
2004-09-07 17:48:26 +00:00
Dave Cole
e8bbfe4e63
Patch #1015012 . Improve markup and punctuation in libsocket.tex
2004-08-26 00:51:16 +00:00
Martin v. Löwis
b92b7ed9d6
Back out 1.289, which breaks platforms needing addrinfo.h, and
...
1.293, 1.298, and 1.300, which have tried to fix this for specific
platforms.
2004-08-25 06:24:58 +00:00
Dave Cole
07fda7e3a0
Updated the socketpair() docstring and documentation to explain that the
...
default famility is AF_UNIX if defined for the platform, otherwise the
default is AF_INET.
2004-08-23 05:16:23 +00:00
Dave Cole
0fc8575412
Removed unnecessary calls to signal() to ignore SIGPIPE. SIGPIPE is ignored
...
in initsigs() inside pythonrun.c.
2004-08-23 04:54:53 +00:00
Jason Tishler
c246cb76e6
Bug #1001857 : socketmodule does not build under cygwin
...
Restore clean building under Cygwin.
2004-08-09 13:25:59 +00:00
Dave Cole
331708b226
Patch #1003700 : Add socketpair function to socket module.
2004-08-09 04:51:41 +00:00
Raymond Hettinger
cbcff93d49
Restore compilation on MSVC++ 6.0
2004-08-03 08:52:46 +00:00
Mark Hammond
a57ec93b93
Fix [ 1001018 ]: Windows: setdefaulttimeout causes unnecessary timeouts on
...
connect error
2004-08-03 05:06:26 +00:00
Martin v. Löwis
81aec4bb80
Patch #984654 : Add more address family constants.
2004-07-19 17:01:20 +00:00
Andrew M. Kuchling
b8e1717041
[Patch #947352 from Jason Andryuk] Add support for AF_PACKET hardware addresses
2004-07-10 23:39:35 +00:00
Andrew M. Kuchling
42851ab490
[Patch #982665 ] add SO_EXCLUSIVEADDRUSE constant
2004-07-10 14:19:21 +00:00
Andrew MacIntyre
5a8b4593d3
OS/2 EMX needs addrinfo.h for code included from getaddrinfo.c
2004-07-07 14:02:59 +00:00
Barry Warsaw
11b91a0ea3
Added socket.getservbyport(), and make its second argument and that of
...
getservbyname() optional. Update the tests and the docs.
2004-06-28 00:50:43 +00:00
Martin v. Löwis
558d9bf528
Patch #929192 : Improvements to bluetooth support.
...
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.
2004-06-03 09:24:42 +00:00
Martin v. Löwis
04697e89b9
Patch #924294 : Do not check for AF_INET6 if it is not defined.
...
Will backport to 2.3.
2004-06-02 12:35:29 +00:00
Michael W. Hudson
76b8cc84a4
Band-aid type fix for
...
[ 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...
2004-05-26 17:06:31 +00:00
Andrew MacIntyre
daedf21852
Fixes for AF_UNIX support on OS/2:
...
- 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.
2004-04-11 12:03:57 +00:00
Andrew MacIntyre
d12dfbbcd9
OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation that
...
the socket name must start with /socket32/. Unlike Unix systems, this
file never exists in the file system.
2004-04-04 07:13:49 +00:00
Brett Cannon
06c34798df
Make socket.sslerror a subclass of socket.error .
...
Added socket.error to the socket module's C API.
2004-03-23 23:16:54 +00:00
Anthony Baxter
5d7c06720d
Make socketmodule compile again on a modern Linux (that supports Bluetooth).
...
The Bluetooth code was obviously never tested on Linux.
2004-02-16 05:35:28 +00:00
Skip Montanaro
7befb9966e
remove support for missing ANSI C header files (limits.h, stddef.h, etc).
2004-02-10 16:50:21 +00:00
Hye-Shik Chang
81268608bf
Add FreeBSD support for bluetooth sockets.
...
(SF Patch #888148 , reviewed by loewis)
2004-02-02 06:05:24 +00:00
Martin v. Löwis
12af0485f8
Patch #874083 : Bluetooth support for socket module.
2004-01-31 12:34:17 +00:00
Martin v. Löwis
da91d02461
Add IPV6_ socket options from RFCs 3493 and 3542. Fixes #867012 .
2003-12-30 11:14:01 +00:00
Hye-Shik Chang
a7b673f47c
Fix erroneus argument parsing of socket.htons() on 64bit big endian
...
machines.
2003-12-17 09:40:23 +00:00
Martin v. Löwis
94681fc4a3
Patch #849595 : Add socket.shutdown() constants.
2003-11-27 19:40:22 +00:00
Jack Jansen
4bae2d5e46
Getting rid of code dependent on GUSI or the MetroWerks compiler.
2003-11-19 22:52:23 +00:00
Walter Dörwald
f0dfc7ac5c
Fix a bunch of typos in documentation, docstrings and comments.
...
(From SF patch #810751 )
2003-10-20 14:01:56 +00:00
Raymond Hettinger
8ae4689657
Simplify and speedup uses of Py_BuildValue():
...
* 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)
2003-10-12 19:09:37 +00:00
Anthony Baxter
bab23cfc26
made the SGI INET_ADDRSTRLEN define apply for any compiler on Irix. Both the
...
SGI compiler and GCC seem to need this.
2003-10-04 08:00:49 +00:00
Martin v. Löwis
a0f1734e44
Patch #813445 : Add missing socket.IPPROTO_IPV6. Backported to 2.3.
2003-10-03 13:56:20 +00:00
Martin v. Löwis
5db099a4fe
Release host name memory. Fixes #783312 . Will backport to 2.3.
2003-08-07 11:55:15 +00:00
Martin v. Löwis
106490915b
Patch #781722 : Reject AF_INET6 if IPv6 is disabled. Will backport to 2.3.
2003-08-05 06:25:06 +00:00
Jeremy Hylton
fb509a36c8
Get socketmodule compiling on IRIX 6.5.10.
...
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.
2003-07-17 16:58:48 +00:00