Cleanup of config/includes.

Remove a use of AH_BOTTOM from configure.ac. This macro is used by
autoheader to add '#include' of some include file to the end of
config.h.in and then to config.h. OpenOCD can be built with a custom
config.h, so it's preferable to move these '#include' statement directly
in the C files that need them dropping this unneeded dependency.

It also causes problems when I want to use the gnulib library (which
comes with its own Makefile, and does not have the same include path as
the top-level Makefile).

So this change touches a lot of files, but is actually really simple. It
does not affect functionality at all.

Change-Id: I52c70bf15eb2edc1dd10e0fde23b2bcd4caec000
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: http://openocd.zylin.com/6171
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Tim Newsome
2021-04-19 13:04:30 -07:00
committed by Antonio Borneo
parent b44948985f
commit 87c90393fe
56 changed files with 81 additions and 17 deletions

View File

@@ -21,6 +21,15 @@
#ifndef OPENOCD_HELPER_SYSTEM_H
#define OPENOCD_HELPER_SYSTEM_H
/* +++ platform specific headers +++ */
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <sys/types.h>
#include <sys/stat.h>
#endif
/* --- platform specific headers --- */
/* standard C library header files */
#include <stdio.h>
#include <stdlib.h>
@@ -34,15 +43,6 @@
#include <sys/time.h>
#endif
/* +++ platform specific headers +++ */
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <sys/types.h>
#include <sys/stat.h>
#endif
/* --- platform specific headers --- */
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif