Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
portable_unistd.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FILESYSTEM_PORTABLE_UNISTD_H_
6#define FILESYSTEM_PORTABLE_UNISTD_H_
7
9
10#if defined(OS_WIN)
11#include <direct.h>
12#include <io.h>
13#include <stdlib.h>
14
15#define STDERR_FILENO _fileno(stderr)
16#define PATH_MAX _MAX_PATH
17
18#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
19#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG)
20#define R_OK 4
21
22#define mkdir(path, mode) _mkdir(path)
23
24#else
25#include <unistd.h>
26#endif
27
28#endif // FILESYSTEM_PORTABLE_UNISTD_H_