Index: trunk/src/emx/ChangeLog.LIBC
===================================================================
--- trunk/src/emx/ChangeLog.LIBC	(revision 2119)
+++ trunk/src/emx/ChangeLog.LIBC	(revision 2120)
@@ -1,3 +1,8 @@
 /* $Id$ */
+
+2005-06-30: knut st. osmundsen <bird-gccos2-spam@anduin.net>
+    - libc:
+        o Added fwide() (dummy until LIBC07).
+        o Renamed struct _FILE to struct __sFILE to match BSD.
 
 2005-06-29: knut st. osmundsen <bird-gccos2-spam@anduin.net>
Index: trunk/src/emx/include/emx/io.h
===================================================================
--- trunk/src/emx/include/emx/io.h	(revision 2119)
+++ trunk/src/emx/include/emx/io.h	(revision 2120)
@@ -176,5 +176,5 @@
     struct streamvec *pPrev;
     /** Array of file stream structure. */
-    struct _FILE     *aFiles;
+    struct __sFILE     *aFiles;
     /** Pointer to the next entry in the list */
     struct streamvec *pNext;
@@ -212,7 +212,7 @@
 #if defined (__FILE_FSEM_DECLARED)
 
-int __stream_abort(struct _FILE *f, const char *pszMsg);
-
-static int __inline__ stream_validate(struct _FILE *stream)
+int __stream_abort(struct __sFILE *f, const char *pszMsg);
+
+static int __inline__ stream_validate(struct __sFILE *stream)
 {
     if (stream->__uVersion != _FILE_STDIO_VERSION)
@@ -224,5 +224,5 @@
 }
 
-static int __inline__ stream_lock(struct _FILE *stream)
+static int __inline__ stream_lock(struct __sFILE *stream)
 {
     if (!stream_validate(stream))
@@ -243,5 +243,5 @@
 }
 
-static int __inline__ stream_trylock(struct _FILE *stream)
+static int __inline__ stream_trylock(struct __sFILE *stream)
 {
     if (!stream_validate(stream))
@@ -262,5 +262,5 @@
 }
 
-static int __inline__ stream_unlock(struct _FILE *stream)
+static int __inline__ stream_unlock(struct __sFILE *stream)
 {
     if (!stream_validate(stream))
@@ -498,23 +498,23 @@
 
 
-int _endbuf1 (struct _FILE *);
-void _fbuf (struct _FILE *);
+int _endbuf1 (struct __sFILE *);
+void _fbuf (struct __sFILE *);
 #define _fd_flags(a)        please do not use this use this! ##a
 #define _fd_init(a)         please do not use this use this! ##a
 #define _fd_lookahead(a)    please do not use this use this! ##a
-struct _FILE *_openstream (struct _FILE *, __const__ char *, __const__ char *,
+struct __sFILE *_openstream (struct __sFILE *, __const__ char *, __const__ char *,
     int, int);
-int _flushstream (struct _FILE *, int);
-void _closestream (struct _FILE *);
-int _fseek_unlocked (struct _FILE *, off_t, int);
-off_t _ftello_unlocked (struct _FILE *);
-int _input (struct _FILE *, __const__ char *, char *);
-struct _FILE *_newstream (void);
-int _output (struct _FILE *, __const__ char *, char *);
+int _flushstream (struct __sFILE *, int);
+void _closestream (struct __sFILE *);
+int _fseek_unlocked (struct __sFILE *, off_t, int);
+off_t _ftello_unlocked (struct __sFILE *);
+int _input (struct __sFILE *, __const__ char *, char *);
+struct __sFILE *_newstream (void);
+int _output (struct __sFILE *, __const__ char *, char *);
 int _stream_read (int, void *, size_t);
 int _stream_write (int, __const__ void *, size_t);
-int _tmpbuf1 (struct _FILE *, void *);
+int _tmpbuf1 (struct __sFILE *, void *);
 int _trslash (__const__ char *, size_t, int);
-int _ungetc_nolock (int, struct _FILE *);
+int _ungetc_nolock (int, struct __sFILE *);
 int _vsopen (__const__ char *, int, int, char *);
 
Index: trunk/src/emx/include/stdio.h
===================================================================
--- trunk/src/emx/include/stdio.h	(revision 2119)
+++ trunk/src/emx/include/stdio.h	(revision 2120)
@@ -178,6 +178,6 @@
 #define _FILE_T
 #define _FILE_MEMBERS_HAVE_UNDERSCORE
-#define _FILE_STDIO_VERSION     (0x06000000 | sizeof(struct _FILE))
-typedef struct _FILE
+#define _FILE_STDIO_VERSION     (0x06000000 | sizeof(struct __sFILE))
+typedef struct __sFILE
 {
     unsigned __uVersion;
@@ -194,5 +194,5 @@
     unsigned char _ungetc_count;
     short  _mbstate;
-    int    (*_flush)(struct _FILE *, int);
+    int    (*_flush)(struct __sFILE *, int);
 
     /** The Mutex Semaphore. */
Index: trunk/src/emx/include/sys/video.h
===================================================================
--- trunk/src/emx/include/sys/video.h	(revision 2119)
+++ trunk/src/emx/include/sys/video.h	(revision 2120)
@@ -68,5 +68,5 @@
 #define V_SCROLL_CLEAR 4
 
-struct _FILE;
+struct __sFILE;
 
 void v_attrib (int a);
@@ -77,6 +77,6 @@
 void v_delline (int count);
 void v_dimen (int *width, int *height);
-int v_fclose (struct _FILE *stream);
-struct _FILE *v_fopen (void);
+int v_fclose (struct __sFILE *stream);
+struct __sFILE *v_fopen (void);
 int v_getattr (void);
 void v_getctype (int *start, int *end);
Index: trunk/src/emx/include/sys/winmgr.h
===================================================================
--- trunk/src/emx/include/sys/winmgr.h	(revision 2119)
+++ trunk/src/emx/include/sys/winmgr.h	(revision 2120)
@@ -54,5 +54,5 @@
 #endif
 
-struct _FILE;
+struct __sFILE;
 
 typedef struct _wm_window *wm_handle;
@@ -117,6 +117,6 @@
 #endif
 
-int wm_fclose (struct _FILE *stream);
-struct _FILE *wm_fopen (wm_handle wh);
+int wm_fclose (struct __sFILE *stream);
+struct __sFILE *wm_fopen (wm_handle wh);
 
 #if defined (__GNUC__)
Index: trunk/src/emx/include/wchar.h
===================================================================
--- trunk/src/emx/include/wchar.h	(revision 2119)
+++ trunk/src/emx/include/wchar.h	(revision 2120)
@@ -110,5 +110,5 @@
 #endif
 
-/** @todo struct __sFILE;  */
+struct __sFILE;
 struct tm;
 
@@ -120,5 +120,5 @@
 /** @todo wint_t	fputwc(wchar_t, struct __sFILE *); */
 /** @todo int	fputws(const wchar_t * __restrict, struct __sFILE * __restrict); */
-/** @todo int	fwide(struct __sFILE *, int); */
+int	fwide(struct __sFILE *, int);
 /** @todo int	fwprintf(struct __sFILE * __restrict, const wchar_t * __restrict, ...); */
 /** @todo int	fwscanf(struct __sFILE * __restrict, const wchar_t * __restrict, ...); */
Index: trunk/src/emx/src/lib/app/stdio.c
===================================================================
--- trunk/src/emx/src/lib/app/stdio.c	(revision 2119)
+++ trunk/src/emx/src/lib/app/stdio.c	(revision 2120)
@@ -57,5 +57,5 @@
 {
     LIBCLOG_ENTER("\n");
-    struct _FILE       *pFile;
+    FILE               *pFile;
     int                 i;
     static char         fInited = 0;
Index: trunk/src/emx/src/lib/io/_newstre.c
===================================================================
--- trunk/src/emx/src/lib/io/_newstre.c	(revision 2119)
+++ trunk/src/emx/src/lib/io/_newstre.c	(revision 2120)
@@ -54,10 +54,10 @@
      */
     pSV = _hcalloc(1, sizeof(*pSV) + 15
-                   + INC * sizeof(struct _FILE)
+                   + INC * sizeof(FILE)
                    + 15
                    );
     if (pSV)
     {
-        struct _FILE       *pFile;
+        FILE *pFile;
 
         /*
@@ -65,5 +65,5 @@
          * Remember everything is ZEROed by calloc()!
          */
-        pSV->aFiles = pFile = (struct _FILE  *)ALIGN(pSV + 1, 16);
+        pSV->aFiles = pFile = (FILE *)ALIGN(pSV + 1, 16);
         pSV->aFiles         = pFile;
         pSV->cFiles         = INC;
Index: trunk/src/emx/src/lib/io/ungetc.c
===================================================================
--- trunk/src/emx/src/lib/io/ungetc.c	(revision 2119)
+++ trunk/src/emx/src/lib/io/ungetc.c	(revision 2120)
@@ -13,5 +13,5 @@
 /* The implementation of ungetc() has been changed in emx 0.9a fix04
    to fix bugs.  The new implementation adds the `_ungetc_count' field
-   to `struct _FILE'.  Unfortunately, the new implementation must
+   to `struct __sFILE'.  Unfortunately, the new implementation must
    still work with the old getc().  Otherwise, old programs using the
    new dynamic library, and old modules (compiled with the inline
Index: trunk/src/emx/src/lib/libc.def
===================================================================
--- trunk/src/emx/src/lib/libc.def	(revision 2119)
+++ trunk/src/emx/src/lib/libc.def	(revision 2120)
@@ -1746,2 +1746,3 @@
     "__std_fgets_unlocked" @1747
     "__std_gets_unlocked" @1748
+    "__std_fwide" @1749
