OpenOCD
system.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /***************************************************************************
4  * Copyright (C) 2006 by Dominic Rath <Dominic.Rath@gmx.de> *
5  * Copyright (C) 2007-2008 by Øyvind Harboe <oyvind.harboe@zylin.com> *
6  * Copyright (C) 2008 by Spencer Oliver <spen@spen-soft.co.uk> *
7  * Copyright (C) 2009 by Zachary T Welch <zw@superlucidity.net> *
8  ***************************************************************************/
9 
10 #ifndef OPENOCD_HELPER_SYSTEM_H
11 #define OPENOCD_HELPER_SYSTEM_H
12 
13 /* +++ platform specific headers +++ */
14 #ifdef _WIN32
15 #include <winsock2.h>
16 #include <ws2tcpip.h>
17 #include <sys/types.h>
18 #include <sys/stat.h>
19 #endif
20 /* --- platform specific headers --- */
21 
22 /* standard C library header files */
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 #include <assert.h>
27 #include <ctype.h>
28 #include <errno.h>
29 #include <time.h>
30 
31 #ifdef HAVE_SYS_TIME_H
32 #include <sys/time.h>
33 #endif
34 
35 #ifdef HAVE_SYS_SOCKET_H
36 #include <sys/socket.h>
37 #endif
38 #ifdef HAVE_POLL_H
39 #include <poll.h>
40 #endif
41 
42 #ifdef __ECOS
43 /* missing from eCos */
44 #ifndef EFAULT
45 #define EFAULT 14 /* Bad address */
46 #endif
47 #endif
48 
49 #ifdef HAVE_NETINET_IN_H
50 #include <netinet/in.h>
51 #endif
52 #ifdef HAVE_SYS_SELECT_H
53 #include <sys/select.h> /* select, FD_SET and friends (POSIX.1-2001) */
54 #endif
55 #ifdef HAVE_SYS_PARAM_H
56 #include <sys/param.h> /* for MIN/MAX macros */
57 #endif
58 #ifdef HAVE_UNISTD_H
59 #include <unistd.h>
60 #endif
61 #ifdef HAVE_FCNTL_H
62 #include <fcntl.h>
63 #endif
64 
65 #ifndef true
66 #define true 1
67 #define false 0
68 #endif
69 
70 #endif /* OPENOCD_HELPER_SYSTEM_H */