clean includes, part 2
Subsystems (3)
cover clean includes, part 2
This patchset runs clean-includes on a bunch more files. With this (plus one or two patches I sent earlier) every file in the tree except for those in tests/ has been updated. (I skipped tests/ for now because at least some of the files in tests/tcg seem to be totally standalone. I'll look at those next week but I thought I'd send out this set first.)
One or two files might have slipped through the net if they were newly added since I did the scan; we can pick those up later though.
thanks
-- PMM
Peter Maydell (15):
ui: Clean up includes
stubs: Clean up includes
bsd-user: Clean up includes
backends: Clean up includes
util: Clean up includes
disas: Clean up includes
qapi: Clean up includes
qga: Clean up includes
slirp: Clean up includes
net: Clean up includes
qobject: Clean up includes
qom: Clean up includes
io: Clean up includes
contrib: Clean up includes
all: Clean up includes
accel.c | 1 + aio-posix.c | 1 + aio-win32.c | 1 + arch_init.c | 2 +- async.c | 1 + backends/baum.c | 1 + backends/hostmem-file.c | 1 + backends/hostmem-ram.c | 1 + backends/hostmem.c | 1 + backends/msmouse.c | 2 +- backends/rng-egd.c | 1 + backends/rng-random.c | 1 + backends/rng.c | 1 + backends/testdev.c | 1 + backends/tpm.c | 1 + balloon.c | 1 + block.c | 4 +--- blockdev-nbd.c | 1 + blockdev.c | 1 + blockjob.c | 2 +- bootdevice.c | 1 + bsd-user/bsdload.c | 8 +------- bsd-user/elfload.c | 8 +------- bsd-user/main.c | 8 +------- bsd-user/mmap.c | 7 +------ bsd-user/signal.c | 7 +------ bsd-user/strace.c | 6 +----- bsd-user/syscall.c | 12 +----------- bsd-user/uaccess.c | 3 +-- bt-host.c | 2 +- bt-vhci.c | 1 + contrib/ivshmem-client/ivshmem-client.c | 2 +- contrib/ivshmem-client/main.c | 1 + contrib/ivshmem-server/ivshmem-server.c | 2 +- contrib/ivshmem-server/main.c | 1 + device-hotplug.c | 1 + device_tree.c | 7 +------ disas.c | 3 +-- disas/hppa.c | 1 + disas/i386.c | 2 +- disas/ia64.c | 3 +-- disas/m68k.c | 3 +-- disas/s390.c | 1 + disas/sparc.c | 2 +- disas/tci.c | 1 + dma-helpers.c | 1 + dump.c | 2 +- fpu/softfloat.c | 3 +-- gdbstub.c | 9 +-------- hmp.c | 1 + io/channel-buffer.c | 1 + io/channel-command.c | 1 + io/channel-file.c | 1 + io/channel-socket.c | 1 + io/channel-tls.c | 1 + io/channel-watch.c | 1 + io/channel-websock.c | 1 + io/channel.c | 1 + io/task.c | 1 + iohandler.c | 2 +- ioport.c | 1 + iothread.c | 1 + kvm-all.c | 3 +-- kvm-stub.c | 1 + main-loop.c | 1 + memory.c | 2 +- memory_mapping.c | 1 + module-common.c | 2 +- monitor.c | 2 +- nbd/client.c | 1 + nbd/common.c | 1 + nbd/server.c | 1 + net/checksum.c | 1 + net/dump.c | 1 + net/eth.c | 1 + net/filter-buffer.c | 1 + net/filter.c | 1 + net/hub.c | 1 + net/l2tpv3.c | 2 +- net/net.c | 2 +- net/netmap.c | 3 +-- net/queue.c | 1 + net/slirp.c | 2 +- net/socket.c | 2 +- net/tap-aix.c | 2 +- net/tap-bsd.c | 1 + net/tap-haiku.c | 2 +- net/tap-linux.c | 1 + net/tap-solaris.c | 2 +- net/tap-win32.c | 2 +- net/tap.c | 3 +-- net/util.c | 3 +-- net/vde.c | 2 +- net/vhost-user.c | 1 + numa.c | 1 + os-posix.c | 6 +----- os-win32.c | 7 +------ page_cache.c | 8 +------- qapi/opts-visitor.c | 1 + qapi/qapi-dealloc-visitor.c | 1 + qapi/qapi-util.c | 2 +- qapi/qapi-visit-core.c | 1 + qapi/qmp-dispatch.c | 2 +- qapi/qmp-event.c | 2 +- qapi/qmp-input-visitor.c | 1 + qapi/qmp-output-visitor.c | 1 + qapi/qmp-registry.c | 2 +- qapi/string-input-visitor.c | 1 + qapi/string-output-visitor.c | 1 + qdev-monitor.c | 1 + qemu-bridge-helper.c | 13 ++----------- qemu-char.c | 8 +------- qemu-log.c | 1 + qemu-nbd.c | 5 +---- qemu-seccomp.c | 2 +- qemu-timer.c | 1 + qga/channel-posix.c | 7 +------ qga/channel-win32.c | 5 +---- qga/commands-posix.c | 9 +-------- qga/commands-win32.c | 3 +-- qga/commands.c | 1 + qga/guest-agent-command-state.c | 1 + qga/main.c | 5 +---- qga/service-win32.c | 3 +-- qga/vss-win32.c | 2 +- qjson.c | 2 +- qmp.c | 1 + qobject/json-lexer.c | 2 +- qobject/json-parser.c | 2 +- qobject/json-streamer.c | 1 + qobject/qbool.c | 1 + qobject/qdict.c | 1 + qobject/qfloat.c | 1 + qobject/qint.c | 1 + qobject/qjson.c | 1 + qobject/qlist.c | 1 + qobject/qnull.c | 1 + qobject/qobject.c | 1 + qobject/qstring.c | 1 + qom/container.c | 2 +- qom/object.c | 1 + qom/object_interfaces.c | 1 + qom/qom-qobject.c | 1 + qtest.c | 1 + replay/replay-events.c | 1 + replay/replay-input.c | 1 + replay/replay-internal.c | 1 + replay/replay-time.c | 1 + replay/replay.c | 1 + slirp/arp_table.c | 1 + slirp/bootp.c | 1 + slirp/cksum.c | 1 + slirp/dnssearch.c | 4 +--- slirp/if.c | 1 + slirp/ip_icmp.c | 1 + slirp/ip_input.c | 1 + slirp/ip_output.c | 1 + slirp/mbuf.c | 1 + slirp/misc.c | 1 + slirp/sbuf.c | 1 + slirp/slirp.c | 1 + slirp/socket.c | 1 + slirp/tcp_input.c | 1 + slirp/tcp_output.c | 1 + slirp/tcp_subr.c | 1 + slirp/tcp_timer.c | 1 + slirp/tftp.c | 1 + slirp/udp.c | 1 + spice-qemu-char.c | 3 +-- stubs/arch-query-cpu-def.c | 1 + stubs/bdrv-commit-all.c | 1 + stubs/clock-warp.c | 1 + stubs/cpu-get-clock.c | 1 + stubs/cpu-get-icount.c | 1 + stubs/cpus.c | 1 + stubs/dump.c | 1 + stubs/fd-register.c | 1 + stubs/fdset-add-fd.c | 1 + stubs/fdset-find-fd.c | 1 + stubs/fdset-get-fd.c | 1 + stubs/fdset-remove-fd.c | 1 + stubs/gdbstub.c | 1 + stubs/get-fd.c | 1 + stubs/get-next-serial.c | 1 + stubs/get-vm-name.c | 1 + stubs/iothread-lock.c | 1 + stubs/is-daemonized.c | 1 + stubs/kvm.c | 1 + stubs/machine-init-done.c | 1 + stubs/migr-blocker.c | 1 + stubs/mon-is-qmp.c | 1 + stubs/mon-printf.c | 1 + stubs/monitor-init.c | 1 + stubs/notify-event.c | 1 + stubs/qmp_pc_dimm_device_list.c | 1 + stubs/qtest.c | 1 + stubs/replay-user.c | 1 + stubs/replay.c | 2 +- stubs/reset.c | 1 + stubs/runstate-check.c | 1 + stubs/set-fd-handler.c | 1 + stubs/slirp.c | 1 + stubs/sysbus.c | 1 + stubs/target-get-monitor-def.c | 1 + stubs/target-monitor-defs.c | 1 + stubs/uuid.c | 1 + stubs/vhost.c | 1 + stubs/vm-stop.c | 1 + stubs/vmstate.c | 1 + tcg-runtime.c | 2 +- tci.c | 2 +- thread-pool.c | 2 +- thunk.c | 4 +--- tpm.c | 2 +- trace/control.c | 1 + trace/ftrace.c | 5 +---- trace/qmp.c | 1 + trace/simple.c | 6 +----- ui/console-gl.c | 1 + ui/console.c | 1 + ui/curses.c | 1 + ui/cursor.c | 1 + ui/egl-context.c | 1 + ui/egl-helpers.c | 9 +-------- ui/gtk-egl.c | 1 + ui/gtk-gl-area.c | 1 + ui/gtk.c | 1 + ui/input-keymap.c | 1 + ui/input-legacy.c | 2 +- ui/input.c | 1 + ui/keymaps.c | 1 + ui/qemu-pixman.c | 1 + ui/sdl.c | 1 + ui/sdl2-2d.c | 1 + ui/sdl2-gl.c | 1 + ui/sdl2-input.c | 1 + ui/sdl2.c | 1 + ui/sdl_zoom.c | 4 +--- ui/shader.c | 1 + ui/spice-core.c | 1 + ui/spice-display.c | 1 + ui/spice-input.c | 5 +---- ui/vnc-auth-sasl.c | 1 + ui/vnc-auth-vencrypt.c | 1 + ui/vnc-enc-hextile.c | 1 + ui/vnc-enc-tight.c | 3 +-- ui/vnc-enc-zlib.c | 1 + ui/vnc-enc-zrle-template.c | 2 +- ui/vnc-enc-zrle.c | 1 + ui/vnc-enc-zywrle-template.c | 1 + ui/vnc-jobs.c | 1 + ui/vnc-palette.c | 2 +- ui/vnc-ws.c | 1 + ui/vnc.c | 2 +- ui/x_keymap.c | 1 + user-exec.c | 3 +-- util/acl.c | 1 + util/base64.c | 1 + util/bitmap.c | 1 + util/bitops.c | 1 + util/buffer.c | 1 + util/compatfd.c | 1 + util/coroutine-gthread.c | 1 + util/coroutine-sigaltstack.c | 4 +--- util/coroutine-ucontext.c | 3 +-- util/coroutine-win32.c | 1 + util/crc32c.c | 1 + util/cutils.c | 3 +-- util/envlist.c | 1 + util/error.c | 2 +- util/event_notifier-posix.c | 1 + util/event_notifier-win32.c | 1 + util/fifo8.c | 1 + util/getauxval.c | 2 +- util/hbitmap.c | 4 +--- util/hexdump.c | 1 + util/host-utils.c | 3 +-- util/id.c | 1 + util/iov.c | 1 + util/mmap-alloc.c | 3 +-- util/module.c | 2 +- util/notify.c | 1 + util/osdep.c | 11 +---------- util/oslib-posix.c | 4 +--- util/oslib-win32.c | 3 +-- util/path.c | 7 +------ util/qemu-config.c | 2 +- util/qemu-coroutine-io.c | 1 + util/qemu-coroutine-lock.c | 1 + util/qemu-coroutine-sleep.c | 1 + util/qemu-coroutine.c | 1 + util/qemu-error.c | 2 +- util/qemu-openpty.c | 2 +- util/qemu-option.c | 4 +--- util/qemu-progress.c | 3 +-- util/qemu-sockets.c | 7 +------ util/qemu-thread-posix.c | 11 +---------- util/qemu-thread-win32.c | 3 +-- util/qemu-timer-common.c | 1 + util/rcu.c | 6 +----- util/readline.c | 1 + util/rfifolock.c | 2 +- util/throttle.c | 1 + util/timed-average.c | 2 +- util/unicode.c | 1 + util/uri.c | 3 +-- vl.c | 9 +-------- 307 files changed, 308 insertions(+), 308 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/15 ui: 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.
--- ui/console-gl.c | 1 + ui/console.c | 1 + ui/curses.c | 1 + ui/cursor.c | 1 + ui/egl-context.c | 1 + ui/egl-helpers.c | 9 +-------- ui/gtk-egl.c | 1 + ui/gtk-gl-area.c | 1 + ui/gtk.c | 1 + ui/input-keymap.c | 1 + ui/input-legacy.c | 2 +- ui/input.c | 1 + ui/keymaps.c | 1 + ui/qemu-pixman.c | 1 + ui/sdl.c | 1 + ui/sdl2-2d.c | 1 + ui/sdl2-gl.c | 1 + ui/sdl2-input.c | 1 + ui/sdl2.c | 1 + ui/sdl_zoom.c | 4 +--- ui/shader.c | 1 + ui/spice-core.c | 1 + ui/spice-display.c | 1 + ui/spice-input.c | 5 +---- ui/vnc-auth-sasl.c | 1 + ui/vnc-auth-vencrypt.c | 1 + ui/vnc-enc-hextile.c | 1 + ui/vnc-enc-tight.c | 3 +-- ui/vnc-enc-zlib.c | 1 + ui/vnc-enc-zrle-template.c | 2 +- ui/vnc-enc-zrle.c | 1 + ui/vnc-enc-zywrle-template.c | 1 + ui/vnc-jobs.c | 1 + ui/vnc-palette.c | 2 +- ui/vnc-ws.c | 1 + ui/vnc.c | 2 +- ui/x_keymap.c | 1 + 37 files changed, 37 insertions(+), 21 deletions(-)
ui/console-gl.c +1 -0
@@ -24,6 +24,7 @@* 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 "ui/console.h" #include "ui/shader.h"
ui/console.c +1 -0
@@ -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-common.h" #include "ui/console.h" #include "hw/qdev-core.h"
ui/curses.c +1 -0
@@ -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 <curses.h> #ifndef _WIN32
ui/cursor.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h"
ui/egl-context.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/egl-context.h"
ui/egl-helpers.c +1 -8
@@ -1,11 +1,4 @@ -#include <stdio.h> -#include <stdlib.h> -#include <stdint.h> -#include <stdbool.h> -#include <unistd.h> -#include <string.h> -#include <errno.h> -#include <fcntl.h> +#include "qemu/osdep.h" #include <glob.h> #include "ui/egl-helpers.h"
ui/gtk-egl.c +1 -0
@@ -11,6 +11,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "trace.h"
ui/gtk-gl-area.c +1 -0
@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "trace.h"
ui/gtk.c +1 -0
@@ -34,6 +34,7 @@#define GETTEXT_PACKAGE "qemu"#define LOCALEDIR "po" +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h"
ui/input-keymap.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "sysemu/sysemu.h" #include "ui/keymaps.h" #include "ui/input.h"
ui/input-legacy.c +1 -1
@@ -22,9 +22,9 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "sysemu/sysemu.h" #include "ui/console.h" -#include "qapi/error.h" #include "qmp-commands.h" #include "qapi-types.h" #include "ui/keymaps.h"
ui/input.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "hw/qdev.h" #include "sysemu/sysemu.h" #include "qapi-types.h"
ui/keymaps.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "keymaps.h" #include "sysemu/sysemu.h"
ui/qemu-pixman.c +1 -0
@@ -3,6 +3,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h"
ui/sdl.c +1 -0
@@ -25,6 +25,7 @@/* Avoid compiler warning because macro is redefined in SDL_syswm.h. */ #undef WIN32_LEAN_AND_MEAN +#include "qemu/osdep.h" #include <SDL.h> #include <SDL_syswm.h>
ui/sdl2-2d.c +1 -0
@@ -23,6 +23,7 @@*/ /* Ported SDL 1.2 code to 2.0 by Dave Airlie. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h" #include "ui/input.h"
ui/sdl2-gl.c +1 -0
@@ -25,6 +25,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h" #include "ui/input.h"
ui/sdl2-input.c +1 -0
@@ -23,6 +23,7 @@*/ /* Ported SDL 1.2 code to 2.0 by Dave Airlie. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h" #include "ui/input.h"
ui/sdl2.c +1 -0
@@ -23,6 +23,7 @@*/ /* Ported SDL 1.2 code to 2.0 by Dave Airlie. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h" #include "ui/input.h"
ui/sdl_zoom.c +1 -3
@@ -11,11 +11,9 @@* */ -#include "sdl_zoom.h" #include "qemu/osdep.h" +#include "sdl_zoom.h" #include <glib.h> -#include <stdint.h> -#include <stdio.h> static void sdl_zoom_rgb16 (SDL_Surface *src,SDL_Surface *dst,int smooth,SDL_Rect *dst_rect);
ui/shader.c +1 -0
@@ -24,6 +24,7 @@* 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 "ui/shader.h"
ui/spice-core.c +1 -0
@@ -15,6 +15,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include <spice.h> #include <netdb.h>
ui/spice-display.c +1 -0
@@ -15,6 +15,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/qemu-spice.h" #include "qemu/timer.h"
ui/spice-input.c +1 -4
@@ -15,10 +15,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> -#include <stdio.h> -#include <stdbool.h> -#include <string.h> +#include "qemu/osdep.h" #include <spice.h> #include <spice/enums.h>
ui/vnc-auth-sasl.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "vnc.h" /* Max amount of data we send/recv for SASL steps to prevent DOS */
ui/vnc-auth-vencrypt.c +1 -0
@@ -24,6 +24,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "vnc.h" #include "qemu/main-loop.h"
ui/vnc-enc-hextile.c +1 -0
@@ -24,6 +24,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "vnc.h" static void hextile_enc_cord (uint8_t *ptr,int x,int y,int w,int h)
ui/vnc-enc-tight.c +1 -2
@@ -26,7 +26,7 @@* THE SOFTWARE. */ -#include "config-host.h" +#include "qemu/osdep.h" /* This needs to be before jpeglib.h line because of conflict with INT32 definitions between jmorecfg.h (included by jpeglib.h) and
@@ -40,7 +40,6 @@#include <png.h> #endif #ifdef CONFIG_VNC_JPEG -#include <stdio.h> #include <jpeglib.h> #endif
ui/vnc-enc-zlib.c +1 -0
@@ -24,6 +24,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "vnc.h" #define ZALLOC_ALIGNMENT 16
ui/vnc-enc-zrle-template.c +1 -1
@@ -22,7 +22,7 @@*/ -#include <assert.h> +#include "qemu/osdep.h" #undef ZRLE_ENDIAN_SUFFIX
ui/vnc-enc-zrle.c +1 -0
@@ -26,6 +26,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "vnc.h" #include "vnc-enc-zrle.h"
ui/vnc-enc-zywrle-template.c +1 -0
@@ -100,6 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.#endif #define ZYWRLE_QUANTIZE +#include "qemu/osdep.h" #include "vnc-enc-zywrle.h" #ifndef ZRLE_COMPACT_PIXEL
ui/vnc-jobs.c +1 -0
@@ -26,6 +26,7 @@*/ +#include "qemu/osdep.h" #include "vnc.h" #include "vnc-jobs.h" #include "qemu/sockets.h"
ui/vnc-palette.c +1 -1
@@ -26,9 +26,9 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "vnc-palette.h" #include <glib.h> -#include <string.h> static VncPaletteEntry *palette_find (const VncPalette *palette,uint32_t color,unsigned int hash)
ui/vnc-ws.c +1 -0
@@ -18,6 +18,7 @@* along with this software; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "vnc.h" #include "io/channel-websock.h"
ui/vnc.c +1 -1
@@ -24,6 +24,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "vnc.h" #include "vnc-jobs.h" #include "trace.h"
@@ -37,7 +38,6 @@#include "qapi/qmp/qerror.h" #include "qapi/qmp/types.h" #include "qmp-commands.h" -#include "qemu/osdep.h" #include "ui/input.h" #include "qapi-event.h" #include "crypto/hash.h"
ui/x_keymap.c +1 -0
@@ -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-common.h" #include "x_keymap.h"
Signature · 1 line
1.9.1
PATCH 2/15 stubs: Clean up includes
In reply to Peter MaydellClean 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.
--- stubs/arch-query-cpu-def.c | 1 + stubs/bdrv-commit-all.c | 1 + stubs/clock-warp.c | 1 + stubs/cpu-get-clock.c | 1 + stubs/cpu-get-icount.c | 1 + stubs/cpus.c | 1 + stubs/dump.c | 1 + stubs/fd-register.c | 1 + stubs/fdset-add-fd.c | 1 + stubs/fdset-find-fd.c | 1 + stubs/fdset-get-fd.c | 1 + stubs/fdset-remove-fd.c | 1 + stubs/gdbstub.c | 1 + stubs/get-fd.c | 1 + stubs/get-next-serial.c | 1 + stubs/get-vm-name.c | 1 + stubs/iothread-lock.c | 1 + stubs/is-daemonized.c | 1 + stubs/kvm.c | 1 + stubs/machine-init-done.c | 1 + stubs/migr-blocker.c | 1 + stubs/mon-is-qmp.c | 1 + stubs/mon-printf.c | 1 + stubs/monitor-init.c | 1 + stubs/notify-event.c | 1 + stubs/qmp_pc_dimm_device_list.c | 1 + stubs/qtest.c | 1 + stubs/replay-user.c | 1 + stubs/replay.c | 2 +- stubs/reset.c | 1 + stubs/runstate-check.c | 1 + stubs/set-fd-handler.c | 1 + stubs/slirp.c | 1 + stubs/sysbus.c | 1 + stubs/target-get-monitor-def.c | 1 + stubs/target-monitor-defs.c | 1 + stubs/uuid.c | 1 + stubs/vhost.c | 1 + stubs/vm-stop.c | 1 + stubs/vmstate.c | 1 + 40 files changed, 40 insertions(+), 1 deletion(-)
stubs/arch-query-cpu-def.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/arch_init.h" #include "qapi/qmp/qerror.h"
stubs/bdrv-commit-all.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "block/block.h"
stubs/clock-warp.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h"
stubs/cpu-get-clock.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h"
stubs/cpu-get-icount.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h"
stubs/cpus.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qom/cpu.h"
stubs/dump.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/dump-arch.h" #include "qmp-commands.h"
stubs/fd-register.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h"
stubs/fdset-add-fd.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/fdset-find-fd.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/fdset-get-fd.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/fdset-remove-fd.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/gdbstub.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "stdbool.h" /* bool (in exec/gdbstub.h) */ #include "stddef.h" /* NULL */ #include "exec/gdbstub.h" /* xml_builtin */
stubs/get-fd.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/get-next-serial.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" CharDriverState *serial_hds[0 ];
stubs/get-vm-name.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" const char *qemu_get_vm_name (void )
stubs/iothread-lock.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h"
stubs/is-daemonized.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" /* Win32 has its own inline stub */
stubs/kvm.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/kvm.h"
stubs/machine-init-done.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/sysemu.h"
stubs/migr-blocker.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "migration/migration.h"
stubs/mon-is-qmp.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/mon-printf.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/monitor-init.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h"
stubs/notify-event.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h"
stubs/qmp_pc_dimm_device_list.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qom/object.h" #include "hw/mem/pc-dimm.h"
stubs/qtest.c +1 -0
@@ -8,6 +8,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "sysemu/qtest.h" /* Needed for qtest_allowed() */
stubs/replay-user.c +1 -0
@@ -9,6 +9,7 @@* */ +#include "qemu/osdep.h" #include "sysemu/replay.h" bool replay_exception (void )
stubs/replay.c +1 -1
@@ -1,5 +1,5 @@ +#include "qemu/osdep.h" #include "sysemu/replay.h" -#include <stdlib.h> #include "sysemu/sysemu.h" ReplayMode replay_mode;
stubs/reset.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "hw/hw.h" /* Stub functions for binaries that never call qemu_devices_reset(),
stubs/runstate-check.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "sysemu/sysemu.h" bool runstate_check (RunState state)
stubs/set-fd-handler.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h"
stubs/slirp.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "slirp/slirp.h"
stubs/sysbus.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "hw/qdev-core.h" BusState *sysbus_get_default (void )
stubs/target-get-monitor-def.c +1 -0
@@ -19,6 +19,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "stdint.h" typedef struct CPUState CPUState ;
stubs/target-monitor-defs.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "stddef.h" #include "qemu/typedefs.h"
stubs/uuid.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/sysemu.h" #include "qmp-commands.h"
stubs/vhost.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "hw/virtio/vhost.h" bool vhost_has_free_slot (void )
stubs/vm-stop.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/sysemu.h"
stubs/vmstate.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "migration/vmstate.h"
Signature · 1 line
1.9.1
PATCH 3/15 bsd-user: Clean up includes
In reply to Peter MaydellClean 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.
--- bsd-user/bsdload.c | 8 +------- bsd-user/elfload.c | 8 +------- bsd-user/main.c | 8 +------- bsd-user/mmap.c | 7 +------ bsd-user/signal.c | 7 +------ bsd-user/strace.c | 6 +----- bsd-user/syscall.c | 12 +----------- bsd-user/uaccess.c | 3 +-- 8 files changed, 8 insertions(+), 51 deletions(-)
bsd-user/bsdload.c +1 -7
@@ -1,12 +1,6 @@/* Code for loading BSD executables. Mostly linux kernel code. */ -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <errno.h> -#include <unistd.h> -#include <stdio.h> -#include <stdlib.h> +#include "qemu/osdep.h" #include "qemu.h"
bsd-user/elfload.c +1 -7
@@ -1,13 +1,7 @@/* This is the Linux kernel elf-loading code, ported into user space */ -#include <stdio.h> -#include <sys/types.h> -#include <fcntl.h> -#include <errno.h> -#include <unistd.h> +#include "qemu/osdep.h" #include <sys/mman.h> -#include <stdlib.h> -#include <string.h> #include "qemu.h" #include "disas/disas.h"
bsd-user/main.c +1 -7
@@ -16,14 +16,8 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> -#include <stdio.h> -#include <stdarg.h> -#include <string.h> -#include <errno.h> -#include <unistd.h> +#include "qemu/osdep.h" #include <machine/trap.h> -#include <sys/types.h> #include <sys/mman.h> #include "qemu.h"
bsd-user/mmap.c +1 -6
@@ -16,12 +16,7 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> -#include <stdio.h> -#include <stdarg.h> -#include <string.h> -#include <unistd.h> -#include <errno.h> +#include "qemu/osdep.h" #include <sys/mman.h> #include "qemu.h"
bsd-user/signal.c +1 -6
@@ -16,12 +16,7 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <stdarg.h> -#include <unistd.h> -#include <errno.h> +#include "qemu/osdep.h" #include "qemu.h" #include "target_signal.h"
bsd-user/strace.c +1 -5
@@ -16,14 +16,10 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdio.h> -#include <errno.h> +#include "qemu/osdep.h" #include <sys/select.h> -#include <sys/types.h> -#include <unistd.h> #include <sys/syscall.h> #include <sys/ioccom.h> -#include <ctype.h> #include "qemu.h"
bsd-user/syscall.c +1 -11
@@ -16,17 +16,7 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> -#include <stdio.h> -#include <stdint.h> -#include <stdarg.h> -#include <string.h> -#include <errno.h> -#include <unistd.h> -#include <fcntl.h> -#include <time.h> -#include <limits.h> -#include <sys/types.h> +#include "qemu/osdep.h" #include <sys/mman.h> #include <sys/syscall.h> #include <sys/param.h>
bsd-user/uaccess.c +1 -2
@@ -1,6 +1,5 @@/* User memory access */ -#include <stdio.h> -#include <string.h> +#include "qemu/osdep.h" #include "qemu.h"
Signature · 1 line
1.9.1
PATCH 4/15 backends: Clean up includes
In reply to Peter MaydellClean 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.
--- backends/baum.c | 1 + backends/hostmem-file.c | 1 + backends/hostmem-ram.c | 1 + backends/hostmem.c | 1 + backends/msmouse.c | 2 +- backends/rng-egd.c | 1 + backends/rng-random.c | 1 + backends/rng.c | 1 + backends/testdev.c | 1 + backends/tpm.c | 1 + 10 files changed, 10 insertions(+), 1 deletion(-)
backends/baum.c +1 -0
@@ -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-common.h" #include "sysemu/char.h" #include "qemu/timer.h"
backends/hostmem-file.c +1 -0
@@ -9,6 +9,7 @@* 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-common.h" #include "sysemu/hostmem.h" #include "sysemu/sysemu.h"
backends/hostmem-ram.c +1 -0
@@ -9,6 +9,7 @@* 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 "sysemu/hostmem.h" #include "qom/object_interfaces.h"
backends/hostmem.c +1 -0
@@ -9,6 +9,7 @@* 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 "sysemu/hostmem.h" #include "hw/boards.h" #include "qapi/visitor.h"
backends/msmouse.c +1 -1
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <stdlib.h> +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/char.h" #include "ui/console.h"
backends/rng-egd.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "sysemu/rng.h" #include "sysemu/char.h" #include "qapi/qmp/qerror.h"
backends/rng-random.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "sysemu/rng-random.h" #include "sysemu/rng.h" #include "qapi/qmp/qerror.h"
backends/rng.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "sysemu/rng.h" #include "qapi/qmp/qerror.h" #include "qom/object_interfaces.h"
backends/testdev.c +1 -0
@@ -23,6 +23,7 @@* 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 "sysemu/char.h"
backends/tpm.c +1 -0
@@ -12,6 +12,7 @@* Based on backends/rng.c by Anthony Liguori */ +#include "qemu/osdep.h" #include "sysemu/tpm_backend.h" #include "qapi/qmp/qerror.h" #include "sysemu/tpm.h"
Signature · 1 line
1.9.1
PATCH 5/15 util: Clean up includes
In reply to Peter MaydellClean 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.
--- util/acl.c | 1 + util/base64.c | 1 + util/bitmap.c | 1 + util/bitops.c | 1 + util/buffer.c | 1 + util/compatfd.c | 1 + util/coroutine-gthread.c | 1 + util/coroutine-sigaltstack.c | 4 +--- util/coroutine-ucontext.c | 3 +-- util/coroutine-win32.c | 1 + util/crc32c.c | 1 + util/cutils.c | 3 +-- util/envlist.c | 1 + util/error.c | 2 +- util/event_notifier-posix.c | 1 + util/event_notifier-win32.c | 1 + util/fifo8.c | 1 + util/getauxval.c | 2 +- util/hbitmap.c | 4 +--- util/hexdump.c | 1 + util/host-utils.c | 3 +-- util/id.c | 1 + util/iov.c | 1 + util/mmap-alloc.c | 3 +-- util/module.c | 2 +- util/notify.c | 1 + util/osdep.c | 11 +---------- util/oslib-posix.c | 4 +--- util/oslib-win32.c | 3 +-- util/path.c | 7 +------ util/qemu-config.c | 2 +- util/qemu-coroutine-io.c | 1 + util/qemu-coroutine-lock.c | 1 + util/qemu-coroutine-sleep.c | 1 + util/qemu-coroutine.c | 1 + util/qemu-error.c | 2 +- util/qemu-openpty.c | 2 +- util/qemu-option.c | 4 +--- util/qemu-progress.c | 3 +-- util/qemu-sockets.c | 7 +------ util/qemu-thread-posix.c | 11 +---------- util/qemu-thread-win32.c | 3 +-- util/qemu-timer-common.c | 1 + util/rcu.c | 6 +----- util/readline.c | 1 + util/rfifolock.c | 2 +- util/throttle.c | 1 + util/timed-average.c | 2 +- util/unicode.c | 1 + util/uri.c | 3 +-- 50 files changed, 50 insertions(+), 73 deletions(-)
util/acl.c +1 -0
@@ -23,6 +23,7 @@*/ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/acl.h"
util/base64.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include <config-host.h> #include "qemu/base64.h"
util/bitmap.c +1 -0
@@ -9,6 +9,7 @@* Version 2. */ +#include "qemu/osdep.h" #include "qemu/bitops.h" #include "qemu/bitmap.h" #include "qemu/atomic.h"
util/bitops.c +1 -0
@@ -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)
util/buffer.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "qemu/buffer.h" #include "trace.h"
util/compatfd.c +1 -0
@@ -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/compatfd.h" #include "qemu/thread.h"
util/coroutine-gthread.c +1 -0
@@ -18,6 +18,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include <glib.h> #include "qemu-common.h" #include "qemu/coroutine_int.h"
util/coroutine-sigaltstack.c +1 -3
@@ -25,11 +25,9 @@#ifdef _FORTIFY_SOURCE#undef _FORTIFY_SOURCE#endif -#include <stdlib.h> +#include "qemu/osdep.h" #include <setjmp.h> -#include <stdint.h> #include <pthread.h> -#include <signal.h> #include "qemu-common.h" #include "qemu/coroutine_int.h"
util/coroutine-ucontext.c +1 -2
@@ -22,9 +22,8 @@#ifdef _FORTIFY_SOURCE#undef _FORTIFY_SOURCE#endif -#include <stdlib.h> +#include "qemu/osdep.h" #include <setjmp.h> -#include <stdint.h> #include <ucontext.h> #include "qemu-common.h" #include "qemu/coroutine_int.h"
util/coroutine-win32.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/coroutine_int.h"
util/crc32c.c +1 -0
@@ -25,6 +25,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/crc32c.h"
util/cutils.c +1 -2
@@ -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> #include "qemu/sockets.h" #include "qemu/iov.h"
util/envlist.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/queue.h" #include "qemu/envlist.h"
util/error.c +1 -1
@@ -12,8 +12,8 @@* the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" -#include "qapi/error.h" #include "qemu/error-report.h" struct Error
util/event_notifier-posix.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/event_notifier.h" #include "sysemu/char.h"
util/event_notifier-win32.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/event_notifier.h" #include "qemu/main-loop.h"
util/fifo8.c +1 -0
@@ -12,6 +12,7 @@* with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/fifo8.h"
util/getauxval.c +1 -1
@@ -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
util/hbitmap.c +1 -3
@@ -9,10 +9,8 @@* later. See the COPYING file in the top-level directory. */ -#include <string.h> -#include <glib.h> -#include <assert.h> #include "qemu/osdep.h" +#include <glib.h> #include "qemu/hbitmap.h" #include "qemu/host-utils.h" #include "trace.h"
util/hexdump.c +1 -0
@@ -13,6 +13,7 @@* GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "qemu-common.h" void qemu_hexdump (const char *buf,FILE *fp,const char *prefix,size_t size)
util/host-utils.c +1 -2
@@ -23,8 +23,7 @@* THE SOFTWARE. */ -#include <stdlib.h> -#include <stdint.h> +#include "qemu/osdep.h" #include "qemu/host-utils.h" /* Long integer helpers */
util/id.c +1 -0
@@ -10,6 +10,7 @@* or later. See the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" bool id_wellformed (const char *id)
util/iov.c +1 -0
@@ -16,6 +16,7 @@* GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "qemu/iov.h" #include "qemu/sockets.h"
util/mmap-alloc.c +1 -2
@@ -9,10 +9,9 @@* 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> #define HUGETLBFS_MAGIC 0x958458f6
util/module.c +1 -1
@@ -13,7 +13,7 @@* GNU GPL, version 2 or (at your option) any later version. */ -#include <stdlib.h> +#include "qemu/osdep.h" #include "qemu-common.h" #ifdef CONFIG_MODULES #include <gmodule.h>
util/notify.c +1 -0
@@ -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/notify.h"
util/osdep.c +1 -10
@@ -21,24 +21,15 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <stdlib.h> -#include <stdio.h> -#include <stdarg.h> -#include <stdbool.h> -#include <string.h> -#include <errno.h> -#include <unistd.h> -#include <fcntl.h> +#include "qemu/osdep.h" /* Needed early for CONFIG_BSD etc. */ -#include "config-host.h" #if defined(CONFIG_MADVISE ) || defined(CONFIG_POSIX_MADVISE )#include <sys/mman.h> #endif #ifdef CONFIG_SOLARIS -#include <sys/types.h> #include <sys/statvfs.h> /* See MySQL bug #7156 (http://bugs.mysql.com/bug.php?id=7156) for discussion about Solaris header problems */
util/oslib-posix.c +1 -3
@@ -30,7 +30,6 @@compiler does not see the warning associated with it in stdlib.h on OSX */ #ifdef __APPLE__#define daemon qemu_fake_daemon_function -#include <stdlib.h> #undef daemonextern int daemon (int ,int );#endif
@@ -47,13 +46,12 @@ extern int daemon(int, int);# define QEMU_VMALLOC_ALIGN getpagesize()#endif +#include "qemu/osdep.h" #include <termios.h> -#include <unistd.h> #include <termios.h> #include <glib/gprintf.h> -#include "config-host.h" #include "sysemu/sysemu.h" #include "trace.h" #include "qemu/sockets.h"
util/oslib-win32.c +1 -2
@@ -29,10 +29,9 @@* this file are based on code from GNOME glib-2 and use a different license, * see the license comment there. */ +#include "qemu/osdep.h" #include <windows.h> #include <glib.h> -#include <stdlib.h> -#include "config-host.h" #include "sysemu/sysemu.h" #include "qemu/main-loop.h" #include "trace.h"
util/path.c +1 -6
@@ -3,14 +3,9 @@The assumption is that this area does not change. */ -#include <sys/types.h> +#include "qemu/osdep.h" #include <sys/param.h> #include <dirent.h> -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <stdio.h> #include "qemu-common.h" struct pathelem
util/qemu-config.c +1 -1
@@ -1,8 +1,8 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/error-report.h" #include "qemu/option.h" #include "qemu/config-file.h" -#include "qapi/error.h" #include "qmp-commands.h" static QemuOptsList *vm_config_groups[48 ];
util/qemu-coroutine-io.c +1 -0
@@ -22,6 +22,7 @@* 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/sockets.h" #include "qemu/coroutine.h"
util/qemu-coroutine-lock.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/coroutine.h" #include "qemu/coroutine_int.h"
util/qemu-coroutine-sleep.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qemu/coroutine.h" #include "qemu/timer.h" #include "block/aio.h"
util/qemu-coroutine.c +1 -0
@@ -12,6 +12,7 @@* */ +#include "qemu/osdep.h" #include "trace.h" #include "qemu-common.h" #include "qemu/thread.h"
util/qemu-error.c +1 -1
@@ -10,7 +10,7 @@* See the COPYING file in the top-level directory. */ -#include <stdio.h> +#include "qemu/osdep.h" #include "monitor/monitor.h" #include "qemu/error-report.h"
util/qemu-openpty.c +1 -1
@@ -32,7 +32,7 @@* linked with -lutil. */ -#include "config-host.h" +#include "qemu/osdep.h" #include "qemu-common.h" #if defined(__GLIBC__)
util/qemu-option.c +1 -3
@@ -23,13 +23,11 @@* THE SOFTWARE. */ -#include <stdio.h> -#include <string.h> +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/error-report.h" #include "qapi/qmp/types.h" -#include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "qemu/option_int.h"
util/qemu-progress.c +1 -2
@@ -22,9 +22,8 @@* THE SOFTWARE. */ -#include "qemu-common.h" #include "qemu/osdep.h" -#include <stdio.h> +#include "qemu-common.h" struct progress_state {float current;
util/qemu-sockets.c +1 -6
@@ -15,12 +15,7 @@* Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> -#include <unistd.h> +#include "qemu/osdep.h" #include "monitor/monitor.h" #include "qemu/sockets.h"
util/qemu-thread-posix.c +1 -10
@@ -10,16 +10,7 @@* 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 <stdint.h> -#include <string.h> -#include <limits.h> -#include <unistd.h> -#include <sys/time.h> +#include "qemu/osdep.h" #ifdef __linux__#include <sys/syscall.h> #include <linux/futex.h>
util/qemu-thread-win32.c +1 -2
@@ -10,12 +10,11 @@* See the COPYING file in the top-level directory. * */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/thread.h" #include "qemu/notify.h" #include <process.h> -#include <assert.h> -#include <limits.h> static bool name_threads;
util/qemu-timer-common.c +1 -0
@@ -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" /***********************************************************/
util/rcu.c +1 -5
@@ -26,12 +26,8 @@* IBM's contributions to this file may be relicensed under LGPLv2 or later. */ +#include "qemu/osdep.h" #include "qemu-common.h" -#include <stdio.h> -#include <assert.h> -#include <stdlib.h> -#include <stdint.h> -#include <errno.h> #include "qemu/rcu.h" #include "qemu/atomic.h" #include "qemu/thread.h"
util/readline.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/readline.h"
util/rfifolock.c +1 -1
@@ -11,7 +11,7 @@* */ -#include <assert.h> +#include "qemu/osdep.h" #include "qemu/rfifolock.h" void rfifolock_init (RFifoLock *r,void (*cb)(void *),void *opaque)
util/throttle.c +1 -0
@@ -22,6 +22,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu/throttle.h" #include "qemu/timer.h" #include "block/aio.h"
util/timed-average.c +1 -1
@@ -22,7 +22,7 @@* along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <string.h> +#include "qemu/osdep.h" #include "qemu/timed-average.h"
util/unicode.c +1 -0
@@ -10,6 +10,7 @@* later. See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" /**
util/uri.c +1 -2
@@ -51,9 +51,8 @@* */ +#include "qemu/osdep.h" #include <glib.h> -#include <string.h> -#include <stdio.h> #include "qemu/uri.h"
Signature · 1 line
1.9.1
Re: [Qemu-devel] [PATCH 05/15] util: Clean up includes
Quoted 23 lines · Peter Maydell
Clean up includes so that
osdep.his included first and headers which it implies are not included manually.This commit was created with
scripts/clean-includes.Signed-off-by Peter Maydell <[email protected]>util/oslib-posix.c +1
-1@@ -30,7 +30,6 @@compiler does not see the warning associated with it in stdlib.h on OSX */ #ifdef __APPLE__#define daemon qemu_fake_daemon_function -#include <stdlib.h> #undef daemonextern int daemon (int ,int );#endif @@ -47,13 +46,12 @@ extern int daemon(int, int);# define QEMU_VMALLOC_ALIGN getpagesize()#endif +#include "qemu/osdep.h"
util/oslib-posix.c extern int daemon(int, int); · line 57
Quoted 10 lines
util/oslib-posix.c +0
-2#include <termios.h> -#include <unistd.h> #include <termios.h> #include <glib/gprintf.h> -#include "config-host.h" #include "sysemu/sysemu.h" #include "trace.h" #include "qemu/sockets.h"
This bit isn't quite right, because it breaks the "suppress the OSX warning about daemon()". I'm going to drop this hunk but otherwise apply.
thanks
-- PMM
PATCH 6/15 disas: Clean up includes
In reply to Peter MaydellClean 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.
--- disas/hppa.c | 1 + disas/i386.c | 2 +- disas/ia64.c | 3 +-- disas/m68k.c | 3 +-- disas/s390.c | 1 + disas/sparc.c | 2 +- disas/tci.c | 1 + 7 files changed, 7 insertions(+), 6 deletions(-)
disas/hppa.c +1 -0
@@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "disas/bfd.h" /* HP PA-RISC SOM object file format: definitions internal to BFD.
disas/i386.c +1 -1
@@ -31,7 +31,7 @@and the small letter tells about the operand size. Refer to the Intel manual for details. */ -#include <stdlib.h> +#include "qemu/osdep.h" #include "disas/bfd.h" /* include/opcode/i386.h r1.78 */
disas/ia64.c +1 -2
@@ -18,7 +18,7 @@ along with this file; see the file COPYING. If not, see <http://www.gnu.org/licenses/>. */ -#include <string.h> +#include "qemu/osdep.h" #include "disas/bfd.h"
@@ -27,7 +27,6 @@Free Software Foundation, Inc. Contributed by David Mosberger-Tang <[email protected]> */ -#include <sys/types.h> typedef uint64_t ia64_insn ;
disas/m68k.c +1 -2
@@ -1,9 +1,8 @@/* This file is composed of several different files from the upstream sourceware.org CVS. Original file boundaries marked with **** */ -#include <string.h> +#include "qemu/osdep.h" #include <math.h> -#include <stdio.h> #include "disas/bfd.h"
disas/s390.c +1 -0
@@ -20,6 +20,7 @@Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "disas/bfd.h"
disas/sparc.c +1 -1
@@ -26,7 +26,7 @@ along with GAS or GDB; see the file COPYING. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> +#include "qemu/osdep.h" #include "disas/bfd.h" /* The SPARC opcode table (and other related data) is defined in
disas/tci.c +1 -0
@@ -17,6 +17,7 @@* along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "disas/bfd.h" #include "tcg/tcg.h"
Signature · 1 line
1.9.1
PATCH 7/15 qapi: Clean up includes
In reply to Peter MaydellClean 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.
--- qapi/opts-visitor.c | 1 + qapi/qapi-dealloc-visitor.c | 1 + qapi/qapi-util.c | 2 +- qapi/qapi-visit-core.c | 1 + qapi/qmp-dispatch.c | 2 +- qapi/qmp-event.c | 2 +- qapi/qmp-input-visitor.c | 1 + qapi/qmp-output-visitor.c | 1 + qapi/qmp-registry.c | 2 +- qapi/string-input-visitor.c | 1 + qapi/string-output-visitor.c | 1 + 11 files changed, 11 insertions(+), 4 deletions(-)
qapi/opts-visitor.c +1 -0
@@ -10,6 +10,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/qerror.h" #include "qapi/opts-visitor.h"
qapi/qapi-dealloc-visitor.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qapi/dealloc-visitor.h" #include "qemu/queue.h" #include "qemu-common.h"
qapi/qapi-util.c +1 -1
@@ -10,8 +10,8 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" -#include "qapi/error.h" #include "qapi/util.h" int qapi_enum_parse(const char * const lookup[], const char *buf,
qapi/qapi-visit-core.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/qobject.h" #include "qapi/qmp/qerror.h"
qapi/qmp-dispatch.c +1 -1
@@ -11,11 +11,11 @@* */ +#include "qemu/osdep.h" #include "qapi/qmp/types.h" #include "qapi/qmp/dispatch.h" #include "qapi/qmp/json-parser.h" #include "qapi-types.h" -#include "qapi/error.h" #include "qapi/qmp/qerror.h" static QDict *qmp_dispatch_check_obj (const QObject *request,Error **errp)
qapi/qmp-event.c +1 -1
@@ -11,7 +11,7 @@* */ -#include <inttypes.h> +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp-event.h"
qapi/qmp-input-visitor.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qapi/qmp-input-visitor.h" #include "qapi/visitor-impl.h" #include "qemu/queue.h"
qapi/qmp-output-visitor.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qapi/qmp-output-visitor.h" #include "qapi/visitor-impl.h" #include "qemu/queue.h"
qapi/qmp-registry.c +1 -1
@@ -12,8 +12,8 @@* */ +#include "qemu/osdep.h" #include <glib.h> -#include <string.h> #include "qapi/qmp/dispatch.h" static QTAILQ_HEAD(QmpCommandList, QmpCommand) qmp_commands =
qapi/string-input-visitor.c +1 -0
@@ -10,6 +10,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/string-input-visitor.h" #include "qapi/visitor-impl.h"
qapi/string-output-visitor.c +1 -0
@@ -10,6 +10,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/string-output-visitor.h" #include "qapi/visitor-impl.h"
Signature · 1 line
1.9.1
Re: [Qemu-devel] [PATCH 07/15] qapi: Clean up includes
Quoted 6 lines · Peter Maydell
Clean up includes so that
osdep.his included first and headers which it implies are not included manually.This commit was created with
scripts/clean-includes.Signed-off-by Peter Maydell <[email protected]>
Quoted 13 lines
--- qapi/opts-visitor.c | 1 + qapi/qapi-dealloc-visitor.c | 1 + qapi/qapi-util.c | 2 +- qapi/qapi-visit-core.c | 1 + qapi/qmp-dispatch.c | 2 +- qapi/qmp-event.c | 2 +- qapi/qmp-input-visitor.c | 1 + qapi/qmp-output-visitor.c | 1 + qapi/qmp-registry.c | 2 +- qapi/string-input-visitor.c | 1 + qapi/string-output-visitor.c | 1 + 11 files changed, 11 insertions(+), 4 deletions(-)
Hmm - we also have generated qapi files, where the scripts/qapi*.py files will need to output correct header information. I'll take a look at doing that.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [PATCH 07/15] qapi: Clean up includes
Quoted 3 lines · Eric Blake
Hmm - we also have generated qapi files, where the
scripts/qapi*.pyfiles will need to output correct header information. I'll take a look at doing that.
Hi Eric; did you get time to look at updating these scripts? I started working on the "remove unnecessary #includes from .h files" part of this cleanup, but at the moment that causes all the generated qapi .c files to fail to build because they don't include osdep.h yet.
thanks
-- PMM
Re: [Qemu-devel] [PATCH 07/15] qapi: Clean up includes
Quoted 9 lines · Peter Maydell
Quoted 3 lines · Eric Blake
Hmm - we also have generated qapi files, where the
scripts/qapi*.pyfiles will need to output correct header information. I'll take a look at doing that.Hi Eric; did you get time to look at updating these scripts? I started working on the "remove unnecessary #includes from .h files" part of this cleanup, but at the moment that causes all the generated qapi .c files to fail to build because they don't include
osdep.hyet.
Sent now, but I based it on Markus' qapi-next tree. I didn't test if it would apply directly to master.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH 8/15 qga: Clean up includes
In reply to Peter MaydellClean 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.
--- qga/channel-posix.c | 7 +------ qga/channel-win32.c | 5 +---- qga/commands-posix.c | 9 +-------- qga/commands-win32.c | 3 +-- qga/commands.c | 1 + qga/guest-agent-command-state.c | 1 + qga/main.c | 5 +---- qga/service-win32.c | 3 +-- qga/vss-win32.c | 2 +- 9 files changed, 9 insertions(+), 27 deletions(-)
qga/channel-posix.c +1 -6
@@ -1,11 +1,6 @@ +#include "qemu/osdep.h" #include <glib.h> #include <termios.h> -#include <errno.h> -#include <unistd.h> -#include <fcntl.h> -#include <stdlib.h> -#include <string.h> -#include "qemu/osdep.h" #include "qemu/sockets.h" #include "qga/channel.h"
qga/channel-win32.c +1 -4
@@ -1,9 +1,6 @@ -#include <stdlib.h> -#include <stdio.h> -#include <stdbool.h> +#include "qemu/osdep.h" #include <glib.h> #include <windows.h> -#include <errno.h> #include <io.h> #include "qga/guest-agent-core.h" #include "qga/channel.h"
qga/commands-posix.c +1 -8
@@ -11,18 +11,11 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include <glib.h> -#include <sys/types.h> #include <sys/ioctl.h> #include <sys/wait.h> -#include <unistd.h> -#include <errno.h> -#include <fcntl.h> #include <dirent.h> -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> -#include <inttypes.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" #include "qapi/qmp/qerror.h"
qga/commands-win32.c +1 -2
@@ -11,11 +11,10 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include <glib.h> #include <wtypes.h> #include <powrprof.h> -#include <stdio.h> -#include <string.h> #include <winsock2.h> #include <ws2tcpip.h> #include <iptypes.h>
qga/commands.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include <glib.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h"
qga/guest-agent-command-state.c +1 -0
@@ -9,6 +9,7 @@* 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 <glib.h> #include "qga/guest-agent-core.h"
qga/main.c +1 -4
@@ -10,16 +10,13 @@* 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 <stdlib.h> -#include <stdio.h> -#include <stdbool.h> +#include "qemu/osdep.h" #include <glib.h> #include <getopt.h> #include <glib/gstdio.h> #ifndef _WIN32#include <syslog.h> #include <sys/wait.h> -#include <sys/stat.h> #endif #include "qapi/qmp/json-streamer.h" #include "qapi/qmp/json-parser.h"
qga/service-win32.c +1 -2
@@ -10,8 +10,7 @@* 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 <stdlib.h> -#include <stdio.h> +#include "qemu/osdep.h" #include <glib.h> #include <windows.h> #include "qga/service-win32.h"
qga/vss-win32.c +1 -1
@@ -10,7 +10,7 @@* See the COPYING file in the top-level directory. */ -#include <stdio.h> +#include "qemu/osdep.h" #include <windows.h> #include "qga/guest-agent-core.h" #include "qga/vss-win32.h"
Signature · 1 line
1.9.1
PATCH 9/15 slirp: Clean up includes
In reply to Peter MaydellClean 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.
--- slirp/arp_table.c | 1 + slirp/bootp.c | 1 + slirp/cksum.c | 1 + slirp/dnssearch.c | 4 +--- slirp/if.c | 1 + slirp/ip_icmp.c | 1 + slirp/ip_input.c | 1 + slirp/ip_output.c | 1 + slirp/mbuf.c | 1 + slirp/misc.c | 1 + slirp/sbuf.c | 1 + slirp/slirp.c | 1 + slirp/socket.c | 1 + slirp/tcp_input.c | 1 + slirp/tcp_output.c | 1 + slirp/tcp_subr.c | 1 + slirp/tcp_timer.c | 1 + slirp/tftp.c | 1 + slirp/udp.c | 1 + 19 files changed, 19 insertions(+), 3 deletions(-)
slirp/arp_table.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "slirp.h" void arp_table_add (Slirp *slirp,uint32_t ip_addr,uint8_t ethaddr[ETH_ALEN ])
slirp/bootp.c +1 -0
@@ -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 <slirp.h> #if defined(_WIN32)
slirp/cksum.c +1 -0
@@ -30,6 +30,7 @@* in_cksum.c,v 1.2 1994/08/02 07:48:16 davidg Exp */ +#include "qemu/osdep.h" #include <slirp.h> /*
slirp/dnssearch.c +1 -3
@@ -22,9 +22,7 @@* THE SOFTWARE. */ -#include <stdlib.h> -#include <string.h> -#include <stdio.h> +#include "qemu/osdep.h" #include <glib.h> #include "slirp.h"
slirp/if.c +1 -0
@@ -5,6 +5,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> #include "qemu/timer.h"
slirp/ip_icmp.c +1 -0
@@ -30,6 +30,7 @@* ip_icmp.c,v 1.7 1995/05/30 08:09:42 rgrimes Exp */ +#include "qemu/osdep.h" #include "slirp.h" #include "ip_icmp.h"
slirp/ip_input.c +1 -0
@@ -38,6 +38,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> #include <qemu/osdep.h> #include "ip_icmp.h"
slirp/ip_output.c +1 -0
@@ -38,6 +38,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> /* Number of packets queued before we start sending
slirp/mbuf.c +1 -0
@@ -15,6 +15,7 @@* the flags */ +#include "qemu/osdep.h" #include <slirp.h> #define MBUF_THRESH 30
slirp/misc.c +1 -0
@@ -5,6 +5,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> #include <libslirp.h>
slirp/sbuf.c +1 -0
@@ -5,6 +5,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> #include <qemu/main-loop.h>
slirp/slirp.c +1 -0
@@ -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-common.h" #include "qemu/timer.h" #include "sysemu/char.h"
slirp/socket.c +1 -0
@@ -5,6 +5,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include <slirp.h> #include "ip_icmp.h"
slirp/tcp_input.c +1 -0
@@ -38,6 +38,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> #include "ip_icmp.h"
slirp/tcp_output.c +1 -0
@@ -38,6 +38,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> static const u_char tcp_outflags[TCP_NSTATES ] = {
slirp/tcp_subr.c +1 -0
@@ -38,6 +38,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> /* patchable/settable parameters for tcp */
slirp/tcp_timer.c +1 -0
@@ -30,6 +30,7 @@* tcp_timer.c,v 1.2 1994/08/02 07:49:10 davidg Exp */ +#include "qemu/osdep.h" #include <slirp.h> static struct tcpcb *tcp_timers (registerstruct tcpcb *tp,int timer);
slirp/tftp.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include <slirp.h> #include "qemu-common.h"
slirp/udp.c +1 -0
@@ -38,6 +38,7 @@* terms and conditions of the copyright. */ +#include "qemu/osdep.h" #include <slirp.h> #include "ip_icmp.h"
Signature · 1 line
1.9.1
PATCH 10/15 net: Clean up includes
In reply to Peter MaydellClean 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.
--- net/checksum.c | 1 + net/dump.c | 1 + net/eth.c | 1 + net/filter-buffer.c | 1 + net/filter.c | 1 + net/hub.c | 1 + net/l2tpv3.c | 2 +- net/net.c | 2 +- net/netmap.c | 3 +-- net/queue.c | 1 + net/slirp.c | 2 +- net/socket.c | 2 +- net/tap-aix.c | 2 +- net/tap-bsd.c | 1 + net/tap-haiku.c | 2 +- net/tap-linux.c | 1 + net/tap-solaris.c | 2 +- net/tap-win32.c | 2 +- net/tap.c | 3 +-- net/util.c | 3 +-- net/vde.c | 2 +- net/vhost-user.c | 1 + 22 files changed, 22 insertions(+), 15 deletions(-)
net/checksum.c +1 -0
@@ -15,6 +15,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "net/checksum.h"
net/dump.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "clients.h" #include "qemu-common.h" #include "qemu/error-report.h"
net/eth.c +1 -0
@@ -15,6 +15,7 @@* */ +#include "qemu/osdep.h" #include "net/eth.h" #include "net/checksum.h" #include "qemu-common.h"
net/filter-buffer.c +1 -0
@@ -6,6 +6,7 @@* later. See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "net/filter.h" #include "net/queue.h" #include "qemu-common.h"
net/filter.c +1 -0
@@ -6,6 +6,7 @@* later. See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/qerror.h" #include "qemu/error-report.h"
net/hub.c +1 -0
@@ -12,6 +12,7 @@* */ +#include "qemu/osdep.h" #include "monitor/monitor.h" #include "net/net.h" #include "clients.h"
net/l2tpv3.c +1 -1
@@ -23,9 +23,9 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include <linux/ip.h> #include <netdb.h> -#include "config-host.h" #include "net/net.h" #include "clients.h" #include "qemu-common.h"
net/net.c +1 -1
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "config-host.h" +#include "qemu/osdep.h" #include "net/net.h" #include "clients.h"
net/netmap.c +1 -2
@@ -23,11 +23,10 @@*/ +#include "qemu/osdep.h" #include <sys/ioctl.h> #include <net/if.h> #include <sys/mman.h> -#include <stdint.h> -#include <stdio.h> #define NETMAP_WITH_LIBS #include <net/netmap.h> #include <net/netmap_user.h>
net/queue.c +1 -0
@@ -21,6 +21,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "net/queue.h" #include "qemu/queue.h" #include "net/net.h"
net/slirp.c +1 -1
@@ -21,9 +21,9 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#include "qemu/osdep.h" #include "net/slirp.h" -#include "config-host.h" #ifndef _WIN32#include <pwd.h>
net/socket.c +1 -1
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "config-host.h" +#include "qemu/osdep.h" #include "net/net.h" #include "clients.h"
net/tap-aix.c +1 -1
@@ -22,8 +22,8 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "tap_int.h" -#include <stdio.h> int tap_open (char *ifname,int ifname_size,int *vnet_hdr,int vnet_hdr_required,int mq_required,Error **errp)
net/tap-bsd.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "tap_int.h" #include "qemu-common.h" #include "sysemu/sysemu.h"
net/tap-haiku.c +1 -1
@@ -22,8 +22,8 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "tap_int.h" -#include <stdio.h> int tap_open (char *ifname,int ifname_size,int *vnet_hdr,int vnet_hdr_required,int mq_required,Error **errp)
net/tap-linux.c +1 -0
@@ -23,6 +23,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "tap_int.h" #include "tap-linux.h" #include "net/tap.h"
net/tap-solaris.c +1 -1
@@ -22,10 +22,10 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "tap_int.h" #include "sysemu/sysemu.h" -#include <sys/stat.h> #include <sys/ethernet.h> #include <sys/sockio.h> #include <netinet/arp.h>
net/tap-win32.c +1 -1
@@ -26,6 +26,7 @@* distribution); if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "tap_int.h" #include "qemu-common.h"
@@ -34,7 +35,6 @@#include "net/tap.h" /* tap_has_ufo, ... */ #include "sysemu/sysemu.h" #include "qemu/error-report.h" -#include <stdio.h> #include <windows.h> #include <winioctl.h>
net/tap.c +1 -2
@@ -23,12 +23,11 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "tap_int.h" -#include "config-host.h" #include <sys/ioctl.h> -#include <sys/stat.h> #include <sys/wait.h> #include <sys/socket.h> #include <net/if.h>
net/util.c +1 -2
@@ -22,9 +22,8 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "util.h" -#include <errno.h> -#include <stdlib.h> int net_parse_macaddr (uint8_t *macaddr,const char *p) {
net/vde.c +1 -1
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "config-host.h" +#include "qemu/osdep.h" #include <libvdeplug.h>
net/vhost-user.c +1 -0
@@ -8,6 +8,7 @@* */ +#include "qemu/osdep.h" #include "clients.h" #include "net/vhost_net.h" #include "net/vhost-user.h"
Signature · 1 line
1.9.1
PATCH 11/15 qobject: Clean up includes
In reply to Peter MaydellClean 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.
--- qobject/json-lexer.c | 2 +- qobject/json-parser.c | 2 +- qobject/json-streamer.c | 1 + qobject/qbool.c | 1 + qobject/qdict.c | 1 + qobject/qfloat.c | 1 + qobject/qint.c | 1 + qobject/qjson.c | 1 + qobject/qlist.c | 1 + qobject/qnull.c | 1 + qobject/qobject.c | 1 + qobject/qstring.c | 1 + 12 files changed, 12 insertions(+), 2 deletions(-)
qobject/json-lexer.c +1 -1
@@ -11,9 +11,9 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/json-lexer.h" -#include <stdint.h> #define MAX_TOKEN_SIZE (64ULL << 20)
qobject/json-parser.c +1 -1
@@ -11,7 +11,7 @@* */ -#include <stdarg.h> +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/qstring.h"
qobject/json-streamer.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/json-lexer.h" #include "qapi/qmp/json-streamer.h"
qobject/qbool.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qapi/qmp/qbool.h" #include "qapi/qmp/qobject.h" #include "qemu-common.h"
qobject/qdict.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qapi/qmp/qint.h" #include "qapi/qmp/qfloat.h" #include "qapi/qmp/qdict.h"
qobject/qfloat.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qapi/qmp/qfloat.h" #include "qapi/qmp/qobject.h" #include "qemu-common.h"
qobject/qint.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qapi/qmp/qint.h" #include "qapi/qmp/qobject.h" #include "qemu-common.h"
qobject/qjson.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qapi/qmp/json-lexer.h" #include "qapi/qmp/json-parser.h" #include "qapi/qmp/json-streamer.h"
qobject/qlist.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qapi/qmp/qlist.h" #include "qapi/qmp/qobject.h" #include "qemu/queue.h"
qobject/qnull.c +1 -0
@@ -10,6 +10,7 @@* or later. See the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/qobject.h"
qobject/qobject.c +1 -0
@@ -7,6 +7,7 @@* or later. See the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/qmp/qbool.h" #include "qapi/qmp/qdict.h"
qobject/qstring.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING.LIB file in the top-level directory. */ +#include "qemu/osdep.h" #include "qapi/qmp/qobject.h" #include "qapi/qmp/qstring.h" #include "qemu-common.h"
Signature · 1 line
1.9.1
Re: [Qemu-devel] [PATCH 11/15] qobject: Clean up includes
Quoted 6 lines · Peter Maydell
Clean up includes so that
osdep.his included first and headers which it implies are not included manually.This commit was created with
scripts/clean-includes.Signed-off-by Peter Maydell <[email protected]>
Quoted 14 lines
--- qobject/json-lexer.c | 2 +- qobject/json-parser.c | 2 +- qobject/json-streamer.c | 1 + qobject/qbool.c | 1 + qobject/qdict.c | 1 + qobject/qfloat.c | 1 + qobject/qint.c | 1 + qobject/qjson.c | 1 + qobject/qlist.c | 1 + qobject/qnull.c | 1 + qobject/qobject.c | 1 + qobject/qstring.c | 1 + 12 files changed, 12 insertions(+), 2 deletions(-)
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH 12/15 qom: Clean up includes
In reply to Peter MaydellClean 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.
--- qom/container.c | 2 +- qom/object.c | 1 + qom/object_interfaces.c | 1 + qom/qom-qobject.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-)
qom/container.c +1 -1
@@ -10,9 +10,9 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qom/object.h" #include "qemu/module.h" -#include <assert.h> static const TypeInfo container_info = { .name ="container" ,
qom/object.c +1 -0
@@ -10,6 +10,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qom/object.h" #include "qom/object_interfaces.h" #include "qemu-common.h"
qom/object_interfaces.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qom/object_interfaces.h" #include "qemu/module.h"
qom/qom-qobject.c +1 -0
@@ -9,6 +9,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qom/object.h" #include "qom/qom-qobject.h"
Signature · 1 line
1.9.1
PATCH 13/15 io: Clean up includes
In reply to Peter MaydellClean 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.
--- io/channel-buffer.c | 1 + io/channel-command.c | 1 + io/channel-file.c | 1 + io/channel-socket.c | 1 + io/channel-tls.c | 1 + io/channel-watch.c | 1 + io/channel-websock.c | 1 + io/channel.c | 1 + io/task.c | 1 + 9 files changed, 9 insertions(+)
io/channel-buffer.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel-buffer.h" #include "io/channel-watch.h" #include "qemu/sockets.h"
io/channel-command.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel-command.h" #include "io/channel-watch.h" #include "qemu/sockets.h"
io/channel-file.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel-file.h" #include "io/channel-watch.h" #include "qemu/sockets.h"
io/channel-socket.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel-socket.h" #include "io/channel-watch.h" #include "trace.h"
io/channel-tls.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel-tls.h" #include "trace.h"
io/channel-watch.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel-watch.h" typedef struct QIOChannelFDSource QIOChannelFDSource ;
io/channel-websock.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel-websock.h" #include "crypto/hash.h" #include "trace.h"
io/channel.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/channel.h" #include "qemu/coroutine.h"
io/task.c +1 -0
@@ -18,6 +18,7 @@* */ +#include "qemu/osdep.h" #include "io/task.h" #include "qemu/thread.h" #include "trace.h"
Signature · 1 line
1.9.1
PATCH 14/15 contrib: Clean up includes
In reply to Peter MaydellClean 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.
--- contrib/ivshmem-client/ivshmem-client.c | 2 +- contrib/ivshmem-client/main.c | 1 + contrib/ivshmem-server/ivshmem-server.c | 2 +- contrib/ivshmem-server/main.c | 1 + 4 files changed, 4 insertions(+), 2 deletions(-)
contrib/ivshmem-client/ivshmem-client.c +1 -1
@@ -6,7 +6,7 @@* top-level directory. */ -#include <sys/types.h> +#include "qemu/osdep.h" #include <sys/socket.h> #include <sys/un.h>
contrib/ivshmem-client/main.c +1 -0
@@ -6,6 +6,7 @@* top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ivshmem-client.h"
contrib/ivshmem-server/ivshmem-server.c +1 -1
@@ -5,11 +5,11 @@* (at your option) any later version. See the COPYING file in the * top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/sockets.h" #include <sys/mman.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #ifdef CONFIG_LINUX
contrib/ivshmem-server/main.c +1 -0
@@ -6,6 +6,7 @@* top-level directory. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "ivshmem-server.h"
Signature · 1 line
1.9.1
PATCH 15/15 all: Clean up includes
In reply to Peter MaydellClean 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.
---
This catches everything except:
* our external code (roms, dtc, pixman, libdecnumber)
* tests
--- accel.c | 1 + aio-posix.c | 1 + aio-win32.c | 1 + arch_init.c | 2 +- async.c | 1 + balloon.c | 1 + block.c | 4 +--- blockdev-nbd.c | 1 + blockdev.c | 1 + blockjob.c | 2 +- bootdevice.c | 1 + bt-host.c | 2 +- bt-vhci.c | 1 + device-hotplug.c | 1 + device_tree.c | 7 +------ disas.c | 3 +-- dma-helpers.c | 1 + dump.c | 2 +- fpu/softfloat.c | 3 +-- gdbstub.c | 9 +-------- hmp.c | 1 + iohandler.c | 2 +- ioport.c | 1 + iothread.c | 1 + kvm-all.c | 3 +-- kvm-stub.c | 1 + main-loop.c | 1 + memory.c | 2 +- memory_mapping.c | 1 + module-common.c | 2 +- monitor.c | 2 +- nbd/client.c | 1 + nbd/common.c | 1 + nbd/server.c | 1 + numa.c | 1 + os-posix.c | 6 +----- os-win32.c | 7 +------ page_cache.c | 8 +------- qdev-monitor.c | 1 + qemu-bridge-helper.c | 13 ++----------- qemu-char.c | 8 +------- qemu-log.c | 1 + qemu-nbd.c | 5 +---- qemu-seccomp.c | 2 +- qemu-timer.c | 1 + qjson.c | 2 +- qmp.c | 1 + qtest.c | 1 + replay/replay-events.c | 1 + replay/replay-input.c | 1 + replay/replay-internal.c | 1 + replay/replay-time.c | 1 + replay/replay.c | 1 + spice-qemu-char.c | 3 +-- tcg-runtime.c | 2 +- tci.c | 2 +- thread-pool.c | 2 +- thunk.c | 4 +--- tpm.c | 2 +- trace/control.c | 1 + trace/ftrace.c | 5 +---- trace/qmp.c | 1 + trace/simple.c | 6 +----- user-exec.c | 3 +-- vl.c | 9 +-------- 65 files changed, 66 insertions(+), 101 deletions(-)
accel.c +1 -0
@@ -23,6 +23,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "sysemu/accel.h" #include "hw/boards.h" #include "qemu-common.h"
aio-posix.c +1 -0
@@ -13,6 +13,7 @@* GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "block/block.h" #include "qemu/queue.h"
aio-win32.c +1 -0
@@ -15,6 +15,7 @@* GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "block/block.h" #include "qemu/queue.h"
arch_init.c +1 -1
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <stdint.h> +#include "qemu/osdep.h" #include "sysemu/sysemu.h" #include "sysemu/arch_init.h" #include "hw/pci/pci.h"
async.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "block/aio.h" #include "block/thread-pool.h"
balloon.c +1 -0
@@ -24,6 +24,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "exec/cpu-common.h" #include "sysemu/kvm.h"
block.c +1 -3
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "config-host.h" +#include "qemu/osdep.h" #include "qemu-common.h" #include "trace.h" #include "block/block_int.h"
@@ -42,8 +42,6 @@#include "block/throttle-groups.h" #ifdef CONFIG_BSD -#include <sys/types.h> -#include <sys/stat.h> #include <sys/ioctl.h> #include <sys/queue.h> #ifndef __DragonFly__
blockdev-nbd.c +1 -0
@@ -9,6 +9,7 @@* later. See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "sysemu/blockdev.h" #include "sysemu/block-backend.h" #include "hw/block/block.h"
blockdev.c +1 -0
@@ -30,6 +30,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "hw/block/block.h"
blockjob.c +1 -1
@@ -23,7 +23,7 @@* THE SOFTWARE. */ -#include "config-host.h" +#include "qemu/osdep.h" #include "qemu-common.h" #include "trace.h" #include "block/block.h"
bootdevice.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "sysemu/sysemu.h" #include "qapi/visitor.h" #include "qemu/error-report.h"
bt-host.c +1 -1
@@ -17,12 +17,12 @@* with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/bt.h" #include "qemu/main-loop.h" #ifndef _WIN32 -# include <errno.h> # include <sys/ioctl.h> # include <sys/uio.h> # ifdef CONFIG_BLUEZ
bt-vhci.c +1 -0
@@ -17,6 +17,7 @@* with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/bt.h" #include "hw/bt.h"
device-hotplug.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/boards.h" #include "sysemu/block-backend.h"
device_tree.c +1 -6
@@ -11,12 +11,7 @@* */ -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> -#include <stdlib.h> +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/error-report.h"
disas.c +1 -2
@@ -1,9 +1,8 @@/* General "disassemble this chunk" code. Used for debugging. */ -#include "config.h" +#include "qemu/osdep.h" #include "qemu-common.h" #include "disas/bfd.h" #include "elf.h" -#include <errno.h> #include "cpu.h" #include "disas/disas.h"
dma-helpers.c +1 -0
@@ -7,6 +7,7 @@* (GNU GPL), version 2 or later. */ +#include "qemu/osdep.h" #include "sysemu/block-backend.h" #include "sysemu/dma.h" #include "trace.h"
dump.c +1 -1
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "elf.h" #include "cpu.h"
@@ -22,7 +23,6 @@#include "sysemu/sysemu.h" #include "sysemu/memory_mapping.h" #include "sysemu/cpus.h" -#include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "qmp-commands.h"
fpu/softfloat.c +1 -2
@@ -82,12 +82,11 @@ this code that are retained./* softfloat (and in particular the code in softfloat-specialize.h) is * target-dependent and needs the TARGET_* macros. */ -#include "config.h" +#include "qemu/osdep.h" #include "fpu/softfloat.h" /* We only need stdlib for abort() */ -#include <stdlib.h> /*---------------------------------------------------------------------------- | Primitive arithmetic functions, including multi-word arithmetic, and
gdbstub.c +1 -8
@@ -16,16 +16,9 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" +#include "qemu/osdep.h" #include "qemu-common.h" #ifdef CONFIG_USER_ONLY -#include <stdlib.h> -#include <stdio.h> -#include <stdarg.h> -#include <string.h> -#include <errno.h> -#include <unistd.h> -#include <fcntl.h> #include "qemu.h" #else
hmp.c +1 -0
@@ -13,6 +13,7 @@* GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "hmp.h" #include "net/net.h" #include "net/eth.h"
iohandler.c +1 -1
@@ -22,7 +22,7 @@* THE SOFTWARE. */ -#include "config-host.h" +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/queue.h" #include "block/aio.h"
ioport.c +1 -0
@@ -25,6 +25,7 @@* splitted out ioport related stuffs from vl.c. */ +#include "qemu/osdep.h" #include "exec/ioport.h" #include "trace.h" #include "exec/memory.h"
iothread.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "qom/object.h" #include "qom/object_interfaces.h" #include "qemu/module.h"
kvm-all.c +1 -2
@@ -13,10 +13,9 @@* */ -#include <sys/types.h> +#include "qemu/osdep.h" #include <sys/ioctl.h> #include <sys/mman.h> -#include <stdarg.h> #include <linux/kvm.h>
kvm-stub.c +1 -0
@@ -10,6 +10,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "hw/hw.h" #include "cpu.h"
main-loop.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h" #include "qemu/sockets.h" // struct in_addr needed for libslirp.h
memory.c +1 -1
@@ -13,6 +13,7 @@* GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "exec/memory.h" #include "exec/address-spaces.h" #include "exec/ioport.h"
@@ -21,7 +22,6 @@#include "qemu/error-report.h" #include "qom/object.h" #include "trace.h" -#include <assert.h> #include "exec/memory-internal.h" #include "exec/ram_addr.h"
memory_mapping.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include <glib.h> #include "qemu-common.h"
module-common.c +1 -1
@@ -1,4 +1,4 @@ -#include "config-host.h" +#include "qemu/osdep.h" #include "qemu/module.h" void qemu_module_dummy (void )
monitor.c +1 -1
@@ -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 <dirent.h> #include "hw/hw.h" #include "monitor/qdev.h"
@@ -59,7 +60,6 @@#include "qapi/qmp/json-streamer.h" #include "qapi/qmp/json-parser.h" #include <qom/object_interfaces.h> -#include "qemu/osdep.h" #include "cpu.h" #include "trace.h" #include "trace/control.h"
nbd/client.c +1 -0
@@ -16,6 +16,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "nbd-internal.h" static int nbd_errno_to_system_errno (int err)
nbd/common.c +1 -0
@@ -16,6 +16,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "nbd-internal.h" ssize_t nbd_wr_sync (int fd,void *buffer,size_t size,bool do_read)
nbd/server.c +1 -0
@@ -16,6 +16,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "nbd-internal.h" static int system_errno_to_nbd_errno (int err)
numa.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "sysemu/numa.h" #include "exec/cpu-common.h" #include "qemu/bitmap.h"
os-posix.c +1 -5
@@ -23,10 +23,7 @@* THE SOFTWARE. */ -#include <unistd.h> -#include <fcntl.h> -#include <signal.h> -#include <sys/types.h> +#include "qemu/osdep.h" #include <sys/wait.h> /*needed for MAP_POPULATE before including qemu-options.h */ #include <sys/mman.h>
@@ -35,7 +32,6 @@#include <libgen.h> /* Needed early for CONFIG_BSD etc. */ -#include "config-host.h" #include "sysemu/sysemu.h" #include "net/slirp.h" #include "qemu-options.h"
os-win32.c +1 -6
@@ -22,14 +22,9 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#include "qemu/osdep.h" #include <windows.h> #include <mmsystem.h> -#include <unistd.h> -#include <fcntl.h> -#include <time.h> -#include <errno.h> -#include <sys/time.h> -#include "config-host.h" #include "sysemu/sysemu.h" #include "qemu-options.h"
page_cache.c +1 -7
@@ -12,13 +12,7 @@* */ -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/time.h> -#include <sys/types.h> -#include <stdbool.h> +#include "qemu/osdep.h" #include <glib.h> #include "qemu-common.h"
qdev-monitor.c +1 -0
@@ -17,6 +17,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "hw/qdev.h" #include "hw/sysbus.h" #include "monitor/monitor.h"
qemu-bridge-helper.c +2 -11
@@ -13,19 +13,10 @@* */ -#include "config-host.h" - -#include <stdio.h> -#include <errno.h> -#include <fcntl.h> -#include <unistd.h> -#include <string.h> -#include <stdlib.h> -#include <stdbool.h> -#include <ctype.h> +#include "qemu/osdep.h" +#include <glib.h> -#include <sys/types.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/un.h>
qemu-char.c +1 -7
@@ -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-common.h" #include "monitor/monitor.h" #include "sysemu/sysemu.h"
@@ -37,11 +38,6 @@#include "io/channel-file.h" #include "io/channel-tls.h" -#include <unistd.h> -#include <fcntl.h> -#include <time.h> -#include <errno.h> -#include <sys/time.h> #include <zlib.h> #ifndef _WIN32
@@ -58,7 +54,6 @@#include <netdb.h> #include <sys/select.h> #ifdef CONFIG_BSD -#include <sys/stat.h> #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)#include <dev/ppbus/ppi.h> #include <dev/ppbus/ppbconf.h>
@@ -72,7 +67,6 @@#include <linux/parport.h> #endif #ifdef __sun__ -#include <sys/stat.h> #include <sys/ethernet.h> #include <sys/sockio.h> #include <netinet/arp.h>
qemu-log.c +1 -0
@@ -17,6 +17,7 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/log.h"
qemu-nbd.c +1 -4
@@ -16,6 +16,7 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/block-backend.h" #include "block/block_int.h"
@@ -27,15 +28,11 @@#include "qapi/util.h" #include "qapi/qmp/qstring.h" -#include <stdarg.h> -#include <stdio.h> #include <getopt.h> -#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> -#include <signal.h> #include <libgen.h> #include <pthread.h>
qemu-seccomp.c +1 -1
@@ -12,7 +12,7 @@* Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. */ -#include <stdio.h> +#include "qemu/osdep.h" #include <seccomp.h> #include "sysemu/seccomp.h"
qemu-timer.c +1 -0
@@ -22,6 +22,7 @@* THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/timer.h" #include "sysemu/replay.h"
qjson.c +1 -1
@@ -11,8 +11,8 @@* */ +#include "qemu/osdep.h" #include <qapi/qmp/qstring.h> -#include <stdbool.h> #include <glib.h> #include <qjson.h> #include <qemu/module.h>
qmp.c +1 -0
@@ -13,6 +13,7 @@* GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" #include "sysemu/sysemu.h"
qtest.c +1 -0
@@ -11,6 +11,7 @@* */ +#include "qemu/osdep.h" #include "sysemu/qtest.h" #include "hw/qdev.h" #include "sysemu/char.h"
replay/replay-events.c +1 -0
@@ -9,6 +9,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/error-report.h" #include "sysemu/replay.h"
replay/replay-input.c +1 -0
@@ -9,6 +9,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/replay.h" #include "replay-internal.h"
replay/replay-internal.c +1 -0
@@ -9,6 +9,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/replay.h" #include "replay-internal.h"
replay/replay-time.c +1 -0
@@ -9,6 +9,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/replay.h" #include "replay-internal.h"
replay/replay.c +1 -0
@@ -9,6 +9,7 @@* */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/replay.h" #include "replay-internal.h"
spice-qemu-char.c +1 -2
@@ -1,11 +1,10 @@ -#include "config-host.h" +#include "qemu/osdep.h" #include "trace.h" #include "ui/qemu-spice.h" #include "sysemu/char.h" #include <spice.h> #include <spice/protocol.h> -#include "qemu/osdep.h" typedef struct SpiceCharDriver { CharDriverState* chr;
tcg-runtime.c +1 -1
@@ -21,7 +21,7 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <stdint.h> +#include "qemu/osdep.h" #include "qemu/host-utils.h" /* This file is compiled once, and thus we can't include the standard
tci.c +1 -1
@@ -17,7 +17,7 @@* along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" +#include "qemu/osdep.h" /* Defining NDEBUG disables assertions (which makes the code faster). */ #if !defined(CONFIG_DEBUG_TCG ) && !defined(NDEBUG )
thread-pool.c +1 -1
@@ -14,10 +14,10 @@* Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/queue.h" #include "qemu/thread.h" -#include "qemu/osdep.h" #include "qemu/coroutine.h" #include "trace.h" #include "block/thread-pool.h"
thunk.c +1 -3
@@ -16,9 +16,7 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include <stdlib.h> -#include <stdio.h> -#include <stdarg.h> +#include "qemu/osdep.h" #include "qemu.h" #include "exec/user/thunk.h"
tpm.c +1 -1
@@ -11,7 +11,7 @@* * Based on net.c */ -#include "config-host.h" +#include "qemu/osdep.h" #include "qapi/qmp/qerror.h" #include "sysemu/tpm_backend.h"
trace/control.c +1 -0
@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "trace/control.h" #ifdef CONFIG_TRACE_SIMPLE #include "trace/simple.h"
trace/ftrace.c +1 -4
@@ -9,10 +9,7 @@* */ -#include <stdio.h> -#include <string.h> -#include <fcntl.h> -#include <limits.h> +#include "qemu/osdep.h" #include "trace.h" #include "trace/control.h"
trace/qmp.c +1 -0
@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu/typedefs.h" #include "qmp-commands.h" #include "trace/control.h"
trace/simple.c +1 -5
@@ -8,12 +8,8 @@* */ -#include <stdlib.h> -#include <stdint.h> -#include <stdio.h> -#include <time.h> +#include "qemu/osdep.h" #ifndef _WIN32 -#include <signal.h> #include <pthread.h> #endif #include "qemu/timer.h"
user-exec.c +1 -2
@@ -16,7 +16,7 @@* You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" +#include "qemu/osdep.h" #include "cpu.h" #include "disas/disas.h" #include "tcg.h"
@@ -33,7 +33,6 @@#undef ESI#undef EDI#undef EIP -#include <signal.h> #ifdef __linux__#include <sys/ucontext.h> #endif
vl.c +1 -8
@@ -21,14 +21,8 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <unistd.h> -#include <fcntl.h> -#include <signal.h> -#include <time.h> -#include <errno.h> -#include <sys/time.h> +#include "qemu/osdep.h" -#include "config-host.h" #ifdef CONFIG_SECCOMP #include "sysemu/seccomp.h"
@@ -113,7 +107,6 @@ int main(int argc, char **argv)#include "qemu/queue.h" #include "sysemu/cpus.h" #include "sysemu/arch_init.h" -#include "qemu/osdep.h" #include "ui/qemu-spice.h" #include "qapi/string-input-visitor.h"
Signature · 1 line
1.9.1
Peter Maydell
AppliedQuoted 11 lines · Peter Maydell
This patchset runs clean-includes on a bunch more files. With this (plus one or two patches I sent earlier) every file in the tree except for those in tests/ has been updated. (I skipped tests/ for now because at least some of the files in tests/tcg seem to be totally standalone. I'll look at those next week but I thought I'd send out this set first.)
One or two files might have slipped through the net if they were newly added since I did the scan; we can pick those up later though.
Applied to master with tweak to oslib-posix.c as indicated. (We probably want to move the fixup for daemon() to osdep.h; I'll send a patch for that.)
thanks
-- PMM