Add FreeBSD support.
GitOrigin-RevId: 8cc4a42d4c7879ba1b19591f7b37880d5d554585
This commit is contained in:
parent
37738ec61a
commit
0624f75eec
@ -19,7 +19,7 @@ TDLib (Telegram Database library) is a cross-platform library for building [Tele
|
|||||||
|
|
||||||
`TDLib` has many advantages. Notably `TDLib` is:
|
`TDLib` has many advantages. Notably `TDLib` is:
|
||||||
|
|
||||||
* **Cross-platform**: `TDLib` can be used on Android, iOS, Windows, macOS, Linux, Windows Phone, WebAssembly, watchOS, tvOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort.
|
* **Cross-platform**: `TDLib` can be used on Android, iOS, Windows, macOS, Linux, FreeBSD, Windows Phone, WebAssembly, watchOS, tvOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort.
|
||||||
* **Multilanguage**: `TDLib` can be easily used with any programming language that is able to execute C functions. Additionally it already has native Java (using `JNI`) bindings and .NET (using `C++/CLI` and `C++/CX`) bindings.
|
* **Multilanguage**: `TDLib` can be easily used with any programming language that is able to execute C functions. Additionally it already has native Java (using `JNI`) bindings and .NET (using `C++/CLI` and `C++/CX`) bindings.
|
||||||
* **Easy to use**: `TDLib` takes care of all network implementation details, encryption and local data storage.
|
* **Easy to use**: `TDLib` takes care of all network implementation details, encryption and local data storage.
|
||||||
* **High-performance**: in the [Telegram Bot API](https://core.telegram.org/bots/api), each `TDLib` instance handles more than 23000 active bots simultaneously.
|
* **High-performance**: in the [Telegram Bot API](https://core.telegram.org/bots/api), each `TDLib` instance handles more than 23000 active bots simultaneously.
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
#if TD_LINUX || TD_ANDROID || TD_TIZEN
|
#if TD_LINUX || TD_ANDROID || TD_TIZEN
|
||||||
#define TD_POLL_EPOLL 1
|
#define TD_POLL_EPOLL 1
|
||||||
#define TD_EVENTFD_LINUX 1
|
#define TD_EVENTFD_LINUX 1
|
||||||
|
#elif TD_FREEBSD
|
||||||
|
#define TD_POLL_KQUEUE 1
|
||||||
|
#define TD_EVENTFD_BSD 1
|
||||||
#elif TD_CYGWIN
|
#elif TD_CYGWIN
|
||||||
#define TD_POLL_SELECT 1
|
#define TD_POLL_SELECT 1
|
||||||
#define TD_EVENTFD_BSD 1
|
#define TD_EVENTFD_BSD 1
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include <sys/types.h> // must be included before sys/event.h, which depends on sys/types.h on FreeBSD
|
||||||
|
|
||||||
#include <sys/event.h>
|
#include <sys/event.h>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
#define TD_TIZEN 1
|
#define TD_TIZEN 1
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
#define TD_LINUX 1
|
#define TD_LINUX 1
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
#define TD_FREEBSD 1
|
||||||
#elif defined(__CYGWIN__)
|
#elif defined(__CYGWIN__)
|
||||||
#define TD_CYGWIN 1
|
#define TD_CYGWIN 1
|
||||||
#elif defined(__EMSCRIPTEN__)
|
#elif defined(__EMSCRIPTEN__)
|
||||||
|
Reference in New Issue
Block a user