| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
of the init_socket() function. This module is now *always* _socket.
|
|
|
|
|
|
| |
This doesn't change the copyright status for these files -- just the
markings! Doing it on the main branch for these three files for which
the HEAD revision was pushed back into 1.6.
|
| |
|
|
|
|
| |
marked my*.h as obsolete
|
|
|
|
| |
Leave the actual #define in for API compatibility.
|
|
|
|
| |
version of SSLeay (now known as OpenSSL.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for systems that are missing those declarations from system include files.
Start by moving a pointy-haired ones from their previous locations to the
new section.
(The gethostname() one, for instance, breaks on several systems, because
some define it as (char *, size_t) and some as (char *, int).)
I purposely decided not to include the summary of used #defines like Tim did
in the first section of pyport.h. In my opinion, the number of #defines
likedly to be used by this section would make such an overview unwieldy. I
would suggest documenting the non-obvious ones, though.
|
|
|
|
| |
[Slight style differences from posted patch]
|
|
|
|
| |
possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.
All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:
long
func(a, b)
long a;
long b; /* flagword */
{
and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
|
|
|
|
| |
Changed parameter in getsockaddrlen from unsigned to socklen_t.
|
| |
|
|
|
|
| |
(patch #100770 by Peter Schneider-Kamp)
|
| |
|
|
|
|
| |
Patch by T. Wouters.
|
|
|
|
|
|
|
| |
the bind(), connect(), and connect_ex() methods must be a single
parameter.
Originally part of 1.98, reverted in 1.100.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes possible overflows in the socket module for 64-bit
platforms (mainly Win64). The changes are:
- abstract the socket type to SOCKET_T (this is SOCKET on Windows, int
on Un*x), this is necessary because sizeof(SOCKET) > sizeof(int) on
Win64
- use INVALID_SOCKET on Win32/64 for an error return value for
accept()
- ensure no overflow of the socket variable for: (1) a PyObject return
value (use PyLong_FromLongLong if necessary); and (2) printf
formatting in repr().
Closes SourceForge patch #100516.
|
|
|
|
| |
BeOS (up to 5.0) lacks <netinet/tcp.h>.
|
|
|
|
|
|
|
|
|
|
| |
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
|
|
|
|
| |
MSG_DONTWAIT. Reported by Fredrik Lundh.
|
|
|
|
|
| |
1) Adds MSG_DONTWAIT if defined (I needed this)
2) Spells "coreectly" correctly ;-)
|
|
|
|
|
|
|
|
|
|
| |
socklen_t (unsigned int) for most size parameters. Apparently this is
part of the UNIX 98 standard.
[GvR: the changes to configure.in etc. that I just checked in make
sure that socklen_t is defined everywhere, so I deleted the little
part of Jack's mod to define socklen_t if not in GUSI2. I suppose I
will have to add it to the Windows config.h in a minute.]
|
|
|
|
|
|
|
|
|
| |
Windows), soclose (on OS2), or to close (everywhere else).
Hopefully this fixes a new compilation error that I suddenly get on
Windows because the macro definition for close -> closesocket
apparently was done before including io.h, which contains a prototype
for close. (No idea why this wasn't an error before.)
|
| |
|
| |
|
|
|
|
| |
backwards compatibility, and to avoid a revolution.
|
|
|
|
|
|
| |
"man tcp" on Solaris says that TCP_NODELAY is defined in
netinet/tcp.h, and the Open Groups Unix98 spec agrees
(http://www.opengroup.org/onlinepubs/009619199/ninettcp.htm).
|
|
|
|
|
|
|
|
| |
argument format strings.
THIS WILL PROBABLY BREAK LOTS OF CODE!!!
Also fixed a bogus string in an error message in getsockaddrlen().
|
| |
|
|
|
|
| |
PyArg_ParseTuple() format string arguments as possible.
|
|
|
|
|
|
| |
Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by
Laszlo Kovacs of HP. Both have kindly given permission to include
the patches in the Python distribution. Final formatting by GvR.
|
|
|
|
|
| |
<arpa/inet.h> doesn't exist and isn't needed; and inet_addr() returns
a structure containing a long rather than a long.
|
|
|
|
|
|
|
|
|
| |
the right variant of gethostbyname_r for us, since not all Linuxes are
equal in this respect. Reported by Laurent Pointal.
(2) On BeOS, Chris Herborth reports that instead of arpa/inet.h you
must include net/netdb.h to get the inet_ntoa() and inet_addr()
prototypes.
|
|
|
|
|
| |
the proper function to call is inet_addr(). Since we already had code
to do that (for MS-Windows), this simplifies things a lot!
|
|
|
|
|
|
| |
- fix unescaped newline in string literal
- removed unused err variable
- Windows doesn't have inet_aton; use inet_addr instead
|
| |
|
| |
|
|
|
|
|
|
| |
it was being used even without threads. This of course might be an
all-platform problem so now we only use the _r variant when we are
using threads.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
data struct before calling gethostby{name,addr}_r(); (2) ignore the
3/5/6 args determinations made by the configure script and switch on
platform identifiers instead:
AIX, OSF have 3 args
Sun, SGI have 5 args
Linux has 6 args
On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
glibc2.
- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
don't know what code should be used.
- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
- Modify the gethostbyaddr() code to also hold on to the lock until
after it is safe to release, overlapping with the Python lock.
(Note: I think that it could in theory be possible that Python code
executed while gethostbyname_lock is held could attempt to reacquire
the lock -- e.g. in a signal handler or destructor. I will simply say
"don't do that then.")
|
|
|
|
|
|
|
|
| |
Here's a patch to fix the race condition, which wasn't fixed by Rob's
patch. It holds the gethostbyname lock until the results are copied out,
which means that this lock and the Python global lock are held at the same
time. This shouldn't be a problem as long as the gethostbyname lock is
always acquired when the global lock is not held.
|
|
|
|
| |
converntion for gethostbyname_r() etc. than Solaris!
|
|
|
|
|
| |
names in the source code (they already had those for the linker,
through some smart macros; but the source still had the old, un-Py names).
|
|
|
|
| |
on BeOS or Windows.
|
| |
|
| |
|