Please bear in mind that WINDOWSNT is defined when Emacs is built for native Windows. WINDOWSNT says nothing about the GUI. A WINDOWSNT without a window system is reasonable. HAVE_NTGUI, on the other hand, is defined when Emacs is being built for the traditional Windows UI toolkit. While these two macros are usually defined together, they don't have to be. It's conceivable that we might support a GTK+ WINDOWSNT Emacs or a Wine-based FreeBSD Emacs HAVE_NTGUI Emacs linked against Wine. Please don't conflate the two macros.