trio upgrade and integration
diff --git a/nanoftp.c b/nanoftp.c
index d7cc0a6..050b8b0 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -12,19 +12,19 @@
 #define HAVE_NETINET_IN_H
 #define HAVE_NETDB_H
 #define HAVE_SYS_TIME_H
-#else /* STANDALONE */
-#ifdef WIN32
-#define INCLUDE_WINSOCK
-#include "win32config.h"
+#include <libxml/xmlversion.h>
+#ifdef WITHOUT_TRIO
+#include <stdio.h>
 #else
-#include "config.h"
+#define TRIO_REPLACE_STDIO
+#include "trio.h"
 #endif
+#else /* STANDALONE */
+#include "libxml.h"
 #endif /* STANDALONE */
 
-#include <libxml/xmlversion.h>
 
 #ifdef LIBXML_FTP_ENABLED
-#include <stdio.h>
 #include <string.h>
 
 #ifdef HAVE_STDLIB_H