Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 98510)
+++ /trunk/Config.kmk	(revision 98511)
@@ -5078,21 +5078,4 @@
 
 #
-# SDK for including int64.lib for x86 targets.
-# It conceptually moved from the WDK to the PSDK with W10, as it's now in the um subdir.
-#
-SDK_VBoxWinInt64Lib             := Abstracts where to find int64.lib for x86 builds.
-ifn1of ($(VBOX_WINPSDK), WINPSDK71 WINPSDK80)
- SDK_VBoxWinInt64Lib_LIBS.x86    = $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/int64.lib
- ifeq ($(KBUILD_TARGET),win)
-  include $(KBUILD_PATH)/sdks/$(VBOX_WINPSDK).kmk ## TODO: Add a kBuild feature for loading SDKs.
- endif
-else
- SDK_VBoxWinInt64Lib_LIBS.x86    = $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/int64.lib
- ifeq ($(KBUILD_TARGET),win)
-  include $(KBUILD_PATH)/sdks/$(VBOX_WINDDK).kmk ## TODO: Add a kBuild feature for loading SDKs.
- endif
-endif
-
-#
 # Determine Solaris version.
 #
@@ -5215,5 +5198,4 @@
    TEMPLATE_VBoxRc_LDFLAGS          += -IntegrityCheck
   endif
-  TEMPLATE_VBoxRc_SDKS.x86          += VBoxWinInt64Lib
   TEMPLATE_VBoxRc_LIBS              += \
   	$(PATH_STAGE_LIB)/RuntimeRCStub$(VBOX_SUFF_LIB)
@@ -5386,5 +5368,4 @@
   include $(KBUILD_PATH)/sdks/$(VBOX_WINDDK).kmk ## TODO: Add a kBuild feature for loading SDKs.
  endif
- TEMPLATE_VBoxR0_SDKS.x86          += VBoxWinInt64Lib
  TEMPLATE_VBoxR0_ORDERDEPS          = $(VBOX_SIGN_DRIVER_ORDERDEPS)
  TEMPLATE_VBoxR0_POST_CMDS          = $(VBOX_SIGN_DRIVER_CMDS)
@@ -6432,5 +6413,4 @@
   ifdef VBOX_WITH_NOCRT_STATIC
    TEMPLATE_VBoxR3StaticBase_SDKS          = $(subst WINSDK10-UCRT,,$(TEMPLATE_VBoxR3Exe_SDKS))
-   TEMPLATE_VBoxR3StaticBase_SDKS.x86      = $(TEMPLATE_VBoxR3Exe_SDKS.x86) VBoxWinInt64Lib  ## @todo drop this asap. @bugref{10261}
   else
    TEMPLATE_VBoxR3StaticBase_SDKS          = $(subst WINSDK10-UCRT, WINSDK10-UCRT-STATIC,$(TEMPLATE_VBoxR3Exe_SDKS))
@@ -6688,5 +6668,4 @@
   	$(PATH_TOOL_$(TEMPLATE_VBoxR3StaticNoCrt_TOOL.win.x86)_LIB)/chkstk.obj
  endif
- TEMPLATE_VBoxR3StaticNoCrt_SDKS.win.x86  += VBoxWinInt64Lib
  TEMPLATE_VBoxR3StaticNoCrt_LDFLAGS        = $(filter-out $(VBOX_VCC_LD_GUARD_CF) $(VBOX_VCC_SANITIZER_LDFLAGS), $(TEMPLATE_VBoxR3Static_LDFLAGS))
  TEMPLATE_VBoxR3StaticNoCrt_LDFLAGS.win.x86 = $(filter-out -Include%, $(TEMPLATE_VBoxR3Static_LDFLAGS.win.x86))
@@ -6731,5 +6710,4 @@
 ifeq ($(KBUILD_TARGET),win) # No CRT!
  TEMPLATE_VBoxR3HardenedExe_SDKS          = VBoxNtDll $(TEMPLATE_VBoxR3Exe_SDKS)
- TEMPLATE_VBoxR3HardenedExe_SDKS.x86      = VBoxWinInt64Lib
  ifneq ($(VBOX_VCC_LD_GUARD_CF),)
   TEMPLATE_VBoxR3HardenedExe_CXXFLAGS       = $(filter-out -RTC% -GZ $(VBOX_VCC_SANITIZER_FLAGS),$(TEMPLATE_VBoxR3Exe_CXXFLAGS))
@@ -8586,5 +8564,4 @@
  TEMPLATE_VBoxGuestR3NoCrtExe_LIBS.win.x86   = \
  	$(PATH_TOOL_$(TEMPLATE_VBoxGuestR3NoCrtExe_TOOL.win.x86)_LIB)/chkstk.obj
- TEMPLATE_VBoxGuestR3NoCrtExe_SDKS.win.x86   = VBoxWinInt64Lib
  TEMPLATE_VBoxGuestR3NoCrtExe_LDFLAGS        = $(filter-out $(VBOX_VCC_LD_GUARD_CF) $(VBOX_VCC_SANITIZER_LDFLAGS), $(TEMPLATE_VBoxGuestR3Exe_LDFLAGS))
  TEMPLATE_VBoxGuestR3NoCrtExe_LDFLAGS.win.x86 = $(filter-out -Include%, $(TEMPLATE_VBoxGuestR3Exe_LDFLAGS.win.x86))
@@ -8674,5 +8651,5 @@
 TEMPLATE_VBoxGuestR0Drv_EXTENDS     = VBoxR0Drv
 TEMPLATE_VBoxGuestR0Drv_INST        = $(INST_ADDITIONS)
-TEMPLATE_VBoxGuestR0Drv_SDKS.win.x86   = ReorderCompilerIncs $(VBOX_WINDDK_GST) $(VBOX_WINPSDK_GST_INCS) VBoxWinInt64Lib
+TEMPLATE_VBoxGuestR0Drv_SDKS.win.x86   = ReorderCompilerIncs $(VBOX_WINDDK_GST) $(VBOX_WINPSDK_GST_INCS)
 TEMPLATE_VBoxGuestR0Drv_SDKS.win.amd64 = ReorderCompilerIncs $(VBOX_WINDDK_GST) $(VBOX_WINPSDK_GST_INCS)
 TEMPLATE_VBoxGuestR0Drv_DEFS        = $(TEMPLATE_VBoxR0Drv_DEFS) IN_GUEST IN_GUEST_R0
Index: /trunk/src/VBox/Additions/WINNT/Mouse/NT4/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Mouse/NT4/Makefile.kmk	(revision 98510)
+++ /trunk/src/VBox/Additions/WINNT/Mouse/NT4/Makefile.kmk	(revision 98511)
@@ -46,5 +46,4 @@
 	$(VBOX_LIB_IPRT_GUEST_R0_NT4) \
 	$(VBOX_LIB_VBGL_R0) \
-	$(PATH_SDK_$(VBOX_WINDDK_GST_NT4)_LIB)/int64.lib \
 	$(PATH_SDK_$(VBOX_WINDDK_GST_NT4)_LIB)/exsup.lib \
 	$(PATH_SDK_$(VBOX_WINDDK_GST_NT4)_LIB)/ntoskrnl.lib \
Index: /trunk/src/VBox/Additions/WINNT/SharedFolders/driver/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/WINNT/SharedFolders/driver/Makefile.kmk	(revision 98510)
+++ /trunk/src/VBox/Additions/WINNT/SharedFolders/driver/Makefile.kmk	(revision 98511)
@@ -61,5 +61,7 @@
 	$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/copysup.lib \
 	$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/hal.lib \
-	$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib
+	$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib \
+	$(VBOX_LIB_VBGL_R0) \
+	$(VBOX_LIB_IPRT_GUEST_R0) # before ntoskrnl.lib
 ifneq ($(VBOX_VCC_CC_GUARD_CF),)
  VBoxSF_LIBS += \
@@ -71,7 +73,4 @@
  	$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib
 endif
-VBoxSF_LIBS += \
-	$(VBOX_LIB_VBGL_R0) \
-	$(VBOX_LIB_IPRT_GUEST_R0)
 
 VBoxSF_CLEAN = \
@@ -86,5 +85,4 @@
  #
  # This driver version is used for Windows 2000, XP, W2K3, Vista and 7.
- # Note! Including int64.lib here for _aulldvrm which isn't exported by w2k.
  #
  SYSMODS += VBoxSFW2K
@@ -99,6 +97,5 @@
  	\
  	$(VBOX_LIB_VBGL_R0) \
- 	$(VBOX_LIB_IPRT_GUEST_R0) \
- 	$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB)/int64.lib
+ 	$(VBOX_LIB_IPRT_GUEST_R0) # before ntoskrnl.lib
  ifneq ($(VBOX_VCC_CC_GUARD_CF),)
   VBoxSFW2K_LIBS += \
Index: /trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk	(revision 98510)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk	(revision 98511)
@@ -98,5 +98,4 @@
     	$(VBOX_LIB_IPRT_GUEST_R0) \
     	$(PATH_SDK_$(VBOX_WINDDK_GST_NT4)_LIB)/exsup.lib \
-    	$(PATH_SDK_$(VBOX_WINDDK_GST_NT4)_LIB)/int64.lib \
     	$(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/ntoskrnl.lib \
     	$(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/hal.lib
Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 98510)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 98511)
@@ -2147,6 +2147,5 @@
   	common/compiler/vcc/x86-aulldiv.asm \
   	common/compiler/vcc/x86-aullrem.asm \
-  	common/compiler/vcc/x86-aulldvrm.asm \
-  	common/compiler/vcc/RTVccUInt64Div.cpp
+  	common/compiler/vcc/x86-aulldvrm.asm
   RuntimeR3_VBOX_NOCRT_ALIASES.win := \
   	strtok_s=nocrt_strtok_r _strtok_s=nocrt_strtok_r nocrt_strtok_s=nocrt_strtok_r \
@@ -4157,7 +4156,11 @@
 #
 # RuntimeGuestR0 - Guest driver runtime.
-#                  This is almost the same as the RuntimeR0Drv, the main difference
-#                  is in the backdoor logging and the lack of sup.h (which should be
-#                  made irrelevant even for RuntimeR0Drv).
+#
+#   This is almost the same as the RuntimeR0Drv, the main difference is in the
+#   backdoor logging and the lack of sup.h (which should be made irrelevant even
+#   for RuntimeR0Drv).
+#
+#   In addition we include 64-bit integer stuff, since older kernels doesn't
+#   export all of these and we happen to have all of it.
 #
 RuntimeGuestR0_TEMPLATE  := VBoxGuestR0DrvLib
@@ -4169,4 +4172,17 @@
 RuntimeGuestR0_SOURCES.win := \
 	$(filter-out common/checksum/md% common/checksum/sha%, $(RuntimeR0Drv_SOURCES.win))
+RuntimeGuestR0_SOURCES.win.x86 := \
+	$(RuntimeR0Drv_SOURCES.win.x86) \
+  	common/compiler/vcc/x86-allshl.asm \
+  	common/compiler/vcc/x86-allshr.asm \
+  	common/compiler/vcc/x86-aullshr.asm \
+  	common/compiler/vcc/x86-allmul.asm \
+  	common/compiler/vcc/x86-alldiv.asm \
+  	common/compiler/vcc/x86-allrem.asm \
+  	common/compiler/vcc/x86-alldvrm.asm \
+  	common/compiler/vcc/x86-aulldiv.asm \
+  	common/compiler/vcc/x86-aullrem.asm \
+  	common/compiler/vcc/x86-aulldvrm.asm
+
 
 
