Re: [Mingw-w64-public] [PATCH] crt: Revert changes to api-ms-win-crt-*.def

2023-06-07 Thread Steve Lhomme

Sorry about that, my "tool" has a few bugs. I didn't notice these changes.

On 2023-06-06 10:27, Martin Storsjö wrote:

These removed lots of manual modifications from these CRT specific
import libraries, modifications that are essential to how the UCRT
is linked.

Signed-off-by: Martin Storsjö 
---
  .../api-ms-win-crt-filesystem-l1-1-0.def  | 12 ---
  .../lib-common/api-ms-win-crt-heap-l1-1-0.def |  2 +-
  .../api-ms-win-crt-multibyte-l1-1-0.def   |  3 ++-
  .../api-ms-win-crt-process-l1-1-0.def | 17 +++
  .../api-ms-win-crt-stdio-l1-1-0.def   |  5 -
  .../api-ms-win-crt-string-l1-1-0.def  | 11 --
  .../lib-common/api-ms-win-crt-time-l1-1-0.def | 21 +--
  7 files changed, 52 insertions(+), 19 deletions(-)

diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def
index 8d70bd626..45ae728ba 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def
@@ -3,7 +3,8 @@ LIBRARY api-ms-win-crt-filesystem-l1-1-0
  EXPORTS
  
  _access

-access == _access
+; access is provided as an alias for __mingw_access
+; access == _access
  _access_s
  _chdir
  chdir == _chdir
@@ -11,12 +12,12 @@ _chdrive
  _chmod
  chmod == _chmod
  _findclose
-_findfirst == _findfirst32
+_findfirst == _findfirst64
  _findfirst32
  _findfirst32i64
  _findfirst64
  _findfirst64i32
-_findnext == _findnext32
+_findnext == _findnext64
  _findnext32
  _findnext32i64
  _findnext64
@@ -26,9 +27,6 @@ _fstat32i64
  _fstat64
  _fstat64i32
  _fullpath
-_getcwd
-getcwd == _getcwd
-_getdcwd
  _getdiskfree
  _getdrive
  _getdrives
@@ -64,8 +62,6 @@ _wfindnext32i64
  _wfindnext64
  _wfindnext64i32
  _wfullpath
-_wgetcwd
-_wgetdcwd
  _wmakepath
  _wmakepath_s
  _wmkdir
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def
index 344acd56e..fd793fe82 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def
@@ -18,13 +18,13 @@ _get_heap_handle
  _heapchk
  _heapmin
  _heapwalk
+heapwalk == _heapwalk
  _malloc_base
  _msize
  _query_new_handler
  _query_new_mode
  _realloc_base
  _recalloc
-_resetstkoflw
  _set_new_mode
  calloc
  free
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def
index 9ae47af16..86d22500b 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def
@@ -70,7 +70,8 @@ _mbbtombc
  _mbbtombc_l
  _mbbtype
  _mbbtype_l
-_mbcasemap
+; DATA added manually
+_mbcasemap DATA
  _mbccpy
  _mbccpy_l
  _mbccpy_s
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def
index a3ad9d75f..dafa456a5 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def
@@ -4,23 +4,40 @@ EXPORTS
  
  _beep

  _cwait
+cwait == _cwait
  _execl
+execl == _execl
  _execle
+execle == _execle
  _execlp
+execlp == _execlp
  _execlpe
+execlpe == _execlpe
  _execv
+execv == _execv
  _execve
+execve == _execve
  _execvp
+execvp == _execvp
  _execvpe
+execvpe == _execvpe
  _loaddll
  _spawnl
+spawnl == _spawnl
  _spawnle
+spawnle == _spawnle
  _spawnlp
+spawnlp == _spawnlp
  _spawnlpe
+spawnlpe == _spawnlpe
  _spawnv
+spawnv == _spawnv
  _spawnve
+spawnve == _spawnve
  _spawnvp
+spawnvp == _spawnvp
  _spawnvpe
+spawnvpe == _spawnvpe
  _unloaddll
  _wexecl
  _wexecle
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
index 460fd12ef..d59859ced 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
@@ -85,6 +85,7 @@ _getws_s
  _isatty
  isatty == _isatty
  _kbhit
+kbhit == _kbhit
  _locking
  _lseek
  lseek == _lseek
@@ -96,8 +97,10 @@ _open
  open == _open
  _open_osfhandle
  _pclose
+pclose == _pclose
  _pipe
  _popen
+popen == _popen
  _putc_nolock
  _putw
  putw == _putw
@@ -134,6 +137,7 @@ _wmktemp
  _wmktemp_s
  _wopen
  _wpopen
+wpopen == _wpopen
  _write
  write == _write
  _wsopen
@@ -175,7 +179,6 @@ getwc
  getwchar
  putc
  putchar
-putenv
  puts
  putwc
  putwchar
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def
index 78c9d163c..dcce58dbc 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def
@@ -51,7 +51,10 @@ _strcoll_l
  _strdup
  strdup == _strdup
  _stricmp
+_strcmpi == _stricmp
+strcmpi == _stricmp
  stricmp == _stricmp
+strcasecmp == _stricmp
  

Re: [Mingw-w64-public] [PATCH] crt: Revert changes to api-ms-win-crt-*.def

2023-06-06 Thread Martin Storsjö

On Tue, 6 Jun 2023, LIU Hao wrote:


在 2023/6/6 16:27, Martin Storsjö 写道:

These removed lots of manual modifications from these CRT specific
import libraries, modifications that are essential to how the UCRT
is linked.

Signed-off-by: Martin Storsjö 
---
  .../api-ms-win-crt-filesystem-l1-1-0.def  | 12 ---
  .../lib-common/api-ms-win-crt-heap-l1-1-0.def |  2 +-
  .../api-ms-win-crt-multibyte-l1-1-0.def   |  3 ++-
  .../api-ms-win-crt-process-l1-1-0.def | 17 +++
  .../api-ms-win-crt-stdio-l1-1-0.def   |  5 -
  .../api-ms-win-crt-string-l1-1-0.def  | 11 --
  .../lib-common/api-ms-win-crt-time-l1-1-0.def | 21 +--
  7 files changed, 52 insertions(+), 19 deletions(-)


This patch looks good to me.


Thanks, pushed.

For the record; if there are intentional function changes to the 
api-ms-win-crt-*.def files, it's good to try to see if the same should be 
changed in ucrtbase.def too. Some parts of them are handled differently 
(as ucrtbase.def uses msvcrt-common.def.in which sets up a bunch of 
aliases), but the generic interface of the combined api-ms-win-crt-*.def 
should be roughly equal to that of ucrtbase.def.


// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] crt: Revert changes to api-ms-win-crt-*.def

2023-06-06 Thread LIU Hao

在 2023/6/6 16:27, Martin Storsjö 写道:

These removed lots of manual modifications from these CRT specific
import libraries, modifications that are essential to how the UCRT
is linked.

Signed-off-by: Martin Storsjö 
---
  .../api-ms-win-crt-filesystem-l1-1-0.def  | 12 ---
  .../lib-common/api-ms-win-crt-heap-l1-1-0.def |  2 +-
  .../api-ms-win-crt-multibyte-l1-1-0.def   |  3 ++-
  .../api-ms-win-crt-process-l1-1-0.def | 17 +++
  .../api-ms-win-crt-stdio-l1-1-0.def   |  5 -
  .../api-ms-win-crt-string-l1-1-0.def  | 11 --
  .../lib-common/api-ms-win-crt-time-l1-1-0.def | 21 +--
  7 files changed, 52 insertions(+), 19 deletions(-)


This patch looks good to me. I only did a quick glance at the lib-common parts and didn't notice 
those deletions. Apologies for the trouble.


--
Best regards,
LIU Hao



OpenPGP_signature
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] crt: Revert changes to api-ms-win-crt-*.def

2023-06-06 Thread Martin Storsjö
These removed lots of manual modifications from these CRT specific
import libraries, modifications that are essential to how the UCRT
is linked.

Signed-off-by: Martin Storsjö 
---
 .../api-ms-win-crt-filesystem-l1-1-0.def  | 12 ---
 .../lib-common/api-ms-win-crt-heap-l1-1-0.def |  2 +-
 .../api-ms-win-crt-multibyte-l1-1-0.def   |  3 ++-
 .../api-ms-win-crt-process-l1-1-0.def | 17 +++
 .../api-ms-win-crt-stdio-l1-1-0.def   |  5 -
 .../api-ms-win-crt-string-l1-1-0.def  | 11 --
 .../lib-common/api-ms-win-crt-time-l1-1-0.def | 21 +--
 7 files changed, 52 insertions(+), 19 deletions(-)

diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def
index 8d70bd626..45ae728ba 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def
@@ -3,7 +3,8 @@ LIBRARY api-ms-win-crt-filesystem-l1-1-0
 EXPORTS
 
 _access
-access == _access
+; access is provided as an alias for __mingw_access
+; access == _access
 _access_s
 _chdir
 chdir == _chdir
@@ -11,12 +12,12 @@ _chdrive
 _chmod
 chmod == _chmod
 _findclose
-_findfirst == _findfirst32
+_findfirst == _findfirst64
 _findfirst32
 _findfirst32i64
 _findfirst64
 _findfirst64i32
-_findnext == _findnext32
+_findnext == _findnext64
 _findnext32
 _findnext32i64
 _findnext64
@@ -26,9 +27,6 @@ _fstat32i64
 _fstat64
 _fstat64i32
 _fullpath
-_getcwd
-getcwd == _getcwd
-_getdcwd
 _getdiskfree
 _getdrive
 _getdrives
@@ -64,8 +62,6 @@ _wfindnext32i64
 _wfindnext64
 _wfindnext64i32
 _wfullpath
-_wgetcwd
-_wgetdcwd
 _wmakepath
 _wmakepath_s
 _wmkdir
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def
index 344acd56e..fd793fe82 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-heap-l1-1-0.def
@@ -18,13 +18,13 @@ _get_heap_handle
 _heapchk
 _heapmin
 _heapwalk
+heapwalk == _heapwalk
 _malloc_base
 _msize
 _query_new_handler
 _query_new_mode
 _realloc_base
 _recalloc
-_resetstkoflw
 _set_new_mode
 calloc
 free
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def
index 9ae47af16..86d22500b 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-multibyte-l1-1-0.def
@@ -70,7 +70,8 @@ _mbbtombc
 _mbbtombc_l
 _mbbtype
 _mbbtype_l
-_mbcasemap
+; DATA added manually
+_mbcasemap DATA
 _mbccpy
 _mbccpy_l
 _mbccpy_s
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def
index a3ad9d75f..dafa456a5 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-process-l1-1-0.def
@@ -4,23 +4,40 @@ EXPORTS
 
 _beep
 _cwait
+cwait == _cwait
 _execl
+execl == _execl
 _execle
+execle == _execle
 _execlp
+execlp == _execlp
 _execlpe
+execlpe == _execlpe
 _execv
+execv == _execv
 _execve
+execve == _execve
 _execvp
+execvp == _execvp
 _execvpe
+execvpe == _execvpe
 _loaddll
 _spawnl
+spawnl == _spawnl
 _spawnle
+spawnle == _spawnle
 _spawnlp
+spawnlp == _spawnlp
 _spawnlpe
+spawnlpe == _spawnlpe
 _spawnv
+spawnv == _spawnv
 _spawnve
+spawnve == _spawnve
 _spawnvp
+spawnvp == _spawnvp
 _spawnvpe
+spawnvpe == _spawnvpe
 _unloaddll
 _wexecl
 _wexecle
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
index 460fd12ef..d59859ced 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
@@ -85,6 +85,7 @@ _getws_s
 _isatty
 isatty == _isatty
 _kbhit
+kbhit == _kbhit
 _locking
 _lseek
 lseek == _lseek
@@ -96,8 +97,10 @@ _open
 open == _open
 _open_osfhandle
 _pclose
+pclose == _pclose
 _pipe
 _popen
+popen == _popen
 _putc_nolock
 _putw
 putw == _putw
@@ -134,6 +137,7 @@ _wmktemp
 _wmktemp_s
 _wopen
 _wpopen
+wpopen == _wpopen
 _write
 write == _write
 _wsopen
@@ -175,7 +179,6 @@ getwc
 getwchar
 putc
 putchar
-putenv
 puts
 putwc
 putwchar
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def 
b/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def
index 78c9d163c..dcce58dbc 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def
@@ -51,7 +51,10 @@ _strcoll_l
 _strdup
 strdup == _strdup
 _stricmp
+_strcmpi == _stricmp
+strcmpi == _stricmp
 stricmp == _stricmp
+strcasecmp == _stricmp
 _stricmp_l
 _stricoll
 stricoll == _stricoll
@@ -64,6 +67,8 @@ _strlwr_s_l
 _strncoll
 _strncoll_l
 _strnicmp
+strnicmp == _strnicmp
+strncasecmp == _strnicmp
 _strnicmp_l
 _strnicoll
 _strnicoll_l
@@ -92,6 +97,7 @@ _wcsdup
 wcsdup