OSDN Git Service

Some further inline function rationalization.
[mingw/mingw-org-wsl.git] / mingwrt / include / unistd.h
1 #ifndef _UNISTD_H
2 /*
3  * This file is part of the Mingw32 package.
4  *
5  * unistd.h maps (roughly) to io.h
6  * Other headers included by unistd.h may be selectively processed;
7  * __UNISTD_H_SOURCED__ enables such selective processing.
8  */
9 #define _UNISTD_H
10 #define __UNISTD_H_SOURCED__ 1
11
12 #include <io.h>
13 #include <process.h>
14 #include <getopt.h>
15
16 /* These are also defined in stdio.h. */
17 #ifndef SEEK_SET
18 #define SEEK_SET 0
19 #endif
20
21 #ifndef SEEK_CUR
22 #define SEEK_CUR 1
23 #endif
24
25 #ifndef SEEK_END
26 #define SEEK_END 2
27 #endif
28
29 _BEGIN_C_DECLS
30
31 #if !defined __NO_ISOCEXT
32 #include <sys/types.h> /* For useconds_t. */
33
34 int __cdecl __MINGW_NOTHROW usleep(useconds_t useconds);
35 #endif  /* Not __NO_ISOCEXT */
36
37 /* This is defined both as a real library function, to allow autoconf
38  * to verify its existence, and as a potentially inline implementation.
39  */
40 int ftruncate(int, off_t);
41 #ifndef __NO_INLINE__
42 __CRT_INLINE __JMPSTUB__(( FUNCTION = ftruncate, REMAPPED = _chsize ))
43 int ftruncate(int __fd, off_t __length)
44 { return _chsize (__fd, __length); }
45 #endif
46
47 _END_C_DECLS
48
49 #undef __UNISTD_H_SOURCED__
50 #endif /* _UNISTD_H */