Fossil SCM

fossil-scm / win / include / unistd.h
Blame History Raw 48 lines
1
#ifndef _UNISTD_H
2
#define _UNISTD_H 1
3
4
/* This file intended to serve as a drop-in replacement for
5
* unistd.h on Windows
6
* Please add functionality as neeeded
7
*/
8
9
#include <stdlib.h>
10
#include <io.h>
11
#define srandom srand
12
#define random rand
13
#if defined(__DMC__)
14
#endif
15
16
#if defined(_WIN32)
17
#define _CRT_SECURE_NO_WARNINGS 1
18
19
#ifndef F_OK
20
#define F_OK 0
21
#endif /* not F_OK */
22
23
#ifndef X_OK
24
#define X_OK 1
25
#endif /* not X_OK */
26
27
#ifndef W_OK
28
#define W_OK 2
29
#endif /* not W_OK */
30
31
#ifndef R_OK
32
#define R_OK 4
33
#endif /* not R_OK */
34
35
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
36
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
37
38
39
40
#endif
41
42
#define access _access
43
#define ftruncate _chsize
44
45
#define ssize_t int
46
47
#endif /* unistd.h */
48

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button