Fix pch usage in most of the rest of crt.lib. Stop the abuse of including io.h, stdio.h and a few others directly. Add a generic license header to those source files that were missing it. There is still a few other headers left to fix and a few files missing pch and license headers
Modified: trunk/reactos/lib/crt/conio/cprintf.c
Modified: trunk/reactos/lib/crt/conio/cputs.c
Modified: trunk/reactos/lib/crt/conio/getch.c
Modified: trunk/reactos/lib/crt/conio/ungetch.c
Modified: trunk/reactos/lib/crt/direct/chdir.c
Modified: trunk/reactos/lib/crt/direct/chdrive.c
Modified: trunk/reactos/lib/crt/direct/getcwd.c
Modified: trunk/reactos/lib/crt/direct/getdcwd.c
Modified: trunk/reactos/lib/crt/direct/mkdir.c
Modified: trunk/reactos/lib/crt/direct/rmdir.c
Modified: trunk/reactos/lib/crt/except/abnorter.c
Modified: trunk/reactos/lib/crt/float/logb.c
Modified: trunk/reactos/lib/crt/include/internal/file.h
Modified: trunk/reactos/lib/crt/io/access.c
Modified: trunk/reactos/lib/crt/io/chmod.c
Modified: trunk/reactos/lib/crt/io/chsize.c
Modified: trunk/reactos/lib/crt/io/close.c
Modified: trunk/reactos/lib/crt/io/commit.c
Modified: trunk/reactos/lib/crt/io/create.c
Modified: trunk/reactos/lib/crt/io/dup.c
Modified: trunk/reactos/lib/crt/io/dup2.c
Modified: trunk/reactos/lib/crt/io/eof.c
Modified: trunk/reactos/lib/crt/io/filelen.c
Modified: trunk/reactos/lib/crt/io/fileleni.c
Modified: trunk/reactos/lib/crt/io/find.c
Modified: trunk/reactos/lib/crt/io/fmode.c
Modified: trunk/reactos/lib/crt/io/isatty.c
Modified: trunk/reactos/lib/crt/io/locking.c
Modified: trunk/reactos/lib/crt/io/lseek.c
Modified: trunk/reactos/lib/crt/io/lseeki64.c
Modified: trunk/reactos/lib/crt/io/mktemp.c
Modified: trunk/reactos/lib/crt/io/open.c
Modified: trunk/reactos/lib/crt/io/pipe.c
Modified: trunk/reactos/lib/crt/io/read.c
Modified: trunk/reactos/lib/crt/io/setmode.c
Modified: trunk/reactos/lib/crt/io/sopen.c
Modified: trunk/reactos/lib/crt/io/tell.c
Modified: trunk/reactos/lib/crt/io/telli64.c
Modified: trunk/reactos/lib/crt/io/unlink.c
Modified: trunk/reactos/lib/crt/io/utime.c
Modified: trunk/reactos/lib/crt/io/wcreate.c
Modified: trunk/reactos/lib/crt/io/wmktemp.c
Modified: trunk/reactos/lib/crt/io/wopen.c
Modified: trunk/reactos/lib/crt/io/write.c
Modified: trunk/reactos/lib/crt/io/wunlink.c
Modified: trunk/reactos/lib/crt/io/wutime.c
Modified: trunk/reactos/lib/crt/locale/locale.c
Modified: trunk/reactos/lib/crt/math/hypot.c
Modified: trunk/reactos/lib/crt/mbstring/mbbtype.c
Modified: trunk/reactos/lib/crt/mbstring/mbsdec.c
Modified: trunk/reactos/lib/crt/misc/amsg.c
Modified: trunk/reactos/lib/crt/misc/environ.c
Modified: trunk/reactos/lib/crt/precomp.h
Modified: trunk/reactos/lib/crt/process/_cwait.c
Modified: trunk/reactos/lib/crt/process/_system.c
Modified: trunk/reactos/lib/crt/process/process.c
Modified: trunk/reactos/lib/crt/process/thread.c
Modified: trunk/reactos/lib/crt/process/threadx.c
Modified: trunk/reactos/lib/crt/signal/signal.c
Modified: trunk/reactos/lib/crt/stdio/allocfil.c
Modified: trunk/reactos/lib/crt/stdio/clearerr.c
Modified: trunk/reactos/lib/crt/stdio/fclose.c
Modified: trunk/reactos/lib/crt/stdio/fdopen.c
Modified: trunk/reactos/lib/crt/stdio/feof.c
Modified: trunk/reactos/lib/crt/stdio/ferror.c
Modified: trunk/reactos/lib/crt/stdio/fflush.c
Modified: trunk/reactos/lib/crt/stdio/fgetc.c
Modified: trunk/reactos/lib/crt/stdio/fgetchar.c
Modified: trunk/reactos/lib/crt/stdio/fgetpos.c
Modified: trunk/reactos/lib/crt/stdio/fgets.c
Modified: trunk/reactos/lib/crt/stdio/fgetws.c
Modified: trunk/reactos/lib/crt/stdio/filbuf.c
Modified: trunk/reactos/lib/crt/stdio/fileno.c
Modified: trunk/reactos/lib/crt/stdio/flsbuf.c
Modified: trunk/reactos/lib/crt/stdio/fopen.c
Modified: trunk/reactos/lib/crt/stdio/fprintf.c
Modified: trunk/reactos/lib/crt/stdio/fputc.c
Modified: trunk/reactos/lib/crt/stdio/fputchar.c
Modified: trunk/reactos/lib/crt/stdio/fputs.c
Modified: trunk/reactos/lib/crt/stdio/fread.c
Modified: trunk/reactos/lib/crt/stdio/freopen.c
Modified: trunk/reactos/lib/crt/stdio/fseek.c
Modified: trunk/reactos/lib/crt/stdio/fsetpos.c
Modified: trunk/reactos/lib/crt/stdio/fsopen.c
Modified: trunk/reactos/lib/crt/stdio/ftell.c
Modified: trunk/reactos/lib/crt/stdio/fwalk.c
Modified: trunk/reactos/lib/crt/stdio/fwrite.c
Modified: trunk/reactos/lib/crt/stdio/getc.c
Modified: trunk/reactos/lib/crt/stdio/getchar.c
Modified: trunk/reactos/lib/crt/stdio/gets.c
Modified: trunk/reactos/lib/crt/stdio/getw.c
Modified: trunk/reactos/lib/crt/stdio/perror.c
Modified: trunk/reactos/lib/crt/stdio/popen.c
Modified: trunk/reactos/lib/crt/stdio/printf.c
Modified: trunk/reactos/lib/crt/stdio/putc.c
Modified: trunk/reactos/lib/crt/stdio/putchar.c
Modified: trunk/reactos/lib/crt/stdio/puts.c
Modified: trunk/reactos/lib/crt/stdio/putw.c
Modified: trunk/reactos/lib/crt/stdio/remove.c
Modified: trunk/reactos/lib/crt/stdio/rename.c
[truncated at 100 lines; 91 more skipped]
Modified: trunk/reactos/lib/crt/conio/cprintf.c
--- trunk/reactos/lib/crt/conio/cprintf.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/conio/cprintf.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -6,8 +6,8 @@
  * PROGRAMMER:       Eric Kohl (Imported from DJGPP)
  */
 
-#include <stdio.h>
-#include <stdarg.h>
+#include "precomp.h"
+
 #include <conio.h>
 
 /*

Modified: trunk/reactos/lib/crt/conio/cputs.c
--- trunk/reactos/lib/crt/conio/cputs.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/conio/cputs.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -10,11 +10,7 @@
 
 #include "precomp.h"
 #include <conio.h>
-#include <string.h>
-#include <stdio.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/conio/getch.c
--- trunk/reactos/lib/crt/conio/getch.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/conio/getch.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -10,8 +10,6 @@
 
 #include "precomp.h"
 #include <conio.h>
-#include <stdio.h>
-#include <io.h>
 #include <internal/console.h>
 
 

Modified: trunk/reactos/lib/crt/conio/ungetch.c
--- trunk/reactos/lib/crt/conio/ungetch.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/conio/ungetch.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -10,7 +10,8 @@
  *              28/12/98: Created
  */
 
-#include <stdio.h>
+#include "precomp.h"
+
 #include <conio.h>
 #include <internal/console.h>
 

Modified: trunk/reactos/lib/crt/direct/chdir.c
--- trunk/reactos/lib/crt/direct/chdir.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/direct/chdir.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,7 +1,6 @@
 #include "precomp.h"
 #include <ctype.h>
 #include <direct.h>
-#include <internal/file.h>
 #include <tchar.h>
 
 /*

Modified: trunk/reactos/lib/crt/direct/chdrive.c
--- trunk/reactos/lib/crt/direct/chdrive.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/direct/chdrive.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -3,9 +3,7 @@
 #include <direct.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  *

Modified: trunk/reactos/lib/crt/direct/getcwd.c
--- trunk/reactos/lib/crt/direct/getcwd.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/direct/getcwd.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -2,7 +2,6 @@
 #include <direct.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <internal/file.h>
 #include <tchar.h>
 
 /*

Modified: trunk/reactos/lib/crt/direct/getdcwd.c
--- trunk/reactos/lib/crt/direct/getdcwd.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/direct/getdcwd.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,6 +1,5 @@
 #include "precomp.h"
 #include <direct.h>
-#include <internal/file.h>
 #include <internal/debug.h>
 #include <tchar.h>
 #include <errno.h>

Modified: trunk/reactos/lib/crt/direct/mkdir.c
--- trunk/reactos/lib/crt/direct/mkdir.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/direct/mkdir.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,6 +1,5 @@
 #include "precomp.h"
 #include <direct.h>
-#include <internal/file.h>
 #include <tchar.h>
 
 /*

Modified: trunk/reactos/lib/crt/direct/rmdir.c
--- trunk/reactos/lib/crt/direct/rmdir.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/direct/rmdir.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,6 +1,5 @@
 #include "precomp.h"
 #include <direct.h>
-#include <internal/file.h>
 #include <tchar.h>
 
 /*

Modified: trunk/reactos/lib/crt/except/abnorter.c
--- trunk/reactos/lib/crt/except/abnorter.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/except/abnorter.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,7 +1,5 @@
 #include "precomp.h"
-#include <stdio.h>
 
-
 #ifdef __GNUC__
 
 /*

Modified: trunk/reactos/lib/crt/float/logb.c
--- trunk/reactos/lib/crt/float/logb.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/float/logb.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -18,6 +18,8 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include "precomp.h"
+
 #include <float.h>
 
 double _logb (double __x)

Modified: trunk/reactos/lib/crt/include/internal/file.h
--- trunk/reactos/lib/crt/include/internal/file.h	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/include/internal/file.h	2005-11-25 18:05:42 UTC (rev 19564)
@@ -18,10 +18,8 @@
 #include <stdarg.h>
 #include <time.h>
 
-
 #include <windef.h>
 #include <winbase.h>
-#include <winnt.h>
 
 #ifndef _IORMONCL
 #define _IORMONCL 004000  /* remove on close, for temp files */
@@ -194,3 +192,4 @@
 
 
 #endif /* __dj_include_libc_file_h__ */
+

Modified: trunk/reactos/lib/crt/io/access.c
--- trunk/reactos/lib/crt/io/access.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/access.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,6 @@
 #include "precomp.h"
-#include <io.h>
 #include <errno.h>
 #include <tchar.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/chmod.c
--- trunk/reactos/lib/crt/io/chmod.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/chmod.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,9 +1,16 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
 
 #include "precomp.h"
-#include <io.h>
 #include <sys/stat.h>
 #include <tchar.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/chsize.c
--- trunk/reactos/lib/crt/io/chsize.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/chsize.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,5 +1,5 @@
 /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
-#include <io.h>
+#include "precomp.h"
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/close.c
--- trunk/reactos/lib/crt/io/close.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/close.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,6 +1,4 @@
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/commit.c
--- trunk/reactos/lib/crt/io/commit.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/commit.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,9 +1,5 @@
 #include "precomp.h"
-#include <io.h>
-#include <errno.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/create.c
--- trunk/reactos/lib/crt/io/create.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/create.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,4 +1,14 @@
-#include <io.h>
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
+
+#include "precomp.h"
 #include <fcntl.h>
 
 #define NDEBUG

Modified: trunk/reactos/lib/crt/io/dup.c
--- trunk/reactos/lib/crt/io/dup.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/dup.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,9 +1,5 @@
 #include "precomp.h"
-#include <io.h>
-#include <errno.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/dup2.c
--- trunk/reactos/lib/crt/io/dup2.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/dup2.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,6 +1,4 @@
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
 /*
  * @implemented

Modified: trunk/reactos/lib/crt/io/eof.c
--- trunk/reactos/lib/crt/io/eof.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/eof.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,6 +1,15 @@
-#include <stdio.h>
-#include <io.h>
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
 
+#include "precomp.h"
+
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/filelen.c
--- trunk/reactos/lib/crt/io/filelen.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/filelen.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,5 @@
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/fileleni.c
--- trunk/reactos/lib/crt/io/fileleni.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/fileleni.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,5 @@
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/find.c
--- trunk/reactos/lib/crt/io/find.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/find.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,10 +1,6 @@
 #include "precomp.h"
-#include <io.h>
-#include <string.h>
 #include <tchar.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/fmode.c
--- trunk/reactos/lib/crt/io/fmode.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/fmode.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,8 @@
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include "precomp.h"
+
 #include <fcntl.h>
-#include <io.h>
 
-
 int _fmode = O_TEXT;
 
 /*

Modified: trunk/reactos/lib/crt/io/isatty.c
--- trunk/reactos/lib/crt/io/isatty.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/isatty.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,7 +1,5 @@
 #include "precomp.h"
 
-#include <internal/file.h>
-
 #define NDEBUG
 #include <internal/debug.h>
 

Modified: trunk/reactos/lib/crt/io/locking.c
--- trunk/reactos/lib/crt/io/locking.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/locking.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,5 @@
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/lseek.c
--- trunk/reactos/lib/crt/io/lseek.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/lseek.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,5 @@
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/lseeki64.c
--- trunk/reactos/lib/crt/io/lseeki64.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/lseeki64.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,5 @@
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
-
 //#define SETFILEPOINTEREX_AVAILABLE
 
 /*

Modified: trunk/reactos/lib/crt/io/mktemp.c
--- trunk/reactos/lib/crt/io/mktemp.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/mktemp.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -13,14 +13,11 @@
 /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
 
-#include <stdio.h>
-#include <string.h>
-#include <io.h>
+#include "precomp.h"
 
 #define NDEBUG
 #include <internal/debug.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/open.c
--- trunk/reactos/lib/crt/io/open.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/open.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -42,14 +42,10 @@
 #include <stdarg.h>
 #endif
 
-#include <io.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <stdlib.h>
 #include <string.h>
 #include <share.h>
-#include <errno.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/pipe.c
--- trunk/reactos/lib/crt/io/pipe.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/pipe.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -10,9 +10,6 @@
  */
 
 #include "precomp.h"
-#include <io.h>
-#include <errno.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/read.c
--- trunk/reactos/lib/crt/io/read.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/read.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -12,9 +12,7 @@
  *                          behavior for line-buffered streams (KJK::Hyperion)
  */
 
-#include <windows.h>
-#include <io.h>
-#include <internal/file.h>
+#include "precomp.h"
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/setmode.c
--- trunk/reactos/lib/crt/io/setmode.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/setmode.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -10,10 +10,6 @@
  */
 #include "precomp.h"
 
-#include <io.h>
-#include <stdio.h>
-#include <internal/file.h>
-
 #define NDEBUG
 #include <internal/debug.h>
 

Modified: trunk/reactos/lib/crt/io/sopen.c
--- trunk/reactos/lib/crt/io/sopen.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/sopen.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,5 +1,14 @@
-#include <io.h>
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
 
+#include "precomp.h"
 
 /*
  * @implemented

Modified: trunk/reactos/lib/crt/io/tell.c
--- trunk/reactos/lib/crt/io/tell.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/tell.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,7 +1,6 @@
 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
-#include <errno.h>
-#include <io.h>
-#include <stdio.h>
+#include "precomp.h"
+
 #include <sys/types.h>
 
 /*

Modified: trunk/reactos/lib/crt/io/telli64.c
--- trunk/reactos/lib/crt/io/telli64.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/telli64.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,7 +1,14 @@
-#include <errno.h>
-#include <io.h>
-#include <stdio.h>
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
 
+#include "precomp.h"
 
 /*
  * @implemented

Modified: trunk/reactos/lib/crt/io/unlink.c
--- trunk/reactos/lib/crt/io/unlink.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/unlink.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -9,8 +9,6 @@
  */
 
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/utime.c
--- trunk/reactos/lib/crt/io/utime.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/utime.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,12 +1,16 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
+
 #include "precomp.h"
-
-#include <stdio.h>
-#include <io.h>
-#include <errno.h>
 #include <sys/utime.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/io/wcreate.c
--- trunk/reactos/lib/crt/io/wcreate.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/wcreate.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,4 +1,14 @@
-#include <io.h>
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
+
+#include "precomp.h"
 #include <fcntl.h>
 
 #define NDEBUG

Modified: trunk/reactos/lib/crt/io/wmktemp.c
--- trunk/reactos/lib/crt/io/wmktemp.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/wmktemp.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -13,9 +13,7 @@
 /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
 
-#include <stdio.h>
-#include <string.h>
-#include <io.h>
+#include "precomp.h"
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/wopen.c
--- trunk/reactos/lib/crt/io/wopen.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/wopen.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -16,14 +16,9 @@
 #if !defined(NDEBUG) && defined(DBG)
 #include <stdarg.h>
 #endif
-#include <io.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
 #include <share.h>
-#include <errno.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/write.c
--- trunk/reactos/lib/crt/io/write.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/write.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -9,11 +9,6 @@
  */
 
 #include "precomp.h"
-#include <io.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/wunlink.c
--- trunk/reactos/lib/crt/io/wunlink.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/wunlink.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -9,8 +9,6 @@
  */
 
 #include "precomp.h"
-#include <io.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/io/wutime.c
--- trunk/reactos/lib/crt/io/wutime.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/io/wutime.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,9 +1,15 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/crt/??????
+ * PURPOSE:     Unknown
+ * PROGRAMER:   Unknown
+ * UPDATE HISTORY:
+ *              25/11/05: Created
+ */
+
 #include "precomp.h"
-#include <stdio.h>
-#include <io.h>
-#include <errno.h>
 #include <sys/utime.h>
-#include <internal/file.h>
 
 /*
  * @implemented

Modified: trunk/reactos/lib/crt/locale/locale.c
--- trunk/reactos/lib/crt/locale/locale.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/locale/locale.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -5,12 +5,9 @@
  */
 
 #include "precomp.h"
-#include <stdio.h>
 #include <locale.h>
-#include <string.h>
 #include <limits.h>
 #include <internal/tls.h>
-#include <stdlib.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/math/hypot.c
--- trunk/reactos/lib/crt/math/hypot.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/math/hypot.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -15,6 +15,7 @@
  * inflicting too much of a performance hit.
  *
  */
+#include "precomp.h"
 
 #include <float.h>
 #include <math.h>

Modified: trunk/reactos/lib/crt/mbstring/mbbtype.c
--- trunk/reactos/lib/crt/mbstring/mbbtype.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/mbstring/mbbtype.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -8,7 +8,8 @@
  *              12/04/99: Created
  */
 
-#include <stdio.h>
+#include "precomp.h"
+
 #include <mbstring.h>
 #include <mbctype.h>
 

Modified: trunk/reactos/lib/crt/mbstring/mbsdec.c
--- trunk/reactos/lib/crt/mbstring/mbsdec.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/mbstring/mbsdec.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "precomp.h"
 #include <mbstring.h>
 
 /*

Modified: trunk/reactos/lib/crt/misc/amsg.c
--- trunk/reactos/lib/crt/misc/amsg.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/misc/amsg.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -8,10 +8,8 @@
  *              28/12/98: Created
  */
 
-#include <stdlib.h>
-#include <stdio.h>
+#include "precomp.h"
 
-
 static char *__rt_err_msg[] =
 {
    "stack overflow",				/* _RT_STACK */

Modified: trunk/reactos/lib/crt/misc/environ.c
--- trunk/reactos/lib/crt/misc/environ.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/misc/environ.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -9,7 +9,6 @@
 #include <internal/tls.h>
 #include <stdlib.h>
 #include <string.h>
-#include <internal/file.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/lib/crt/precomp.h
--- trunk/reactos/lib/crt/precomp.h	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/precomp.h	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,13 @@
-#define CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE
 #define _INC_WTIME_INL
 #define _INC_UTIME_INL
 #define _INC_TIME_INL
 
+#include <stdio.h>
+#include <errno.h>
+#include <malloc.h>
+#include <math.h>
+
 #define WIN32_NO_STATUS
 #include <windows.h>
 #define NTOS_MODE_USER
@@ -11,3 +16,6 @@
 #if !defined(_MSC_VER)
   #include <stdint.h>
 #endif
+
+/* This file is a hack and should for the most part go away */
+#include <internal/file.h>

Modified: trunk/reactos/lib/crt/process/_cwait.c
--- trunk/reactos/lib/crt/process/_cwait.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/process/_cwait.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -9,11 +9,7 @@
  */
 
 #include "precomp.h"
-#include <process.h>
-#include <errno.h>
-#include <internal/file.h>
 
-
 /*
  * @implemented
  */

Modified: trunk/reactos/lib/crt/process/_system.c
--- trunk/reactos/lib/crt/process/_system.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/process/_system.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -14,7 +14,6 @@
 #include <string.h>
 #include <process.h>
 #include <errno.h>
-#include <internal/file.h>
 
 /*
  * @implemented

Modified: trunk/reactos/lib/crt/process/process.c
--- trunk/reactos/lib/crt/process/process.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/process/process.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,9 +1,5 @@
 #include "precomp.h"
 #include <process.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <internal/file.h>
 #include <tchar.h>
 
 #define NDEBUG

Modified: trunk/reactos/lib/crt/process/thread.c
--- trunk/reactos/lib/crt/process/thread.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/process/thread.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,7 +1,4 @@
 #include "precomp.h"
-#include <errno.h>
-#include <process.h>
-#include <internal/file.h>
 
 #if 0
 /*

Modified: trunk/reactos/lib/crt/process/threadx.c
--- trunk/reactos/lib/crt/process/threadx.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/process/threadx.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,9 +1,5 @@
 #include "precomp.h"
-#include <errno.h>
-#include <process.h>
-#include <internal/file.h>
 
-
 /*
  * @unimplemented
  */

Modified: trunk/reactos/lib/crt/signal/signal.c
--- trunk/reactos/lib/crt/signal/signal.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/signal/signal.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-#include <internal/file.h>
 
 void _default_handler(int signal);
 

Modified: trunk/reactos/lib/crt/stdio/allocfil.c
--- trunk/reactos/lib/crt/stdio/allocfil.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/stdio/allocfil.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,12 +1,6 @@
 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <internal/file.h>
 
-
-
 char __validfp (FILE *f)
 {
 	if ( (unsigned int)f < 256)

Modified: trunk/reactos/lib/crt/stdio/clearerr.c
--- trunk/reactos/lib/crt/stdio/clearerr.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/stdio/clearerr.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,10 +1,6 @@
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
-#include <stdio.h>
-#include <errno.h>
-#include <internal/file.h>
 
-
 #ifdef clearerr
 #undef clearerr
 void clearerr(FILE *stream);

Modified: trunk/reactos/lib/crt/stdio/fclose.c
--- trunk/reactos/lib/crt/stdio/fclose.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/stdio/fclose.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,13 +1,7 @@
 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <io.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <internal/file.h>
 
 
 // changed check for writable stream

Modified: trunk/reactos/lib/crt/stdio/fdopen.c
--- trunk/reactos/lib/crt/stdio/fdopen.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/stdio/fdopen.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,6 @@
 #include "precomp.h"
 
-#include <stdio.h>
 #include <tchar.h>
-#include <internal/file.h>
 
 /*
  * @implemented

Modified: trunk/reactos/lib/crt/stdio/feof.c
--- trunk/reactos/lib/crt/stdio/feof.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/stdio/feof.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,8 +1,5 @@
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
-#include <stdio.h>
-#include <errno.h>
-#include <internal/file.h>
 
 #ifdef feof
 #undef feof

Modified: trunk/reactos/lib/crt/stdio/ferror.c
--- trunk/reactos/lib/crt/stdio/ferror.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/stdio/ferror.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -1,7 +1,5 @@
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
-#include <stdio.h>
-#include <internal/file.h>
 
 #ifdef ferror
 #undef ferror

Modified: trunk/reactos/lib/crt/stdio/fflush.c
--- trunk/reactos/lib/crt/stdio/fflush.c	2005-11-25 17:13:40 UTC (rev 19563)
+++ trunk/reactos/lib/crt/stdio/fflush.c	2005-11-25 18:05:42 UTC (rev 19564)
@@ -11,16 +11,9 @@
 /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
 #include "precomp.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <stdlib.h>
-#include <io.h>
-#include <internal/file.h>
 
-
 /*
[truncated at 1000 lines; 2157 more skipped]