Diff of /include/sys/utime.h [092820] .. [aae1b3]  Maximize  Restore

  Switch to side-by-side view

--- a/include/sys/utime.h
+++ b/include/sys/utime.h
@@ -8,11 +8,11 @@
  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  * and/or sell copies of the Software, and to permit persons to whom the
  * Software is furnished to do so, subject to the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice (including the next
  * paragraph) shall be included in all copies or substantial portions of the
  * Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -36,6 +36,7 @@
 /*
  * Structure used by _utime function.
  */
+#ifndef _UTIMBUF_DEFINED
 struct _utimbuf
 {
 	time_t	actime;		/* Access time */
@@ -46,6 +47,11 @@
 	__time32_t actime;
 	__time32_t modtime;
 };
+struct __utimbuf64
+{
+	__time64_t actime;
+	__time64_t modtime;
+};
 
 
 #ifndef	_NO_OLDNAMES
@@ -55,49 +61,94 @@
 	time_t	actime;
 	time_t	modtime;
 };
+struct utimbuf32
+{
+    __time32_t actime;
+    __time32_t modtime;
+};
 #endif	/* Not _NO_OLDNAMES */
+#define _UTIMBUF_DEFINED
+#endif /* ndef _UTIMBUF_DEFINED */
 
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
-_CRTIMP int __cdecl __MINGW_NOTHROW	_utime (const char*, struct _utimbuf*);
-
 #ifndef	_NO_OLDNAMES
+#ifdef _USE_32BIT_TIME_T
 _CRTIMP int __cdecl __MINGW_NOTHROW	utime (const char*, struct utimbuf*);
+#else
+#define utime _utime
+#endif
 #endif	/* Not _NO_OLDNAMES */
 
-_CRTIMP int __cdecl __MINGW_NOTHROW	_futime (int, struct _utimbuf*);
-
-/* The wide character version, only available for MSVCRT versions of the
- * C runtime library. */
-_CRTIMP int __cdecl __MINGW_NOTHROW	_wutime (const wchar_t*, struct _utimbuf*);
-
-/* These require newer versions of msvcrt.dll (6.10 or higher).  */ 
-struct __utimbuf64
-{
-	__time64_t actime;
-	__time64_t modtime;
-};
-
 _CRTIMP int __cdecl __MINGW_NOTHROW	_utime64 (const char*, struct __utimbuf64*);
-_CRTIMP int __cdecl __MINGW_NOTHROW	_wutime64 (const wchar_t*, struct __utimbuf64*);
 _CRTIMP int __cdecl __MINGW_NOTHROW	_futime64 (int, struct __utimbuf64*);
 
+#if MSVCRT_VERSION >= 800
 _CRTIMP int __cdecl __MINGW_NOTHROW	_utime32 (const char*, struct __utimbuf32*);
-_CRTIMP int __cdecl __MINGW_NOTHROW	_wutime32 (const wchar_t*, struct __utimbuf32*);
 _CRTIMP int __cdecl __MINGW_NOTHROW	_futime32 (int, struct __utimbuf32*);
 
+#else
+_CRTIMP int __cdecl __MINGW_NOTHROW	_utime (const char*, struct _utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _utime32 (const char* _v1, struct __utimbuf32* _v2) {
+    return _utime(_v1, _v2);
+}
+
+_CRTIMP int __cdecl __MINGW_NOTHROW	_futime (int, struct _utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _futime32 (int _v1, struct __utimbuf32* _v2) {
+    return _futime(_v1, _v2);
+}
+
+#endif
+
 #ifndef _USE_32BIT_TIME_T
-_CRTALIAS int __cdecl __MINGW_NOTHROW	_utime (const char* _v1, struct _utimbuf* _v2)	   { return(_utime64  (_v1,(struct __utimbuf64*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW	_wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime64 (_v1,(struct __utimbuf64*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW	_futime (int _v1, struct _utimbuf* _v2)		   { return(_futime64 (_v1,(struct __utimbuf64*)_v2)); }
-#else
+_CRTALIAS int __cdecl __MINGW_NOTHROW	_utime (const char* _v1, struct _utimbuf* _v2) {
+    return(_utime64  (_v1,(struct __utimbuf64*)_v2));
+}
+_CRTALIAS int __cdecl __MINGW_NOTHROW	_futime (int _v1, struct _utimbuf* _v2) {
+    return(_futime64 (_v1,(struct __utimbuf64*)_v2));
+}
 
-_CRTALIAS int __cdecl __MINGW_NOTHROW	_utime (const char* _v1, struct _utimbuf* _v2)	   { return(_utime32  (_v1,(struct __utimbuf32*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW	_wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime32 (_v1,(struct __utimbuf32*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW	_futime (int _v1, struct _utimbuf* _v2)		   { return(_futime32 (_v1,(struct __utimbuf32*)_v2)); }
-#endif
+#else /* def _USE_32BIT_TIME_T */
+#if MSVCRT_VERSION >= 800
+_CRTALIAS int __cdecl __MINGW_NOTHROW	_utime (const char* _v1, struct _utimbuf* _v2) {
+    return(_utime32  (_v1,(struct __utimbuf32*)_v2));
+}
+_CRTALIAS int __cdecl __MINGW_NOTHROW	_futime (int _v1, struct _utimbuf* _v2)	{
+    return(_futime32 (_v1,(struct __utimbuf32*)_v2));
+}
+#endif /* MSVCRT_VERSION >= 800 */
+
+#endif /* ndef _USE_32BIT_TIME_T */
+
+#ifndef _WUTIME_DEFINED
+_CRTIMP int __cdecl __MINGW_NOTHROW	_wutime64 (const wchar_t*, struct __utimbuf64*);
+#if MSVCRT_VERSION >= 800
+_CRTIMP int __cdecl __MINGW_NOTHROW	_wutime32 (const wchar_t*, struct __utimbuf32*);
+
+#else /* MSVCRT_VERSION < 800 */
+_CRTIMP int __cdecl __MINGW_NOTHROW	_wutime (const wchar_t*, struct _utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t* _v1, struct __utimbuf32* _v2) {
+    return _wutime(_v1, _v2);
+}
+
+#endif /* MSVCRT_VERSION >= 800 */
+#ifdef _USE_32BIT_TIME_T
+#if MSVCRT_VERSION >= 800
+_CRTALIAS int __cdecl __MINGW_NOTHROW	_wutime (const wchar_t* _v1, struct _utimbuf* _v2) {
+    return(_wutime32 (_v1,(struct __utimbuf32*)_v2));
+}
+#endif /* MSVCRT_VERSION >= 800 */
+
+#else /* ndef _USE_32BIT_TIME_T */
+_CRTALIAS int __cdecl __MINGW_NOTHROW	_wutime (const wchar_t* _v1, struct _utimbuf* _v2) {
+    return(_wutime64 (_v1,(struct __utimbuf64*)_v2));
+}
+
+#endif /* def _USE_32BIT_TIME_T */
+#define _WUTIME_DEFINED
+#endif /* ndef _WUTIME_DEFINED */
 
 #ifdef	__cplusplus
 }
@@ -105,4 +156,4 @@
 
 #endif	/* Not RC_INVOKED */
 
-#endif	/* Not _UTIME_H_ */
+#endif	/* Not _UTIME_H_ */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks