OpenVPN 3 Core Library
Loading...
Searching...
No Matches
size.hpp
Go to the documentation of this file.
1// OpenVPN -- An application to securely tunnel IP networks
2// over a single port, with support for SSL/TLS-based
3// session authentication and key exchange,
4// packet encryption, packet authentication, and
5// packet compression.
6//
7// Copyright (C) 2012- OpenVPN Inc.
8//
9// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10//
11
12// define very basic types such as size_t, ssize_t
13
14#ifndef OPENVPN_COMMON_SIZE_H
15#define OPENVPN_COMMON_SIZE_H
16
17#include <cstddef> // defines std::size_t
18
20
21#ifdef OPENVPN_PLATFORM_WIN
22#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) && !defined(HAVE_SSIZE_T)
23#include <BaseTsd.h>
24typedef SSIZE_T ssize_t;
25#define _SSIZE_T_
26#define _SSIZE_T_DEFINED
27#endif
28#else
29#include <unistd.h> // get ssize_t
30#endif
31
32#endif