You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

82 lines
2.5 KiB

  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, see <http://www.gnu.org/licenses/>. *
  19. ***************************************************************************/
  20. #ifndef OPENOCD_HELPER_SYSTEM_H
  21. #define OPENOCD_HELPER_SYSTEM_H
  22. /* +++ platform specific headers +++ */
  23. #ifdef _WIN32
  24. #include <winsock2.h>
  25. #include <ws2tcpip.h>
  26. #include <sys/types.h>
  27. #include <sys/stat.h>
  28. #endif
  29. /* --- platform specific headers --- */
  30. /* standard C library header files */
  31. #include <stdio.h>
  32. #include <stdlib.h>
  33. #include <string.h>
  34. #include <assert.h>
  35. #include <ctype.h>
  36. #include <errno.h>
  37. #include <time.h>
  38. #ifdef HAVE_SYS_TIME_H
  39. #include <sys/time.h>
  40. #endif
  41. #ifdef HAVE_SYS_SOCKET_H
  42. #include <sys/socket.h>
  43. #endif
  44. #ifdef HAVE_POLL_H
  45. #include <poll.h>
  46. #endif
  47. #ifdef __ECOS
  48. /* missing from eCos */
  49. #ifndef EFAULT
  50. #define EFAULT 14 /* Bad address */
  51. #endif
  52. #endif
  53. #ifdef HAVE_NETINET_IN_H
  54. #include <netinet/in.h>
  55. #endif
  56. #ifdef HAVE_SYS_SELECT_H
  57. #include <sys/select.h> /* select, FD_SET and friends (POSIX.1-2001) */
  58. #endif
  59. #ifdef HAVE_SYS_PARAM_H
  60. #include <sys/param.h> /* for MIN/MAX macros */
  61. #endif
  62. #ifdef HAVE_UNISTD_H
  63. #include <unistd.h>
  64. #endif
  65. #ifdef HAVE_FCNTL_H
  66. #include <fcntl.h>
  67. #endif
  68. #ifndef true
  69. #define true 1
  70. #define false 0
  71. #endif
  72. #endif /* OPENOCD_HELPER_SYSTEM_H */