summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/include/wchar.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/include/wchar.h')
-rw-r--r--winsup/mingw/include/wchar.h128
1 files changed, 97 insertions, 31 deletions
diff --git a/winsup/mingw/include/wchar.h b/winsup/mingw/include/wchar.h
index d2bc09415..9d598e80e 100644
--- a/winsup/mingw/include/wchar.h
+++ b/winsup/mingw/include/wchar.h
@@ -69,36 +69,87 @@ struct _wfinddata_t {
_fsize_t size;
wchar_t name[FILENAME_MAX]; /* may include spaces. */
};
+struct _wfinddatai64_t {
+ unsigned attrib;
+ time_t time_create;
+ time_t time_access;
+ time_t time_write;
+ __int64 size;
+ wchar_t name[FILENAME_MAX];
+};
#define _WFINDDATA_T_DEFINED
#endif
/* Wide character versions. Also defined in io.h. */
/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
applies to other wide character versions? */
-int _waccess(const wchar_t *, int);
-int _wchmod(const wchar_t *, int);
-int _wcreat(const wchar_t *, int);
-long _wfindfirst(wchar_t *, struct _wfinddata_t *);
+#if !defined (_WIO_DEFINED)
+#if defined (__MSVCRT__)
+int _waccess(const wchar_t*, int);
+int _wchmod(const wchar_t*, int);
+int _wcreat(const wchar_t*, int);
+long _wfindfirst(wchar_t*, struct _wfinddata_t *);
int _wfindnext(long, struct _wfinddata_t *);
-int _wunlink(const wchar_t *);
-int _wrename(const wchar_t *, const wchar_t *);
-int _wremove (const wchar_t *);
-int _wopen(const wchar_t *, int, ...);
-int _wsopen(const wchar_t *, int, int, ...);
-wchar_t * _wmktemp(wchar_t *);
+int _wunlink(const wchar_t*);
+int _wopen(const wchar_t*, int, ...);
+int _wsopen(const wchar_t*, int, int, ...);
+wchar_t * _wmktemp(wchar_t*);
+long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
+int _wfindnexti64(long, struct _wfinddatai64_t*);
+#endif /* defined (__MSVCRT__) */
+#define _WIO_DEFINED
+#endif /* _WIO_DEFINED */
+
+#ifndef _WSTDIO_DEFINED
+/* also in stdio.h - keep in sync */
+int fwprintf (FILE*, const wchar_t*, ...);
+int wprintf (const wchar_t*, ...);
+int swprintf (wchar_t*, const wchar_t*, ...);
+int vfwprintf (FILE*, const wchar_t*, va_list);
+int vwprintf (const wchar_t*, va_list);
+int vswprintf (wchar_t*, const wchar_t*, va_list);
+int fwscanf (FILE*, const wchar_t*, ...);
+int wscanf (const wchar_t*, ...);
+int swscanf (wchar_t*, const wchar_t*, ...);
+wint_t fgetwc (FILE*);
+wint_t fputwc (wchar_t, FILE*);
+wint_t ungetwc (wchar_t, FILE*);
+
+#ifdef __MSVCRT__
+wchar_t* fgetws (wchar_t*, int, FILE*);
+int fputws (const wchar_t*, FILE*);
+wint_t getwc (FILE*);
+wint_t getwchar (void);
+wchar_t* _getws (wchar_t*);
+wint_t putwc (wint_t, FILE*);
+int _putws (const wchar_t*);
+wint_t putwchar (wint_t);
+
+FILE* _wfopen (const wchar_t*, const wchar_t*);
+FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
+FILE* _wfsopen(const wchar_t*, const wchar_t*, int);
+wchar_t* _wtmpnam (wchar_t*);
+wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
+int _wrename(const wchar_t*, const wchar_t*);
+int _wremove (const wchar_t*)
+
+FILE* _wpopen(const wchar_t*, const wchar_t*)
+void _wperror(const wchar_t*);
+#endif /* __MSVCRT__ */
+#define _WSTDIO_DEFINED
+#endif /* _WSTDIO_DEFINED */
#ifndef _WDIRECT_DEFINED
-
/* Also in direct.h */
-
+#ifdef __MSVCRT__
int _wchdir(const wchar_t*);
wchar_t* _wgetcwd(wchar_t*, int);
wchar_t* _wgetdcwd(int, wchar_t*, int);
int _wmkdir(const wchar_t*);
int _wrmdir(const wchar_t*);
-
+#endif /* __MSVCRT__ */
#define _WDIRECT_DEFINED
-#endif
+#endif /* _WDIRECT_DEFINED */
#ifndef _STAT_DEFINED
/*
@@ -139,41 +190,56 @@ struct stat
time_t st_mtime; /* Modified time */
time_t st_ctime; /* Creation time */
};
-
+#if defined (__MSVCRT__)
+struct _stati64 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ __int64 st_size;
+ time_t st_atime;
+ time_t st_mtime;
+ time_t st_ctime;
+ };
+#endif /* __MSVCRT__ */
#define _STAT_DEFINED
#endif /* _STAT_DEFINED */
-#ifndef _WSTAT_DEFINED
-
+#if !defined ( _WSTAT_DEFINED)
/* also declared in sys/stat.h */
-
-int _wstat(const wchar_t *, struct _stat *);
-
+#if defined __MSVCRT__
+int _wstat(const wchar_t*, struct _stat*);
+int _wstati64 (const wchar_t*, struct _stati64*);
+#endif /* __MSVCRT__ */
#define _WSTAT_DEFINED
-#endif /* _WSTAT_DEFINED */
+#endif /* ! _WSTAT_DEFIND */
#ifndef _WTIME_DEFINED
#ifdef __MSVCRT__
-
/* wide function prototypes, also declared in time.h */
-
wchar_t * _wasctime(const struct tm*);
wchar_t * _wctime(const time_t*);
wchar_t* _wstrdate(wchar_t*);
wchar_t* _wstrtime(wchar_t*);
-
#endif /* __MSVCRT__ */
-
size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*);
-
#define _WTIME_DEFINED
#endif /* _WTIME_DEFINED */
+#ifndef _WLOCALE_DEFINED /* also declared in locale.h */
+wchar_t* _wsetlocale(int, const wchar_t*);
+#define _WLOCALE_DEFINED
+#endif
+
#ifndef _NO_OLDNAMES
-/* Wide character versions. Also declared in wchar.h. */
-/* CHECK: Are these in the olnames??? */
+/* Wide character versions. Also declared in io.h. */
+/* CHECK: Are these in the oldnames??? NO! */
+#if (0)
int waccess(const wchar_t *, int);
int wchmod(const wchar_t *, int);
int wcreat(const wchar_t *, int);
@@ -185,7 +251,7 @@ int wremove (const wchar_t *);
int wopen(const wchar_t *, int, ...);
int wsopen(const wchar_t *, int, int, ...);
wchar_t * wmktemp(wchar_t *);
-
+#endif
#endif /* _NO_OLDNAMES */
#endif /* not __STRICT_ANSI__ */
@@ -202,8 +268,8 @@ size_t wcrtomb(char *, wchar_t, mbstate_t *);
size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
int wctob(wint_t);
-#ifdef __cplusplus
-}
+#ifdef __cplusplus
+} /* end of extern "C" */
#endif
#endif /* Not RC_INVOKED */