summaryrefslogtreecommitdiff
path: root/src/a2netcompat.h
Commit message (Collapse)AuthorAgeFilesLines
* Enable IndentPPDirectivesTatsuhiro Tsujikawa2018-06-091-34/+34
|
* clang-format-3.9Tatsuhiro Tsujikawa2016-10-151-2/+2
|
* correcting the copyright format error103yiran2016-07-201-0/+1
|
* Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint objectTatsuhiro Tsujikawa2016-01-091-0/+12
|
* Define SockAddr and use it instead of raw std::pairTatsuhiro Tsujikawa2016-01-091-0/+5
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-32/+32
|
* Remove auto_delete in favor of std::unique_ptrTatsuhiro Tsujikawa2013-06-221-20/+0
|
* Include winsock2.h before windows.hTatsuhiro Tsujikawa2013-05-251-10/+0
|
* Vectorized write for SocketBuffer to avoid small packetTatsuhiro Tsujikawa2013-01-111-0/+22
|
* Removed dependency on inet_atonTatsuhiro Tsujikawa2012-05-141-4/+0
| | | | | | | Implemented inetPton as a replacement of inet_aton. inetPton is implemented using net::getBinAddr. This change fixes bug#3525424.
* Define HAVE_GETADDRINFO only if it is not defined in MinGW build.Tatsuhiro Tsujikawa2012-04-071-1/+3
|
* Enable TCP_NODELAY for WebSocket connection.Tatsuhiro Tsujikawa2012-03-211-0/+4
|
* Rewritten util::inSameCidrBlock() to support IPv6 address.Tatsuhiro Tsujikawa2011-10-191-0/+7
| | | | We also introduced union sockaddr_union in a2netcompat.h.
* Define SHUT_WR as SD_SEND for MinGW32Tatsuhiro Tsujikawa2011-07-161-0/+6
|
* 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-311-3/+3
| | | | | | Made #include guard consistent for c++ header files.
* 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Append 'u' to hex mask. * src/Base64.cc * src/BitfieldMan.cc * src/BtHandshakeMessage.cc * src/BtHandshakeMessage.h * src/DHTBucket.cc * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableSerializer.cc * src/DefaultBtProgressInfoFile.cc * src/MSEHandshake.h * src/MultiUrlRequestInfo.cc * src/Platform.cc * src/SpeedCalc.cc * src/UTPexExtensionMessage.cc * src/a2netcompat.h * src/base32.cc * src/bitfield.h * src/bittorrent_helper.cc * src/cookie_helper.cc * src/util.h
* 2010-08-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-071-5/+1
| | | | | | | Removed AI_V4MAPPED from DEFAULT_AI_FLAGS * src/a2netcompat.h
* 2010-08-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-051-4/+8
| | | | | | | Added AI_V4MAPPED to DEFAULT_AI_FLAGS * src/a2netcompat.h
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-4/+4
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-04-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-251-0/+3
| | | | | | | Defined FD_SETSIZE 1024 for MinGW32. * src/a2netcompat.h
* 2010-04-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-161-5/+5
| | | | | | | | | | | | | Fixed compile error with openssl 1.1.0 and mingw32. * src/AsyncNameResolver.cc * src/LogFactory.cc * src/Logger.cc * src/Logger.h * src/SocketCore.cc * src/SocketCore.h * src/a2netcompat.h
* 2010-02-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-211-1/+1
| | | | | | | | | Fixed compile error with mingw32 cross compiler. Defined a2_sockopt_t as void* for the target systems other than mingw32. * src/SocketCore.cc * src/a2netcompat.h
* 2010-01-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-091-0/+20
| | | | | | | | | | | | | | | | Fixed compile error with i586-mingw32msvc-gcc 4.4.2, without any additional libraries. * src/MultiUrlRequestInfo.cc * src/NameResolver.cc * src/SelectEventPoll.cc * src/SelectEventPoll.h * src/SocketCore.cc * src/SocketCore.h * src/a2netcompat.h * src/daemon.cc * src/main.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-1/+1
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-12-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-12-241-0/+6
| | | | | | | | | | | | | | Use AI_ADDRCONFIG flag if it is available. Refactored so that getaddrinfo calls are not scattered around. Unset AI_ADDRCONFIG when conducting unit tests because they fail if networking interface is not configured with IPv4 address. * src/NameResolver.cc * src/SocketCore.cc * src/SocketCore.h * src/a2netcompat.h * test/AllTest.cc
* 2008-11-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-261-2/+2
| | | | | | | | | | | | | Applied aria2-1.0.1-mingw.patch. Use SOCKET_ERRNO instead of errno if the code is used both linux and mingw. Collected 4th and 5th argument types for getsockopt and setsockopt. * src/SocketCore.cc * src/a2netcompat.h * test/SocketCoreTest.cc
* Previous commit accidentaly didn't include a2netcompat.h.Tatsuhiro Tsujikawa2008-09-301-2/+2
|
* 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-06-161-0/+6
| | | | | | | | | | | | | | | | | | | | | Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of socket from int to sock_t as sockets are unsigned in Windows. For AsyncNameResolver, DownloadEngine, I did additional modification for the portion of the code changed according to epoll support. I defined sock_t in a2netcompat.h to use sock_t without including SocketCore.h. * src/AsyncNameResolver.cc * src/AsyncNameResolver.h * src/DownloadEngine.cc * src/DownloadEngine.h * src/SocketCore.cc * src/SocketCore.h * src/a2netcompat.h
* 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-06-161-21/+0
| | | | | | | | | Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only a2netcompat.h is modified. * src/a2netcompat.h: Removed unused getaddrinfo related #define directives.
* 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-031-0/+21
| | | | | | | | | | | | | | | | | | | | | Merged Ross's mingw patch. * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableSerializer.cc * src/Platform.{h, cc} * src/timegm.h * src/gettimeofday.h * src/getaddrinfo.h * src/SocketCore.h * src/common.h * src/inet_aton.h * src/DownloadEngine.h * src/gai_strerror.h * src/a2netcompat.h * configure.ac * configure * aclocal.m4
* 2007-08-10 Ross Smith II <aria2spam at smithii dot com>Tatsuhiro Tsujikawa2007-08-141-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move sleep functions to Util class: * src/Util.cc (sleep): New function. (usleep): New function. * src/DownloadCommand.cc: sleep -> Util::sleep * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep MinGW build enhancements. The following files are added: * src/timegm.{c,h} Changes to support the above new files: * configure.ac * src/Makefile.am * src/a2time.h * src/Util.cc: * src/strptime.c: Added support for %Z option. Miscellenous build fixes/enhancements. * configure.ac: Added summary report. * src/Platform.h: Tweaked #include's. * src/a2netcompat.h: Tweaked #include's. * src/strptime.h: Tweaked #include's. * src/gai_strerror.c: Tweaked #include's. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H * src/getaddrinfo.h: Moved #ifndef __MINGW32__ * src/gettimeofday.h: Added HAVE_CONFIG_H
* Applied Ross's patchTatsuhiro Tsujikawa2007-08-081-1/+2
| | | | | | | | | * src/a2netcompat.h * src/main.cc Updated man page
* 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-07-311-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make a2netcompat.h include a2io.h to fix compilation error: * src/a2netcompat.h * src/SocketCore.cc: Removed include of a2io.h * src/Util.cc: Removed include of a2io.h Gather time related functions to a2time.h: * src/a2time.h: New file. * src/DefaultPeerStorage.cc * src/SimpleLogger.cc * src/Util.{h, cc} * src/SimpleRandomizer.h * src/TimeA2.{h,cc} * src/DownloadCommand.cc * src/main.cc Removed #ifdef __MINGW32__ since gai_strerror is included in a2netcompat.h: * src/NameResolver.cc Fixed compilation error without openssl: * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h Added default block to suppress compiler warnings: * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator()) 2007-07-26 Ross Smith II <aria2spam at smithii dot com> MinGW build enhancements. The following files are added: * src/gai_strerror.{c,h} * src/gettimeofday.{c,h} Changes to support the above new files: * configure.ac * src/Makefile.am * src/a2netcompat.h * src/TimeA2.cc * src/DefaultPeerStorage.cc * src/NameResolver.cc: removed mingw_strerror() function. * src/SocketCore.cc: removed mingw_strerror() function. Miscellaneous MinGW build fixes. * src/a2io.h: Use _lseeki64() instead of lseek() * src/common.h * src/DefaultFileAllocator.cc * src/GlowFileAllocator.cc * src/main.cc: Moved #include "prefs.h" to quiet compile error. * src/NameResolver.cc (callback): Changed int32_t to int. (resolve): Changed int32_t to int. * src/Platform.cc * src/Platform.h * test/MultiDiskWriterTest.cc * test/PeerMessageUtilTest.cc * src/localtime_r.c: Add DeleteCriticalSection() and at exit(). Other enhancements and fixes. * src/HttpRequestCommand.cc (executeInternal) Use non-blocking socket for HTTPS (MinGW only). * src/SocketCore.cc: (error): New function to abstract errno/WSAGetLastError(). (errorMsg): New function to abstract errno/WSAGetLastError(). (initiateSecureConnection): Added more detailed error reporting. * src/SocketCore.h: Added private variable blocking, to allow proper handling of OpenSSL psuedo-errors. * src/message.h (EX_SSL_INIT_FAILURE) (EX_SSL_IO_ERROR) (EX_SSL_PROTOCOL_ERROR) (EX_SSL_UNKNOWN_ERROR) (EX_SSL_CONNECT_ERROR) (EX_SOCKET_BLOCKING) (EX_SOCKET_NONBLOCKING) (EX_SOCKET_UNKNOWN_ERROR) * src/Util.cc (setGlobalSignalHandler): Renamed signal to sig as signal is a reserved name. (httpGMT): Fixed typo.
* 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-07-231-0/+75
Merged Ross's win32 patch(manually) In the course of merging, following files are added. * src/strptime.{h,c} * src/libgen.{h,c} * src/inet_aton.{h,c} * src/Platform.{h,cc} * src/localtime_r.{h,c} * src/getaddrinfo.{h,c} I've gethered network related things, and put them to following file: * src/a2netcompat.h Also io related things are put to following file: * src/a2io.h Changed %lld to %s because mingw32 doesn't recognize %lld. * src/message.h (MSG_ALLOCATION_COMPLETED) (EX_TOO_LARGE_FILE) (EX_SIZE_MISMATCH) (EX_FILE_OFFSET_OUT_OF_RANGE) (EX_INVALID_CHUNK_CHECKSUM) (EX_INVALID_RANGE_HEADER) * src/FileAllocationCommand.cc * src/HttpResponse.cc * src/RequestGroup.cc * src/MultiDiskAdaptor.cc * src/OptionHandlerImpl.h * src/HttpResponseCommand.cc * src/FtpNegotiateCommand.cc * src/IteratableChecksumValidator.cc * src/SegmentMan.cc * src/ChunkChecksumValidator.cc Added Randomizer::getRandomNumber(long int) * src/Randomizer.h (getRandomNumber) * src/SimpleRandomizer.h (getRandomNumber) * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function. * src/Util.cc (randomAlpha): Use this new function.