Commit Graph

154 Commits

Author SHA1 Message Date
Max Kellermann 38f0c16904 system/UniqueFileDescriptor: add CreatePipeNonBlock() 2019-02-27 23:30:56 +01:00
Max Kellermann da4bb4c298 fs/io/OutputStream: update include guard 2019-02-19 12:39:29 +01:00
Max Kellermann 56bded07b1 system/UniqueFileDescriptor: import std::swap 2019-02-19 12:36:54 +01:00
Max Kellermann db144a43ad system/Open: add OpenWriteOnly(), OpenDirectory() 2019-02-19 12:16:41 +01:00
Max Kellermann 5965f62b56 system/EpollFD: include cleanup 2019-02-19 11:51:52 +01:00
HyShai 18c042d4cf
remove non-block call
This is similar to b177bffa6a, in that it fixes the Windows issue of connecting to the open socket. Also, the listen_socket is set to AcceptNonBlock after the connection anyways.
2018-12-18 15:23:40 -05:00
Max Kellermann ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann bba22c9c8c system/FileDescriptor: check `__linux__` instead of `__linux`
`__linux` is the deprecated non-standard macros which appears to be
not present at all on PowerPC.

Closes #398
2018-11-02 16:50:38 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 94592c1406 build with Meson instead of autotools
So long, autotools!  This is my last MPD related project to migrate
away from it.  It has its strengths, but also very obvious weaknesses
and weirdnesses.  Today, many of its quirks are not needed anymore,
and are cumbersome and slow.  Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann fe2f7a3e5a configure.ac: add automake conditional "LINUX" 2018-08-22 16:09:40 +02:00
Max Kellermann 98eed1f5ab system/EpollFD: use class UniqueFileDescriptor 2018-08-22 16:09:40 +02:00
Max Kellermann 5d0a463f09 system/{Epoll,Event,Signal}FD: relicense to BSD-2 2018-08-22 15:40:45 +02:00
Max Kellermann dd461400fb system/EPollFD: rename to EpollFD 2018-08-22 15:40:45 +02:00
Max Kellermann b1390ec27f system/UniqueFileDescriptor: make the "int" constructor public 2018-08-22 15:40:45 +02:00
Max Kellermann d092a88a93 system/Open: new UniqueFileDescriptor constructing library 2018-08-21 18:27:39 +02:00
Max Kellermann d036e20826 system/FileDescriptor: add openat() wrapper 2018-08-21 18:15:37 +02:00
Max Kellermann 4f2163e76c system/FileDescriptor: include cleanup 2018-08-20 17:25:42 +02:00
Max Kellermann eef66dee04 system/FileDescriptor: pass FileDescriptor to CheckDuplicate() 2018-08-20 17:23:14 +02:00
Max Kellermann 7ad440ca1c net/SocketDescriptor: make eventfd() and signalfd() mandatory on Linux 2018-08-20 17:16:07 +02:00
Max Kellermann 13b3e9e7b3 system/FileDescriptor: make inotify_init1() mandatory on Linux 2018-08-20 17:12:50 +02:00
Max Kellermann 8106929d60 system/FileDescriptor: add pipe2() wrapper 2018-08-20 17:05:29 +02:00
Max Kellermann 795baed3f5 system/FileDescriptor: make pipe2() mandatory on Linux 2018-08-20 17:04:43 +02:00
Max Kellermann 5487d40be9 system/FileDescriptor: add operator!= 2018-08-20 16:49:14 +02:00
Max Kellermann 5e512763d3 system/UniqueFileDescriptor: make the base class public 2018-08-20 16:38:27 +02:00
Max Kellermann a65d02d3ae system/FileDescriptor: add "noexcept" 2018-08-20 16:34:47 +02:00
Max Kellermann ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann b5c569cd30 system/FileDescriptor: add IsPipe(), IsSocket() 2018-08-20 16:05:03 +02:00
Max Kellermann 1ba35e1fd4 release v0.20.21
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlt3CwMQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEiQcD/0S7NzE9nLsuTJJB9ElzOW17XiKkLKuDErQ
 P1r46APwa0agqfHFTUM5a+ifMCFQ4QTh0p+MiImYniBKmTnuKYBxZJFgHYojrPOS
 jxJbPJI6R7vLfo07kIem1jw/3YjqF4BDJyn9FYLBLgWz3IiFC/H4XH4XYxoQhTYL
 Xv0aGMCnil6gD2ENvx4by3tqsM9l5ktvPwR6bktRw4ImhgT5zHShpuPYZekas1ic
 +A1oCXFO4UrlZQ0sHdcG7Up8NOEJvAiNR5+BCnb9aR8l6M2Mzu2u715zSSWvTBI+
 SCa8lE/gkndJC2Q3BmPRp+OcWU/uwVIkWdJdCF8DgN5vmk3cLRJ/SpHGkR1iYSvF
 MUW8QF0tc2Xctv0NHYXlDj6wVVJ+OWNUcNy6SWHAT7o5S0ppB+2nesAfTVqqGK/Z
 yRmcW5CvYNH8dfN7WBkLehN57dpI6O1YkfF30xCPcT+fu4oBYv7owU4MqFVcJN2r
 FEbTZCfRFGjF7Kmb6aF+mFMhTnqYNEZjFS0SljLJWjlimLaSfgTXdEv23IpxIMnV
 i+CEy7B2RseR31tmCekyWxdLnNJPYC4Zqwer8dd7yrY/exEM/6x9JQDUbCaGccar
 NlwmCj6uDKXxU3tkb9Mk77oX51dFL58BtpoQw/DfXRWSX+UsAxFioyAbJ9juJUrM
 JO9WMABo0Q==
 =2zvn
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.21'

release v0.20.21
2018-08-17 20:02:27 +02:00
Max Kellermann 98efb4f6d5 android: raise minSdkVersion to 21
The number of MPD installs on Android < 5.0 is negligible, and that
API version introduces lots of useful features for MPD.
2018-08-17 19:01:37 +02:00
Max Kellermann 4218f56f6c system/SignalFD: add "noexcept" 2018-08-06 11:58:37 +02:00
Max Kellermann dd18fe34a7 system/SignalFD: throw exception on error 2018-08-06 11:58:29 +02:00
Max Kellermann 5b09504a71 system/Event{FD,Pipe}: add "noexcept" 2018-08-06 11:57:40 +02:00
Max Kellermann 0c1a001622 system/Event{FD,Pipe}: throw exception on error 2018-08-06 11:49:38 +02:00
Max Kellermann d4ce9c0df2 system/FileDescriptor: no-op implementation of *CloseOnExec() on Windows
Fixes the NFS client build, closes #305.
2018-07-13 18:16:39 +02:00
Max Kellermann 13ac74e0a2 system/EPollFD: update API documentation 2018-01-29 21:49:27 +01:00
Max Kellermann c2f23d92dc system/EPollFD: add "noexcept" 2018-01-29 21:48:39 +01:00
Max Kellermann 6246d36fe6 Merge branch 'v0.20.x' 2017-12-16 20:56:06 +01:00
Max Kellermann dfaf08743c *: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
2017-12-12 10:22:20 +01:00
Max Kellermann d9552d8a6d android/build.py: support NDK r16 2017-12-12 10:01:47 +01:00
Max Kellermann b177bffa6a system/EventPipe: fix WSAEINPROGRESS on Windows
Apparently, connecting a socket to a loopback address can block on
Windows, and a non-blocking socket will return WSAEINPROGRESS.  This
broken PoorSocketPair() in commit 2119e4fd3e, which made the socket
non-blocking right from the start.  This fix postpones the
ioctlsocket(FIONBIO) call until after the connect().

Closes #134
2017-10-24 20:09:11 +02:00
Max Kellermann a6e62479be system/Error: include cleanup 2017-09-13 17:49:37 +02:00
Max Kellermann 6c825064ea system/Error: add more "noexcept" 2017-09-13 17:48:13 +02:00
Max Kellermann 13d02968bd system/FileDescriptor: Close() should not be called on undefined object
It does not do much harm - but it causes an unnecessary (failing)
system call.
2017-09-13 17:43:13 +02:00
Max Kellermann e576556149 system/UniqueFileDescriptor: remove duplicate "using" statements 2017-09-13 17:41:15 +02:00
Max Kellermann 66e74900df system/UniqueFileDescriptor: expose CheckDuplicate() 2017-09-13 17:40:33 +02:00
Max Kellermann aadc735d71 system/FileDescriptor: mention class UniqueFileDescriptor in API documentation 2017-09-13 17:39:29 +02:00
Max Kellermann a13897cf6f system/FileDescriptor: add CheckDuplicate() 2017-09-13 17:37:28 +02:00
Max Kellermann b188ae0e5c system/FileDescriptor: use _WIN32 instead of WIN32 2017-09-13 17:36:48 +02:00
Ryan Walklin 318f80d113 Fix EventPipe file descriptors 2017-08-17 12:21:01 +10:00