From 4c4b09947fac0321f60bfc6c015c1b0b9782ce41 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 3 Nov 2021 18:36:13 +0000 Subject: [PATCH] Reorder header file inclusion to avoid "byte" name collision. When using the latest mingw64 header files, rpcndr.h (which is indiretly included by windows.h) defines a type named "byte" which collides with a definition in cpp_type_traits.h (included indirectly by the STL). This is only a problem if "using namespace std" is declared prior to including windows.h. --- vpi_modules.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpi_modules.cc b/vpi_modules.cc index ea0ccde2f..8fba720b9 100644 --- a/vpi_modules.cc +++ b/vpi_modules.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Martin Whitaker (icarus@martin-whitaker.me.uk) + * Copyright (c) 2019-2021 Martin Whitaker (icarus@martin-whitaker.me.uk) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -18,10 +18,10 @@ */ #include "config.h" +#include "vvp/ivl_dlfcn.h" #include "compiler.h" #include "vpi_user.h" #include "sv_vpi_user.h" -#include "vvp/ivl_dlfcn.h" /* The only VPI routines that can be legally called when the functions in the vlog_startup_routines[] array are executed are vpi_register_systf()