Keith Smiley 41c95abb99 Enable _GNU_SOURCE for Android
When targeting the Android NDK _GNU_SOURCE is not enabled by default:

```
 /*
  * With bionic, you always get all C and POSIX API.
  *
  * If you want BSD and/or GNU extensions, _BSD_SOURCE and/or _GNU_SOURCE are
  * expected to be defined by callers before *any* standard header file is
  * included.
  *
  * In our header files we test against __USE_BSD and __USE_GNU.
  */
 #if defined(_GNU_SOURCE)
 #  define __USE_BSD 1
 #  define __USE_GNU 1
 #endif
```

Because of this `pipe2` is not available:

```
 #if defined(__USE_GNU)
 int pipe2(int __fds[2], int __flags) __INTRODUCED_IN(9);
 #endif
```

The function used to check if it does exist:

```
CHECK_FUNCTION_EXISTS_EX(pipe2 EVENT__HAVE_PIPE2)
```

Just check that the _linking_ succeeds, which it does, it's just not
visible in the import, leading to a warning (or error):

```
evutil.c:2637:6: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if (pipe2(fd, O_NONBLOCK|O_CLOEXEC) == 0)
            ^
```

When targeting the NDK it should be safe to always opt into this. Clang
would pass the right flag for us automatically _if_ the source was C++
instead of C.
2019-07-08 14:09:15 -07:00
2016-10-05 15:47:46 +03:00
2018-12-05 11:48:03 +03:00
2016-10-05 15:47:46 +03:00
2016-10-31 22:37:56 +03:00
2017-01-26 02:36:00 +03:00
2019-02-28 17:48:10 -08:00
2019-02-28 17:48:10 -08:00
2016-10-05 15:51:40 +03:00
2019-07-08 14:09:15 -07:00
2019-03-11 20:11:44 +03:00
2018-12-16 00:51:14 +03:00
2006-10-15 21:41:56 +00:00
2018-08-02 02:50:48 +03:00
2015-08-25 19:15:50 +03:00
2019-04-01 02:42:07 +03:00
2019-04-11 22:48:01 +03:00
2019-05-11 11:29:55 +03:00
2018-04-02 23:13:28 +03:00
2019-06-03 23:43:45 +03:00
2012-04-09 11:30:46 -04:00
2013-02-07 17:55:36 -08:00
2017-01-26 02:36:00 +03:00
2019-04-11 22:48:01 +03:00

libevent logo

Appveyor Win32 Build Status Travis Build Status Coverage Status Join the chat at https://gitter.im/libevent/libevent

1. BUILDING AND INSTALLATION

Autoconf

$ ./configure
$ make
$ make verify   # (optional)
$ sudo make install

See Documentation/Building#Autoconf for more information

CMake (Windows)

Install CMake: https://www.cmake.org

$ md build && cd build
$ cmake -G "Visual Studio 10" ..   # Or use any generator you want to use. Run cmake --help for a list
$ cmake --build . --config Release # Or "start libevent.sln" and build with menu in Visual Studio.

See Documentation/Building#Building on Windows for more information

CMake (Unix)

$ mkdir build && cd build
$ cmake ..     # Default to Unix Makefiles.
$ make
$ make verify  # (optional)

See Documentation/Building#Building on Unix (With CMake) for more information

2. USEFUL LINKS:

For the latest released version of Libevent, see the official website at http://libevent.org/ .

There's a pretty good work-in-progress manual up at http://www.wangafu.net/~nickm/libevent-book/ .

For the latest development versions of Libevent, access our Git repository via

$ git clone https://github.com/libevent/libevent.git

You can browse the git repository online at:

https://github.com/libevent/libevent

To report bugs, issues, or ask for new features:

Patches: https://github.com/libevent/libevent/pulls

OK, those are not really patches. You fork, modify, and hit the "Create Pull Request" button. You can still submit normal git patches via the mailing list.

Bugs, Features [RFC], and Issues: https://github.com/libevent/libevent/issues

Or you can do it via the mailing list.

There's also a libevent-users mailing list for talking about Libevent use and development:

http://archives.seul.org/libevent/users/

3. ACKNOWLEDGMENTS

The following people have helped with suggestions, ideas, code or fixing bugs.

Description
Languages
C 87%
Roff 3.8%
CMake 3.6%
M4 2.5%
Python 2.2%
Other 0.9%