diff --git a/reactos/lib/crtdll/stdio/allocfil.c b/reactos/lib/crtdll/stdio/allocfil.c index e438eb816a3..aea7a3ce75b 100644 --- a/reactos/lib/crtdll/stdio/allocfil.c +++ b/reactos/lib/crtdll/stdio/allocfil.c @@ -3,8 +3,7 @@ #include #include #include -//#include -//#include + FILE * __alloc_file(void); diff --git a/reactos/lib/crtdll/stdio/fclose.c b/reactos/lib/crtdll/stdio/fclose.c index 4b00dc818ae..a4cc4f68911 100644 --- a/reactos/lib/crtdll/stdio/fclose.c +++ b/reactos/lib/crtdll/stdio/fclose.c @@ -1,11 +1,10 @@ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -//#include #include #include #include #include #include -//#include + #include #ifndef __dj_include_stdio_h_ diff --git a/reactos/lib/crtdll/stdio/fputs.c b/reactos/lib/crtdll/stdio/fputs.c index 60b030b4b33..be90a5ed787 100644 --- a/reactos/lib/crtdll/stdio/fputs.c +++ b/reactos/lib/crtdll/stdio/fputs.c @@ -35,7 +35,7 @@ fputs(const char *s, FILE *f) return(r); */ int r = 0; - if ( !WriteFile(filehnd(f->_file),s,strlen(s),&r,NULL) ) + if ( !WriteFile(_get_osfhandle(f->_file),s,strlen(s),&r,NULL) ) return -1; return r; diff --git a/reactos/lib/crtdll/stdio/getc.c b/reactos/lib/crtdll/stdio/getc.c index 4ce616df089..048ddc9b931 100644 --- a/reactos/lib/crtdll/stdio/getc.c +++ b/reactos/lib/crtdll/stdio/getc.c @@ -8,7 +8,7 @@ int getc(FILE *f) { int c; DWORD NumberOfBytesRead; - if ( !ReadFile(filehnd(f->_file),&c, 1, &NumberOfBytesRead, NULL) ) + if ( !ReadFile(_get_osfhandle(f->_file),&c, 1, &NumberOfBytesRead, NULL) ) return -1; if ( NumberOfBytesRead == 0 ) return -1; diff --git a/reactos/lib/crtdll/stdio/putc.c b/reactos/lib/crtdll/stdio/putc.c index 7db1d620ab1..447568e8344 100644 --- a/reactos/lib/crtdll/stdio/putc.c +++ b/reactos/lib/crtdll/stdio/putc.c @@ -21,7 +21,7 @@ int putc(int c, FILE *fp) } return(_flsbuf(c,fp)); } - if ( !WriteFile(filehnd(fp->_file),&c,1,&r,NULL) ) + if ( !WriteFile(_get_osfhandle(fp->_file),&c,1,&r,NULL) ) return -1; return r; diff --git a/reactos/lib/crtdll/stdio/puts.c b/reactos/lib/crtdll/stdio/puts.c index 6df4b63a4e3..0edc6c1e865 100644 --- a/reactos/lib/crtdll/stdio/puts.c +++ b/reactos/lib/crtdll/stdio/puts.c @@ -14,7 +14,7 @@ puts(const char *s) return putchar('\n'); */ int r = 0; - if ( !WriteFile(filehnd(stdout->_file),s,strlen(s),&r,NULL) ) + if ( !WriteFile(_get_osfhandle(stdout->_file),s,strlen(s),&r,NULL) ) return -1; return putchar('\n');; diff --git a/reactos/lib/crtdll/stdio/remove.c b/reactos/lib/crtdll/stdio/remove.c index 6003fb1981b..5230ada3efc 100644 --- a/reactos/lib/crtdll/stdio/remove.c +++ b/reactos/lib/crtdll/stdio/remove.c @@ -1,4 +1,5 @@ #include +#include int remove(const char *fn) { @@ -6,4 +7,4 @@ int remove(const char *fn) return -1; return 0; } - \ No newline at end of file + diff --git a/reactos/lib/crtdll/stdio/rename.c b/reactos/lib/crtdll/stdio/rename.c index d4b1ecbcbe1..fb471a39be9 100644 --- a/reactos/lib/crtdll/stdio/rename.c +++ b/reactos/lib/crtdll/stdio/rename.c @@ -2,12 +2,9 @@ #include #include -int rename(const char *old, const char *new) -{ - return _rename(old,new); -} -int _rename(const char *old, const char *new) + +int rename(const char *old, const char *new) { if ( !MoveFile(old,new) ) return -1;