unistd.h
Go to the documentation of this file.
1 #include "sick_scan/sick_scan_base.h" /* Base definitions included in all header files, added by add_sick_scan_base_header.py. Do not edit this line. */
2 #ifndef _UNISTD_H
3 #define _UNISTD_H 1
4 
5 /* This is intended as a drop-in replacement for unistd.h on Windows.
6  * Please add functionality as neeeded.
7  * https://stackoverflow.com/a/826027/1202830
8  */
9 
10 #include <stdlib.h>
11 #include <io.h>
12 #include <getopt.h> /* getopt at: https://gist.github.com/ashelly/7776712 */
13 #include <process.h> /* for getpid() and the exec..() family */
14 #include <direct.h> /* for _getcwd() and _chdir() */
15 #include "usleep.h"
16 #define srandom srand
17 #define random rand
18 
19 /* Values for the second argument to access.
20  These may be OR'd together. */
21 #define R_OK 4 /* Test for read permission. */
22 #define W_OK 2 /* Test for write permission. */
23 //#define X_OK 1 /* execute permission - unsupported in windows*/
24 #define F_OK 0 /* Test for existence. */
25 
26 #define access _access
27 #define dup2 _dup2
28 #define execve _execve
29 #define ftruncate _chsize
30 #define unlink _unlink
31 #define fileno _fileno
32 #define getcwd _getcwd
33 #define chdir _chdir
34 #define isatty _isatty
35 #define lseek _lseek
36 /* read, write, and close are NOT being #defined here, because while there are file handle specific versions for Windows, they probably don't work for sockets. You need to look at your app and consider whether to call e.g. closesocket(). */
37 
38 #ifdef _WIN64
39 #define ssize_t __int64
40 #else
41 #define ssize_t long
42 #endif
43 
44 #define STDIN_FILENO 0
45 #define STDOUT_FILENO 1
46 #define STDERR_FILENO 2
47 /* should be in some equivalent to <sys/types.h> */
48 #if defined(_MSC_VER) && (_MSC_VER < 1600 )
49 typedef __int8 int8_t;
50 typedef __int16 int16_t;
51 typedef __int32 int32_t;
52 typedef __int64 int64_t;
53 typedef unsigned __int8 uint8_t;
54 typedef unsigned __int16 uint16_t;
55 typedef unsigned __int32 uint32_t;
56 typedef unsigned __int64 uint64_t;
57 #endif
58 #endif /* unistd.h */
getopt.h
usleep.h
sick_scan_base.h


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:13