xref: /reactos/sdk/include/crt/unistd.h (revision c2c66aff)
1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the w64 mingw-runtime package.
4  * No warranty is given; refer to the file DISCLAIMER within this package.
5  */
6 /*
7  * This file is part of the Mingw32 package.
8  *
9  * unistd.h maps (roughly) to io.h
10  */
11 
12 #ifndef __STRICT_ANSI__
13 
14 #include <io.h>
15 #include <process.h>
16 
17 #define __UNISTD_GETOPT__
18 #include <getopt.h>
19 #undef __UNISTD_GETOPT__
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #ifndef FTRUNCATE_DEFINED
26 #define FTRUNCATE_DEFINED
27 /* This is defined as a real library function to allow autoconf
28    to verify its existence. */
29 int ftruncate(int, off_t);
30 __CRT_INLINE int ftruncate(int __fd, off_t __length)
31 {
32   return _chsize (__fd, __length);
33 }
34 #endif
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif
41