util: Clean up includes

Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.

This commit was created with scripts/clean-includes.

Backports commit aafd758410015e08b1aa8964d739ba8587ce58dc from qemu
This commit is contained in:
Peter Maydell 2018-02-19 01:27:52 -05:00 committed by Lioncash
parent 61a59665d6
commit 56d213f16c
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
15 changed files with 17 additions and 19 deletions

View file

@ -9,6 +9,7 @@
* Version 2.
*/
#include "qemu/osdep.h"
#include "qemu/bitops.h"
#include "qemu/bitmap.h"
#include "qemu/atomic.h"

View file

@ -11,6 +11,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include "qemu/osdep.h"
#include "qemu/bitops.h"
#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)

View file

@ -25,6 +25,7 @@
*
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/crc32c.h"

View file

@ -21,11 +21,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/host-utils.h"
#include <math.h>
#include <limits.h>
#include <errno.h>
void strpadcpy(char *buf, int buf_size, const char *str, char pad)
{

View file

@ -10,6 +10,7 @@
* the COPYING.LIB file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qapi/error.h"

View file

@ -22,8 +22,8 @@
* THE SOFTWARE.
*/
#include "qemu-common.h"
#include "qemu/osdep.h"
#include "qemu-common.h"
#ifdef CONFIG_GETAUXVAL
/* Don't inline this in qemu/osdep.h, because pulling in <sys/auxv.h> for

View file

@ -23,7 +23,7 @@
* THE SOFTWARE.
*/
#include <stdlib.h>
#include "qemu/osdep.h"
#include "unicorn/platform.h"
#include "qemu/host-utils.h"

View file

@ -9,10 +9,10 @@
* This work is licensed under the terms of the GNU GPL, version 2 or
* later. See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include <qemu/mmap-alloc.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <assert.h>
void *qemu_ram_mmap(int fd, size_t size, size_t align, bool shared)
{

View file

@ -13,6 +13,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/queue.h"

View file

@ -39,8 +39,8 @@
#endif
#define HUGETLBFS_MAGIC 0x958458f6
#include "qemu/osdep.h"
#include "unicorn/platform.h"
#include "config-host.h"
#include "sysemu/sysemu.h"
#include <sys/mman.h>
#include <libgen.h>

View file

@ -26,11 +26,10 @@
* THE SOFTWARE.
*
*/
#include "qemu/osdep.h"
#include <winsock2.h>
#include <windows.h>
#include <stdlib.h>
#include "config-host.h"
#include "sysemu/sysemu.h"
/* this must come after including "trace.h" */

View file

@ -10,7 +10,7 @@
* See the COPYING file in the top-level directory.
*/
#include <stdio.h>
#include "qemu/osdep.h"
#include <stdarg.h>
#include <string.h>

View file

@ -10,14 +10,9 @@
* See the COPYING file in the top-level directory.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <signal.h>
#include "qemu/osdep.h"
#include "unicorn/platform.h"
#include <string.h>
#include <limits.h>
#ifdef __linux__
#include <sys/syscall.h>
#include <linux/futex.h>

View file

@ -10,11 +10,10 @@
* See the COPYING file in the top-level directory.
*
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/thread.h"
#include <process.h>
#include <assert.h>
#include <limits.h>
#include "uc_priv.h"

View file

@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qemu/timer.h"
/***********************************************************/