Fix the #include order for config.h.
Add #include "config.h" directives where needed.

diff --git a/scheduler/thread.c b/scheduler/thread.c
index b3ce6f3..e3cf2cd 100644
--- a/scheduler/thread.c
+++ b/scheduler/thread.c
@@ -4,6 +4,7 @@
  * Copyright 1996 Alexandre Julliard
  */
 
+#include "config.h"
 #include "wine/port.h"
 
 #include <assert.h>