summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/include/io.h
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2004-03-26 11:30:24 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2004-03-26 11:30:24 +0000
commitff9f5c83307da538c7e00fcbd06a2ae5ce75bf79 (patch)
tree7e939d187e592f5e3ab8aa7e8ed2b03a8ea01af9 /winsup/mingw/include/io.h
parent27ec638b258b73c00cc9a7d8dc147d3a0579f300 (diff)
downloadcygnal-ff9f5c83307da538c7e00fcbd06a2ae5ce75bf79.tar.gz
cygnal-ff9f5c83307da538c7e00fcbd06a2ae5ce75bf79.tar.bz2
cygnal-ff9f5c83307da538c7e00fcbd06a2ae5ce75bf79.zip
Add prototypes for new msvcrt.dll versions
* include/_mingw.h (__MSVCRT_VERSION__): Define default as 0x0600. * include/time.h (__time64_t): Add typedef. (_mktime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601. (_ctime64): Likewise. (_wctime64): Likewise. (_gmtime64): Likewise. (_localtime64): Likewise. (wcsftime): Move into _WTIME_DEFINED block. Regroup non-ANSI prototypes. * include/io.h: Include <stdint.h>. (__finddata64_t): Add struct definition. (__wfinddata64_t): Likewise. (_findfirst64): Add prototype for __MSVCRT_VERSION__ >= 0x0601. (_findnext64): Likewise. (_wfindfirst64): Likewise. (_wfindnext64): Likewise. * include/sys/timeb.h (__timeb64): Add struct definition. (_ftime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601. * include/sys/utime.h (__utimbuf64): Add struct definition. (_utime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601. (_futime64): Likewise. (_wutime64): Likewise. * include/sys/stat.h (__stat64): Add struct definition. (_fstat64): Add prototype for __MSVCRT_VERSION__ >= 0x0601. (_stat64): Likewise. (_wstat64): Likwise. * include/sys/types.h (__time64_t): Add typedef. * include/wchar.h (__wfinddata64_t): Add structure definition. (__stat64): Likewise. (_wctime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601. (_wfindfirst64): Likewise. (_wfindnext64): Likewise. (_wutime64): Likewise. (_wstat64): Likwise. * include/malloc.h (_aligned_free): Add prototype for __MSVCRT_VERSION__ >= 0x0700. (_aligned_malloc): Likewise. (_aligned_offset_malloc): Likewise. (_aligned_offset_realloc): Likewise. (_aligned_realloc): Likewise. * include/string.h (_wcserror): Add prototype for __MSVCRT_VERSION__ >= 0x0700. (__wcserror): Likewise. * include/math.h (_set_SSE2_enable): Add prototype for __MSVCRT_VERSION__ >= 0x0701.
Diffstat (limited to 'winsup/mingw/include/io.h')
-rw-r--r--winsup/mingw/include/io.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/winsup/mingw/include/io.h b/winsup/mingw/include/io.h
index 433aa57ab..83498044f 100644
--- a/winsup/mingw/include/io.h
+++ b/winsup/mingw/include/io.h
@@ -33,7 +33,8 @@
* NOTE: This also defines off_t, the file offset type, through
* an inclusion of sys/types.h */
-#include <sys/types.h> /* To get time_t. */
+#include <sys/types.h> /* To get time_t. */
+#include <stdint.h> /* For intptr_t. */
/*
* Attributes of files as returned by _findfirst et al.
@@ -86,6 +87,14 @@ struct _finddatai64_t {
char name[FILENAME_MAX];
};
+struct __finddata64_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ _fsize_t size;
+ char name[FILENAME_MAX];
+};
#ifndef _WFINDDATA_T_DEFINED
struct _wfinddata_t {
@@ -96,6 +105,7 @@ struct _wfinddata_t {
_fsize_t size;
wchar_t name[FILENAME_MAX]; /* may include spaces. */
};
+
struct _wfinddatai64_t {
unsigned attrib;
time_t time_create;
@@ -105,6 +115,15 @@ struct _wfinddatai64_t {
wchar_t name[FILENAME_MAX];
};
+struct __wfinddata64_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ _fsize_t size;
+ wchar_t name[FILENAME_MAX];
+};
+
#define _WFINDDATA_T_DEFINED
#endif
@@ -118,6 +137,7 @@ extern "C" {
* _findclose calls. _findnext also returns -1 if no match could be found,
* and 0 if a match was found. Call _findclose when you are finished.
*/
+/* FIXME: Should these all use intptr_t, as per recent MSDN docs? */
_CRTIMP int __cdecl _findfirst (const char*, struct _finddata_t*);
_CRTIMP int __cdecl _findnext (int, struct _finddata_t*);
_CRTIMP int __cdecl _findclose (int);
@@ -129,16 +149,19 @@ _CRTIMP char* __cdecl _mktemp (char*);
_CRTIMP int __cdecl _rmdir (const char*);
_CRTIMP int __cdecl _chmod (const char*, int);
-
#ifdef __MSVCRT__
_CRTIMP __int64 __cdecl _filelengthi64(int);
_CRTIMP long __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
_CRTIMP int __cdecl _findnexti64(long, struct _finddatai64_t*);
_CRTIMP __int64 __cdecl _lseeki64(int, __int64, int);
_CRTIMP __int64 __cdecl _telli64(int);
+/* These require newer versions of msvcrt.dll (6.1 or higher). */
+#if __MSVCRT_VERSION__ >= 0x0601
+_CRTIMP intptr_t __cdecl _findfirst64(const char*, struct __finddata64_t*);
+_CRTIMP intptr_t __cdecl _findnext64(intptr_t, struct __finddata64_t*);
+#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#endif /* __MSVCRT__ */
-
#ifndef _NO_OLDNAMES
#ifndef _UWIN
@@ -162,7 +185,6 @@ _CRTIMP int __cdecl chmod (const char*, int);
* it the same as FOPEN_MAX. */
#define HANDLE_MAX FOPEN_MAX
-
/* Some defines for _access nAccessMode (MS doesn't define them, but
* it doesn't seem to hurt to add them). */
#define F_OK 0 /* Check for file existence */
@@ -238,6 +260,10 @@ _CRTIMP int __cdecl _wsopen(const wchar_t*, int, int, ...);
_CRTIMP wchar_t * __cdecl _wmktemp(wchar_t*);
_CRTIMP long __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
_CRTIMP int __cdecl _wfindnexti64(long, struct _wfinddatai64_t*);
+#if __MSVCRT_VERSION__ >= 0x0601
+_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
+_CRTIMP intptr_t __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t*);
+#endif
#endif /* defined (__MSVCRT__) */
#define _WIO_DEFINED
#endif /* _WIO_DEFINED */