sim: fix compilation on mingw64 [PR sim/28476]
authorOrgad Shaneh <orgads@gmail.com>
Thu, 28 Oct 2021 09:07:46 +0000 (09:07 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 31 Oct 2021 03:50:09 +0000 (23:50 -0400)
commit1352aabb238dc0f21097b753d6fdb931e533db41
treeb0759c19c45b6089730fc2624cf73beb0c120768
parent590abc168fb25908cde1df89f4905b575c14e55d
sim: fix compilation on mingw64 [PR sim/28476]

...by reordering includes.

1. sim-utils.c

sim/mips/sim-main.h defines UserMode, while there is a struct in winnt.h
which has UserMode as a member. So if sim-main.h is included before winnt.h,
compilation fails.

2. ppc

registers.h defines CR, which is used as a member in winnt.h.

winsock2.h is included by sys/time.h, so sys/time.h has to be included
before registers.h.

Bug: https://sourceware.org/PR28476
sim/common/sim-utils.c
sim/ppc/emul_netbsd.c
sim/ppc/emul_unix.c
sim/ppc/mon.c