| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
discovered by Marc Lemburg.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
gethostbyaddr(). (Plain gethostbyname() returns only the IP address.)
This moves the code shared by gethostbyaddr() and gethostbyname_ex()
to a subroutine.
Original patch by Dan Stromberg; some tweaks by GvR.
|
| |
|
|
|
|
|
|
| |
so that our #ifdef test has the wrong effect. Substitute hardcoded
values for some important symbols (but not for the whole range -- some
are pretty obscure so it's not worth it).
|
| |
|
|
|
|
| |
comments.
|
| |
|
|
|
|
| |
called!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the
exception object.
(2) Remove all calls to Py_FatalError(); instead, return or
ignore the errors -- the import code now checks PyErr_Occurred()
after calling a module's init function, so it's no longer a
fatal error for the initialization to fail.
Also did some small cleanups, e.g. removed unnecessary test for
"already initialized" from initfpectl(), and unified
initposix()/initnt().
I haven't checked this very thoroughly, so while the changes are
pretty trivial -- beware of untested code!
|
| |
|
| |
|
| |
|
|
|
|
| |
exception -- return it as a tuple. Seems useful in promiscuous mode.
|
| |
|
| |
|
| |
|