forked from CESNET/UltraGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It can be used in place of other network-related headers, not just for htonl and family. + compat for fd_t and INVALID_SOCKET (that has been in config_*.h)
- Loading branch information
1 parent
745c7f9
commit 9adf7b6
Showing
13 changed files
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
/** | ||
* @file compat/htonl.h | ||
* @file compat/net.h | ||
* @author Martin Pulec <[email protected]> | ||
* | ||
* This file just picks the correct header for [nh]to[nh]l functions. | ||
* This file includes the correct header for network-related functions | ||
* (also htonl and the family). | ||
*/ | ||
/* | ||
* Copyright (c) 2024 CESNET, z. s. p. o. | ||
|
@@ -37,8 +38,16 @@ | |
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef COMPAT_NET_H_EF7499D8_4939_4F86_A585_2EED8221D056 | ||
#define COMPAT_NET_H_EF7499D8_4939_4F86_A585_2EED8221D056 | ||
|
||
#ifdef _WIN32 | ||
#include <winsock2.h> | ||
typedef SOCKET fd_t; | ||
#else | ||
#include <arpa/inet.h> | ||
typedef int fd_t; | ||
#define INVALID_SOCKET (-1) | ||
#endif | ||
|
||
#endif // defined COMPAT_NET_H_EF7499D8_4939_4F86_A585_2EED8221D056 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters