2 * Copyright 2017 Facebook, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <sys/types.h>
22 #include <basetsd.h> // @manual
26 // This is a massive pain to have be an `int` due to the pthread implementation
27 // we support, but it's far more compatible with the rest of the windows world
28 // as an `int` than it would be as a `void*`
30 // This isn't actually supposed to be defined here, but it's the most
31 // appropriate place without defining a portability header for stdint.h
32 // with just this single typedef.
33 using ssize_t = SSIZE_T;
34 // The Windows headers don't define this anywhere, nor do any of the libs
35 // that Folly depends on, so define it here.
36 using mode_t = unsigned short;