Skip to content

Commit

Permalink
Ugrade to version 45
Browse files Browse the repository at this point in the history
  • Loading branch information
mturk committed Mar 3, 2022
1 parent ddbe1de commit 2feb85d
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ For a full list of changes, see the [git commit log][log]

[log]: https://github.com/mturk/cmsc/commits/

## cmsc 15.0_45

* Add missing _ftelli64
* Fix faulty sys/utime.h
* Update cygwrun dependency

## cmsc 15.0_44

* Update cygwrun dependency
Expand Down
2 changes: 1 addition & 1 deletion setenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if not exist "%CmscRootDir%\msvc\bin\build.exe" (
exit /B 1
)
set "WINVER=0x0601"
set "CMSC_VERSION=15044"
set "CMSC_VERSION=15045"
rem
rem Default target is 64-bit Windows
rem
Expand Down
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


```
curl.exe 7.81.0 https://curl.se/windows/dl-7.80.0/curl-7.81.0-win64-mingw.zip
curl.exe 7.81.0 https://curl.se/windows/dl-7.81.0_1/curl-7.81.0_1-win64-mingw.zip
7za.exe 21.07 https://www.7-zip.org/a/7z2107-extra.7z
patch.exe 2.5.9 http://gnuwin32.sourceforge.net
```
Expand Down
2 changes: 1 addition & 1 deletion tools/cmsc15_makedist.bat
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ rem Create distribution .zip
rem
7za a -bd cmsc-%CmscVer%-%CmscArch%.zip %CmscDist%
set "PATH=%CmscDist%\perl\perl\bin;%PATH%"
call shasum.bat -a 512 cmsc-%CmscVer%-%CmscArch%.zip > cmsc-%CmscVer%-%CmscArch%.sha512
call shasum.bat -a 256 cmsc-%CmscVer%-%CmscArch%.zip > cmsc-%CmscVer%-%CmscArch%.sha256
rem
popd
echo.
Expand Down
4 changes: 2 additions & 2 deletions tools/cmsc15_versions.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ rem limitations under the License.
rem
rem Setup environment for Microsoft Compiler Toolkit
rem
set "CmscVer=15.0_44"
set "CmscVer=15.0_45"
set "CmscSys=64"
set "CmscOsv=win7"
set "NasmVer=2.15.05"
set "PerlVer=5.32.1.1"
set "CygwrunVer=1.0.7"
set "CygwrunVer=1.0.8"
set "TclVer=8.6.12"
set "CurlOpts=-qkL --retry 5 --no-progress-meter"
set "WINVER=0x0601"
119 changes: 119 additions & 0 deletions tools/include/crt/sys/utime.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/***
*sys/utime.h - definitions/declarations for utime()
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structure used by the utime routine to set
* new file access and modification times. NOTE - MS-DOS
* does not recognize access time, so this field will
* always be ignored and the modification time field will be
* used to set the new time.
*
* [Public]
*
****/

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef _INC_UTIME
#define _INC_UTIME

#if !defined(_WIN32)
#error ERROR: Only Win32 target supported!
#endif

#include <crtdefs.h>


#ifdef _MSC_VER
#pragma pack(push,_CRT_PACKING)
#endif /* _MSC_VER */

#ifdef __cplusplus
extern "C" {
#endif

/* Define _CRTIMP */

#ifndef _CRTIMP
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* _CRTIMP */


/* define struct used by _utime() function */

#ifndef _UTIMBUF_DEFINED

struct _utimbuf {
time_t actime; /* access time */
time_t modtime; /* modification time */
};

struct __utimbuf32 {
__time32_t actime; /* access time */
__time32_t modtime; /* modification time */
};

#if _INTEGRAL_MAX_BITS >= 64
struct __utimbuf64 {
__time64_t actime; /* access time */
__time64_t modtime; /* modification time */
};
#endif

#if !__STDC__
/* Non-ANSI name for compatibility */
struct utimbuf {
time_t actime; /* access time */
time_t modtime; /* modification time */
};

struct utimbuf32 {
__time32_t actime; /* access time */
__time32_t modtime; /* modification time */
};

#endif /* !__STDC__ */

#define _UTIMBUF_DEFINED
#endif


/* Function Prototypes */

_CRTIMP int __cdecl _utime32(__in_z const char * _Filename, __in_opt struct __utimbuf32 * _Time);

_CRTIMP int __cdecl _futime32(__in int _FileDes, __in_opt struct __utimbuf32 * _Time);

/* Wide Function Prototypes */
_CRTIMP int __cdecl _wutime32(__in_z const wchar_t * _Filename, __in_opt struct __utimbuf32 * _Time);

#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP int __cdecl _utime64(__in_z const char * _Filename, __in_opt struct __utimbuf64 * _Time);
_CRTIMP int __cdecl _futime64(__in int _FileDes, __in_opt struct __utimbuf64 * _Time);
_CRTIMP int __cdecl _wutime64(__in_z const wchar_t * _Filename, __in_opt struct __utimbuf64 * _Time);
#endif


#if !defined(RC_INVOKED) && !defined(__midl)
#include <sys/utime.inl>
#endif

#ifdef __cplusplus
}
#endif

#ifdef _MSC_VER
#pragma pack(pop)
#endif /* _MSC_VER */

#endif /* _INC_UTIME */


89 changes: 89 additions & 0 deletions tools/include/crt/sys/utime.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/***
*utime.inl - inline definitions for time handling functions
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the definition of the _utime() function.
*
* [Public]
*
****/

#pragma once

#if !defined(__CRTDECL)
#if defined(_M_CEE_PURE)
#define __CRTDECL
#else
#define __CRTDECL __cdecl
#endif
#endif

#ifndef _INC_UTIME_INL
#define _INC_UTIME_INL

/* _STATIC_ASSERT is for enforcing boolean/integral conditions at compile time.
Since it is purely a compile-time mechanism that generates no code, the check
is left in even if _DEBUG is not defined. */

#ifndef _STATIC_ASSERT
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ]
#endif

#ifdef _USE_32BIT_TIME_T
static __inline int __CRTDECL _utime(const char * _Filename, struct _utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct _utimbuf) == sizeof(struct __utimbuf32) );
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
}
static __inline int __CRTDECL _futime(int _Desc, struct _utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct _utimbuf) == sizeof(struct __utimbuf32) );
return _futime32(_Desc,(struct __utimbuf32 *)_Utimbuf);
}
static __inline int __CRTDECL _wutime(const wchar_t * _Filename, struct _utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct _utimbuf) == sizeof(struct __utimbuf32) );
return _wutime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
}
#else
static __inline int __CRTDECL _utime(const char * _Filename, struct _utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct _utimbuf) == sizeof(struct __utimbuf64) );
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
}
static __inline int __CRTDECL _futime(int _Desc, struct _utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct _utimbuf) == sizeof(struct __utimbuf64) );
return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf);
}
static __inline int __CRTDECL _wutime(const wchar_t * _Filename, struct _utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct _utimbuf) == sizeof(struct __utimbuf64) );
return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
}
#endif /* _USE_32BIT_TIME_T */


#if !__STDC__

/* Non-ANSI name for compatibility */

#ifdef _USE_32BIT_TIME_T
static __inline int __CRTDECL utime(const char * _Filename, struct utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct utimbuf) == sizeof(struct __utimbuf32) );
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
}
#else
static __inline int __CRTDECL utime(const char * _Filename, struct utimbuf * _Utimbuf)
{
_STATIC_ASSERT( sizeof(struct utimbuf) == sizeof(struct __utimbuf64) );
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
}
#endif

#endif /* !__STDC__ */

#endif
1 change: 1 addition & 0 deletions tools/msvcrt_compat.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ EXPORTS
_wenviron=msvcrt._wenviron
snprintf=msvcrt.snprintf
vsnprintf=msvcrt.vsnprintf
_ftelli64=msvcrt._ftelli64

0 comments on commit 2feb85d

Please sign in to comment.