Apache Mesos
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
3rdparty
stout
include
stout
os
int_fd.hpp
Go to the documentation of this file.
1
// Licensed under the Apache License, Version 2.0 (the "License");
2
// you may not use this file except in compliance with the License.
3
// You may obtain a copy of the License at
4
//
5
// http://www.apache.org/licenses/LICENSE-2.0
6
//
7
// Unless required by applicable law or agreed to in writing, software
8
// distributed under the License is distributed on an "AS IS" BASIS,
9
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
// See the License for the specific language governing permissions and
11
// limitations under the License.
12
13
#ifndef __STOUT_OS_INT_FD_HPP__
14
#define __STOUT_OS_INT_FD_HPP__
15
16
17
// For readability, we minimize the number of #ifdef blocks in the code by
18
// splitting platform specifc system calls into separate directories.
19
#ifdef __WINDOWS__
20
#include <
stout/os/windows/fd.hpp
>
21
#endif // __WINDOWS__
22
23
// The `int_fd` type is designed to be able to keep / continue to write the
24
// existing POSIX file descriptor pattern in a portable manner with Windows.
25
//
26
// IMPORTANT: Use the `int_fd` in platform-agnostic code paths, and use `int`
27
// or `os::WindowsFD` directly in platform-specific code paths.
28
//
29
// NOTE: The `int_` prefix is meant to indicate that on POSIX, `int_fd` will
30
// behave exactly as-is.
31
using
int_fd
=
32
#ifdef __WINDOWS__
33
os::WindowsFD
;
34
#else
35
int;
36
#endif // __WINDOWS__
37
38
#endif // __STOUT_OS_INT_FD_HPP__
fd.hpp
os::WindowsFD
Definition:
fd.hpp:52
int_fd
int int_fd
Definition:
int_fd.hpp:35
Generated by
1.8.11