Hi all,
Here are the libstdc++ cleanups possible because of the previous
libmingxex commits.
Cheers,
Pedro Alves
src/gcc/libstdc++-v3/ChangeLog.ce:
2006-11-12 Pedro Alves <[EMAIL PROTECTED]>
* config/io/basic_file_stdio.cc (__gnu_internal::read,
__gnu_internal::write, __gnu_internal::lseek,
__gnu_internal::fdopen): Delete.
(__basic_file<char>::sys_open): Fix typo.
Index: config/io/basic_file_stdio.cc
===================================================================
--- config/io/basic_file_stdio.cc (revision 750)
+++ config/io/basic_file_stdio.cc (working copy)
@@ -73,56 +73,12 @@
#include <limits> // For <off_t>::max() and min() and <streamsize>::max()
-
#ifdef __MINGW32CE__
#include <windows.h>
#endif
namespace __gnu_internal
-{
-#ifdef __MINGW32CE__
- static int read(int fildes, char* buf, size_t bufsize)
- {
- DWORD NumberOfBytesRead;
- if (!::ReadFile((HANDLE)fildes, (LPVOID)buf, bufsize, &NumberOfBytesRead,
NULL))
- return -1;
- return (int)NumberOfBytesRead;
- }
-
- static int write(int fildes, const char* buf, size_t bufsize)
- {
- DWORD NumberOfBytesWritten;
- if (!::WriteFile((HANDLE)fildes, (LPVOID)buf, bufsize,
&NumberOfBytesWritten, NULL))
- return -1;
- return (int)NumberOfBytesWritten;
- }
-
- static off_t lseek(int fildes, off_t offset, int whence)
- {
- DWORD mode = 0;
- switch (whence)
- {
- case SEEK_SET: mode = FILE_BEGIN; break;
- case SEEK_CUR: mode = FILE_CURRENT; break;
- case SEEK_END: mode = FILE_END; break;
- }
- return (off_t)SetFilePointer((HANDLE)fildes, offset, NULL, mode);
- }
-
- FILE* fdopen(int fildes, const char* mode)
- {
- size_t size = strlen (mode) + 1;
- /* Avoid exception using malloc. */
- wchar_t* wmode = (wchar_t*)malloc(size * sizeof (wchar_t));
- if (!wmode)
- return 0;
- mbstowcs(wmode, mode, size);
- FILE* f = _wfdopen(fildes, wmode);
- free (wmode);
- return f;
- }
-#endif
-
+{
// Map ios_base::openmode flags to a string for use in fopen().
// Table of valid combinations as given in [lib.filebuf.members]/2.
static const char*
@@ -278,7 +234,7 @@
_M_cfile_created = true;
#ifndef __MINGW32CE__
char* __buf = NULL;
- /* Fildes on WinCE are handles, and HANDLE == 0 is not stdout. */
+ /* Fildes on WinCE are handles, and HANDLE == 0 is not stdin. */
if (__fd == 0)
setvbuf(_M_cfile, __buf, _IONBF, 0);
#endif
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cegcc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel