summaryrefslogtreecommitdiffstats
path: root/include/ws_posix_compat.h
blob: 61cefc9370d019ae66dc0438621d391636473bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ws_posix_compat.h
 * Definitions for POSIX compatibility.
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef __POSIX_COMPAT_H__
#define __POSIX_COMPAT_H__

#include <stdint.h>
#include <limits.h>

#if !defined(SSIZE_MAX) && !defined(HAVE_SSIZE_T)
#if defined(_WIN32)
#include <BaseTsd.h>

typedef SSIZE_T ssize_t;
#define SSIZE_MAX SSIZE_T_MAX

#endif /* _WIN32 */
#endif /* !SSIZE_MAX && !HAVE_SSIZE_T */

#endif /* __POSIX_COMPAT_H__ */