aboutsummaryrefslogtreecommitdiff
path: root/src/compat.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* net: Minor accumulated cleanupsThomas Snider2018-04-161-0/+6
|
* Add new prevector benchmarks.Evan Klitzke2018-02-271-0/+10
| | | | | This prepares for a series of two additional commits which optimize prevector performance.
* Trivial: Fix #include sys/fcntl.h to just fcntl.h (without sys/)Jan Sarenik2018-01-121-1/+1
| | | | | http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html http://man7.org/linux/man-pages/man2/fcntl.2.html
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* Merge #11558: Minimal code changes to allow msvc compilationWladimir J. van der Laan2017-12-131-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | fbf327b Minimal code changes to allow msvc compilation. (Aaron Clauson) Pull request description: These changes are required to allow the Bitcoin source to build with Microsoft's C++ compiler (#11562 is also required). I looked around for a better place for the typedef of ssize_t which is in random.h. The best candidate looks like src/compat.h but I figured including that header in random.h is a bigger change than the typedef. Note that the same typedef is in at least two other places including the OpenSSL and Berkeley DB headers so some of the Bitcoin code already picks it up. Tree-SHA512: aa6cc6283015e08ab074641f9abdc116c4dc58574dc90f75e7a5af4cc82946d3052370e5cbe855fb6180c00f8dc66997d3724ff0412e4b7417e51b6602154825
| * Minimal code changes to allow msvc compilation.Aaron Clauson2017-11-101-0/+10
| |
* | scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Move CloseSocket out of SetSocketNonBlocking and pass SOCKET by const ↵Dag Robole2017-07-221-1/+1
| | | | reference in SetSocket* functions
* compat: use `unsigned int` instead of `u_int`Wladimir J. van der Laan2017-03-051-1/+1
| | | | | | `u_int` is not available on some platforms (not sure what standard it's supposed to be part of), we don't use it anywhere else, and it doesn't hurt to simply write `unsigned int` out here.
* build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locallyWladimir J. van der Laan2017-03-051-10/+0
| | | | | | | | | | | | Define MSG_DONTWAIT and MSG_NO_SIGNAL in the implementation files that use them (`net.cpp` and `netbase.cpp`), instead of compat.h which is included all over the place. This avoids putting them in the global namespace, as defining them as 0 is a hack that works for our specific usage, but it is not a general solution. Also makes sure they are defined only once so the `!defined(MSG_x)` guard can go.
* build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNALWladimir J. van der Laan2017-03-051-3/+6
| | | | | | Instead of the WIN32-specific workaround, detect lack of `MSG_DONTWAIT` in the build system. This allows other platforms without `MSG_DONTWAIT` to work too.
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Include select.h when WIN32 is not definedIvo van der Sangen2016-11-291-0/+1
|
* don't run ThreadMessageHandler at lowered priorityKaz Wesley2016-05-051-11/+0
| | | | | There's no clear reason ThreadMessageHandler should be low priority. Fixes #8010 (priority inversion).
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Set TCP_NODELAY on P2P sockets.Gregory Maxwell2015-10-221-0/+1
| | | | | | | | Nagle appears to be a significant contributor to latency now that the static sleeps are gone. Most of our messages are relatively large compared to IP + TCP so I do not expect this to create enormous overhead. This may also reduce traffic burstyness somewhat.
* Fix warning introduced by #6412Wladimir J. van der Laan2015-07-201-1/+1
| | | | SOCKET are defined as unsigned integers, thus always >=0.
* Test whether created sockets are select()ablePieter Wuille2015-07-101-0/+8
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Include missing config/bitcoin-config.h.Pavel Janík2014-11-261-0/+4
|
* Check for strnlen and provide it if it is not found.Pavel Janík2014-11-241-0/+4
|
* Fix all header definesPavel Janík2014-11-031-3/+3
|
* Move `S_I*` constants and `MSG_NOSIGNAL` to compat.hWladimir J. van der Laan2014-08-261-0/+14
|
* Move SetThreadPriority implementation to util.cpp instead of the headerWladimir J. van der Laan2014-08-261-0/+11
| | | | Put the THREAD_* and PRIO_ constants in compat.h.
* small net cleanupPhilip Kaufmann2014-08-081-2/+2
| | | | | | - add comment for disabling sigpipe - add closing comment in compat.h - remove redundant check in net.h
* Convert closesocket 'compat wrapper' to function in netbaseWladimir J. van der Laan2014-07-171-15/+0
| | | | | | | | | | | Simpler alternative to #4348. The current setup with closesocket() is strange. It poses as a compatibility wrapper but adds functionality. Rename it and make it a documented utility function in netbase. Code movement only, zero effect on the functionality.
* reorder includes to compile on OpenBSDFabian Raetz2014-05-021-5/+5
| | | | | | | | From getifaddr(3) manual: "If both <net/if.h> and <ifaddrs.h> are being included, <net/if.h> must be included before <ifaddrs.h>" http://www.openbsd.org/cgi-bin/man.cgi?query=getifaddrs&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
* Merge pull request #3309Wladimir J. van der Laan2013-11-291-1/+1
|\ | | | | | | 9ac5a01 Move types.h include before ifaddres.h for u_int declaration (Robert Backhaus)
| * Move types.h include before ifaddres.h for u_int declarationRobert Backhaus2013-11-221-1/+1
| |
* | prevent Windows redefinition warning cause by compat.hPhilip Kaufmann2013-11-271-0/+2
|/
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-6/+14
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Bump Year Number to 2013super32013-10-201-1/+1
|
* prevent compiler redefinition warningsPhilip Kaufmann2013-10-111-0/+6
| | | | | | - I observed a massive amount of redefinition warnings after #3071, which are silenced by this patch - uses the same style as we do in other places, where we define _WIN32_WINNT
* autotools: switch to autotools buildsystemCory Fields2013-09-051-1/+0
|
* cleanup compat.h Windows stuffPhilip Kaufmann2013-07-241-4/+2
| | | | | | - remove an unneded include for mswsock.h as we use winsock2.h anyway - move typedef u_int SOCKET; into the #ifndef WIN32 part - remove typedef int socklen_t; as this is defined in ws2tcpip.h
* Allow select()ing up to 1024 file descriptors on WindowsPieter Wuille2013-04-261-0/+1
|
* Update License in File HeadersFordy2012-05-181-1/+1
| | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)Timothy Redaelli2012-04-251-3/+1
|
* Remove headers.hPieter Wuille2012-04-171-0/+23
|
* Update all copyrights to 2012Gavin Andresen2012-02-071-1/+1
|
* Network stack refactorPieter Wuille2012-01-061-0/+42
This introduces CNetAddr and CService, respectively wrapping an (IPv6) IP address and an IP+port combination. This functionality used to be part of CAddress, which also contains network flags and connection attempt information. These extra fields are however not always necessary. These classes, along with logic for creating connections and doing name lookups, are moved to netbase.{h,cpp}, which does not depend on headers.h. Furthermore, CNetAddr is mostly IPv6-ready, though IPv6 functionality is not yet enabled for the application itself.