Re: [Mingw-w64-public] [PATCH] Core Audio Constants

2021-04-18 Thread JonY via Mingw-w64-public

On 4/18/21 1:03 PM, Liu Hao wrote:

在 2021-04-18 15:31, JonY via Mingw-w64-public 写道:

+#define SPATIAL_AUDIO_POSITION_BYTE_COUNT sizeof(float) * 3


This had better be wrapped in parentheses like `(sizeof(float) * 3)`.

The others look good to me.



Thanks, pushed to master branch with the change.


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/{stdio, conio, wchar}: Move attributes before function declarators

2021-04-18 Thread Liu Hao


--
Best regards,
Liu Hao
From 1c8801fc3ffe0723c2203d87d5d5c42dc25d64d1 Mon Sep 17 00:00:00 2001
From: Liu Hao 
Date: Sun, 18 Apr 2021 21:29:31 +0800
Subject: [PATCH] crt/{stdio,conio,wchar}: Move attributes before function
 declarators

The preferred order of declaring a function is:

  attributes linkage-specifiers return-type identifier parameters

For example:

  __attribute__((__pure__, __nothrow__)) extern size_t strlen(const char* 
__Str);
  __attribute__((__noreturn__, __nothrow__)) extern void exit(int _Status);

Attributes can be specified last if the declaration is not a definition
(i.e. it is followed by a semicolon instead of function body), which
will otherwise not compile.

Signed-off-by: Liu Hao 
---
 mingw-w64-headers/crt/conio.h | 12 
 mingw-w64-headers/crt/stdio.h | 36 +--
 mingw-w64-headers/crt/wchar.h | 20 +--
 3 files changed, 36 insertions(+), 32 deletions(-)

diff --git a/mingw-w64-headers/crt/conio.h b/mingw-w64-headers/crt/conio.h
index f7e80b1a..97b4e342 100644
--- a/mingw-w64-headers/crt/conio.h
+++ b/mingw-w64-headers/crt/conio.h
@@ -39,7 +39,8 @@ extern "C" {
 __builtin_va_end(_ArgList);
 return _Ret;
   }
-  __mingw_ovr int __cdecl _cscanf(const char * __restrict__ _Format,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  int __cdecl _cscanf(const char * __restrict__ _Format,...)
   {
 __builtin_va_list _ArgList;
 int _Ret;
@@ -48,7 +49,8 @@ extern "C" {
 __builtin_va_end(_ArgList);
 return _Ret;
   }
-  __mingw_ovr int __cdecl _cscanf_l(const char * __restrict__ 
_Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  int __cdecl _cscanf_l(const char * __restrict__ _Format,_locale_t 
_Locale,...)
   {
 __builtin_va_list _ArgList;
 int _Ret;
@@ -161,7 +163,8 @@ extern "C" {
 __builtin_va_end(_ArgList);
 return _Ret;
   }
-  __mingw_ovr int __cdecl _cwscanf(const wchar_t * __restrict__ _Format,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  int __cdecl _cwscanf(const wchar_t * __restrict__ _Format,...)
   {
 __builtin_va_list _ArgList;
 int _Ret;
@@ -170,7 +173,8 @@ extern "C" {
 __builtin_va_end(_ArgList);
 return _Ret;
   }
-  __mingw_ovr int __cdecl _cwscanf_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  int __cdecl _cwscanf_l(const wchar_t * __restrict__ _Format,_locale_t 
_Locale,...)
   {
 __builtin_va_list _ArgList;
 int _Ret;
diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
index fe15add0..846487a0 100644
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -497,9 +497,9 @@ int vsnprintf (char *__stream, size_t __n, const char 
*__format, __builtin_va_li
   __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 2, 0))) 
__MINGW_ATTRIB_NONNULL(2)
   int __cdecl vsprintf(char * __restrict__ _Dest,const char * __restrict__ 
_Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
 
-  __mingw_ovr
+  __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
   __attribute__((__format__ (__MINGW_SCANF_FORMAT, 2, 3))) 
__MINGW_ATTRIB_NONNULL(2)
-  int __cdecl fscanf(FILE * __restrict__ _File,const char * __restrict__ 
_Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  int __cdecl fscanf(FILE * __restrict__ _File,const char * __restrict__ 
_Format,...)
   {
 __builtin_va_list __ap;
 int __ret;
@@ -508,9 +508,9 @@ int vsnprintf (char *__stream, size_t __n, const char 
*__format, __builtin_va_li
 __builtin_va_end(__ap);
 return __ret;
   }
-  __mingw_ovr
+  __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
   __attribute__((__format__ (__MINGW_SCANF_FORMAT, 1, 2))) 
__MINGW_ATTRIB_NONNULL(1)
-  int __cdecl scanf(const char * __restrict__ _Format,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  int __cdecl scanf(const char * __restrict__ _Format,...)
   {
 __builtin_va_list __ap;
 int __ret;
@@ -519,9 +519,9 @@ int vsnprintf (char *__stream, size_t __n, const char 
*__format, __builtin_va_li
 __builtin_va_end(__ap);
 return __ret;
   }
-  __mingw_ovr
+  __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
   __attribute__((__format__ (__MINGW_SCANF_FORMAT, 2, 3))) 
__MINGW_ATTRIB_NONNULL(2)
-  int __cdecl sscanf(const char * __restrict__ _Src,const char * __restrict__ 
_Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN
+  int __cdecl sscanf(const char * __restrict__ _Src,const char * __restrict__ 
_Format,...)
   {
 __builtin_va_list __ap;
 int __ret;
@@ -756,8 +756,8 @@ int vsnprintf (char *__stream, size_t __n, const char 
*__format, __builtin_va_li
 __builtin_va_end(__ap);
 return __ret;
   }
-  __mingw_ovr
-  int __cdecl _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const 
char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRE

Re: [Mingw-w64-public] [PATCH] headers: Add spellcheck.idl.

2021-04-18 Thread Liu Hao

在 2021-04-15 00:01, Biswapriyo Nath 写道:

Subject: [PATCH] headers: Add spellcheck.idl.

Signed-off-by: Biswapriyo Nath
---
  mingw-w64-headers/Makefile.am|   1 +
  mingw-w64-headers/include/spellcheck.idl | 157 +++
  2 files changed, 158 insertions(+)
  create mode 100644 mingw-w64-headers/include/spellcheck.idl



Thanks for the patch. I have pushed it to master.

--
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


Re: [Mingw-w64-public] [PATCH] Core Audio Constants

2021-04-18 Thread Liu Hao

在 2021-04-18 15:31, JonY via Mingw-w64-public 写道:

+#define SPATIAL_AUDIO_POSITION_BYTE_COUNT sizeof(float) * 3


This had better be wrapped in parentheses like `(sizeof(float) * 3)`.

The others look good to me.


--
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] Core Audio Constants

2021-04-18 Thread JonY via Mingw-w64-public

Attached patch OK?
The GUIDs seem to be copies from the existing constants.
From e97f599818e77d2a13ec8777cb2cfa6b56ed872c Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10wa...@gmail.com>
Date: Sun, 18 Apr 2021 07:25:23 +
Subject: [PATCH] Core Audio Constants

Signed-off-by: Jonathan Yong <10wa...@gmail.com>
---
 mingw-w64-headers/include/audiosessiontypes.h   |  2 ++
 .../include/functiondiscoverykeys_devpkey.h |  2 ++
 mingw-w64-headers/include/spatialaudiometadata.h| 13 +
 3 files changed, 17 insertions(+)
 create mode 100644 mingw-w64-headers/include/spatialaudiometadata.h

diff --git a/mingw-w64-headers/include/audiosessiontypes.h b/mingw-w64-headers/include/audiosessiontypes.h
index 91e72130..c0246077 100644
--- a/mingw-w64-headers/include/audiosessiontypes.h
+++ b/mingw-w64-headers/include/audiosessiontypes.h
@@ -50,6 +50,8 @@ typedef enum _AUDIO_STREAM_CATEGORY {
 #define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x0004
 #define AUDCLNT_STREAMFLAGS_NOPERSIST 0x0008
 #define AUDCLNT_STREAMFLAGS_RATEADJUST 0x0010
+#define AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY 0x0800
+#define AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM 0x8000
 #define AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED 0x1000
 #define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE 0x2000
 #define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED 0x4000
diff --git a/mingw-w64-headers/include/functiondiscoverykeys_devpkey.h b/mingw-w64-headers/include/functiondiscoverykeys_devpkey.h
index d66cb97f..55df4c9e 100644
--- a/mingw-w64-headers/include/functiondiscoverykeys_devpkey.h
+++ b/mingw-w64-headers/include/functiondiscoverykeys_devpkey.h
@@ -9,5 +9,7 @@
 #include 
 
 DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 
0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
+DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 2);
+DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName, 0x026e516e,0xb814,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 2);
 
 #endif /* _INC_FUNCTIONDISCOVERYKEYS */
diff --git a/mingw-w64-headers/include/spatialaudiometadata.h b/mingw-w64-headers/include/spatialaudiometadata.h
new file mode 100644
index ..7d303291
--- /dev/null
+++ b/mingw-w64-headers/include/spatialaudiometadata.h
@@ -0,0 +1,13 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _INC_SPATIALAUDIOMETADATA
+#define _INC_SPATIALAUDIOMETADATA
+
+#define SPATIAL_AUDIO_POSITION 200
+#define SPATIAL_AUDIO_POSITION_BYTE_COUNT sizeof(float) * 3
+#define SPATIAL_AUDIO_STANDARD_COMMANDS_START 200
+
+#endif /* _INC_SPATIALAUDIOMETADATA */
-- 
2.31.1



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] If __MINGW_MSVC_COMPAT_WARNINGS enabled __mingw_ovr not defined in UCRT

2021-04-18 Thread Biswapriyo Nath
* Minimal test:

#define __MINGW_MSVC_COMPAT_WARNINGS
#include 
int main() {}

* Test program:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-groonga
(in header lib/grn.h)
* msvcrt ✓
* ucrt ✕


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