1 //  Copyright (c) 2011-present, Facebook, Inc.  All rights reserved.
2 //  This source code is licensed under both the GPLv2 (found in the
3 //  COPYING file in the root directory) and Apache 2.0 License
4 //  (found in the LICENSE.Apache file in the root directory).
5 
6 #pragma once
7 
8 #include <sys/types.h>
9 
10 #ifdef _WIN32
11 #include <basetsd.h> // @manual
12 
13 #define HAVE_MODE_T 1
14 
15 // This is a massive pain to have be an `int` due to the pthread implementation
16 // we support, but it's far more compatible with the rest of the windows world
17 // as an `int` than it would be as a `void*`
18 using pid_t = int;
19 // This isn't actually supposed to be defined here, but it's the most
20 // appropriate place without defining a portability header for stdint.h
21 // with just this single typedef.
22 using ssize_t = SSIZE_T;
23 // The Windows headers don't define this anywhere, nor do any of the libs
24 // that Folly depends on, so define it here.
25 using mode_t = unsigned short;
26 #endif
27