2e3906d46611e27416be1f3803673bcf274ac3a8
[fw/openocd] / src / helper / system.h
1 /***************************************************************************
2  *   Copyright (C) 2006 by Dominic Rath <Dominic.Rath@gmx.de>              *
3  *   Copyright (C) 2007-2008 by Ã˜yvind Harboe <oyvind.harboe@zylin.com>    *
4  *   Copyright (C) 2008 by Spencer Oliver <spen@spen-soft.co.uk>           *
5  *   Copyright (C) 2009 by Zachary T Welch <zw@superlucidity.net>          *
6  *                                                                         *
7  *   This program is free software; you can redistribute it and/or modify  *
8  *   it under the terms of the GNU General Public License as published by  *
9  *   the Free Software Foundation; either version 2 of the License, or     *
10  *   (at your option) any later version.                                   *
11  *                                                                         *
12  *   This program is distributed in the hope that it will be useful,       *
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
15  *   GNU General Public License for more details.                          *
16  *                                                                         *
17  *   You should have received a copy of the GNU General Public License     *
18  *   along with this program; if not, write to the                         *
19  *   Free Software Foundation, Inc.,                                       *
20  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
21  ***************************************************************************/
22 #ifndef SYSTEM_H
23 #define SYSTEM_H
24
25 // standard C library header files
26 #include <stdio.h>
27 #include <stdlib.h>
28 #include <string.h>
29 #include <ctype.h>
30 #include <errno.h>
31
32 // +++ AC_HEADER_TIME +++
33 #ifdef TIME_WITH_SYS_TIME
34 # include <sys/time.h>
35 # include <time.h>
36 #else
37 # ifdef HAVE_SYS_TIME_H
38 #  include <sys/time.h>
39 # else
40 #  include <time.h>
41 # endif
42 #endif
43 // --- AC_HEADER_TIME ---
44
45 // +++ platform specific headers +++
46 #if BUILD_ECOSBOARD == 1
47 #include <pkgconf/system.h>
48 #endif
49 #ifdef _WIN32
50 #include <winsock2.h>
51 #include <ws2tcpip.h>
52 #endif
53 // --- platform specific headers ---
54
55 #ifdef HAVE_SYS_SOCKET_H
56 #include <sys/socket.h>
57 #endif
58 #ifdef HAVE_SYS_POLL_H
59 #include <sys/poll.h>
60 #endif
61 #ifdef HAVE_NETINET_IN_H
62 #include <netinet/in.h>
63 #endif
64 #ifdef HAVE_SYS_SELECT_H
65 #include <sys/select.h> /* select, FD_SET and friends (POSIX.1-2001) */
66 #endif
67 #ifdef HAVE_SYS_PARAM_H
68 #include <sys/param.h> /* for MIN/MAX macros */
69 #endif
70 #ifdef HAVE_UNISTD_H
71 #include <unistd.h>
72 #endif
73 #ifdef HAVE_FCNTL_H
74 #include <fcntl.h>
75 #endif
76
77 #endif // SYSTEM_H