Re: [Mingw-w64-public] [PATCH] crt/libsrc: add netcfg-uuid.c for network config interfaces

2020-05-08 Thread Biswapriyo Nath
> Could we include netcfgx.h instead of duplicating it?

Yes. Updated patch attached.
From 8b323e52c31d4772b23adabb6184e0d170b03eb1 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath 
Date: Sat, 9 May 2020 09:11:36 +0530
Subject: [PATCH] crt/libsrc: add netcfg-uuid.c for network config interfaces

Signed-off-by: Biswapriyo Nath 
---
 mingw-w64-crt/Makefile.am  | 18 +-
 mingw-w64-crt/libsrc/netcfg-uuid.c | 13 +
 2 files changed, 22 insertions(+), 9 deletions(-)
 create mode 100644 mingw-w64-crt/libsrc/netcfg-uuid.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 86b0b0d..fb5342b 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -132,15 +132,15 @@ src_libmingwthrd=libsrc/mingwthrd_mt.c
 src_libgdiplus=libsrc/gdiplus.c
 
 src_libuuid=\
-  libsrc/ativscp-uuid.c   libsrc/atsmedia-uuid.clibsrc/bth-uuid.c   
libsrc/cguid-uuid.c libsrc/comcat-uuid.c  \
-  libsrc/devguid.clibsrc/docobj-uuid.c  libsrc/dxva-uuid.c  
libsrc/exdisp-uuid.clibsrc/extras-uuid.c  \
-  libsrc/fwp-uuid.c   libsrc/guid_nul.c libsrc/hlguids-uuid.c   
libsrc/hlink-uuid.c libsrc/mlang-uuid.c   \
-  libsrc/msctf-uuid.c libsrc/mshtmhst-uuid.clibsrc/mshtml-uuid.c
libsrc/msxml-uuid.c libsrc/netcon-uuid.c  \
-  libsrc/ntddkbd-uuid.c   libsrc/ntddmou-uuid.c libsrc/ntddpar-uuid.c   
libsrc/ntddscsi-uuid.c  libsrc/ntddser-uuid.c \
-  libsrc/ntddstor-uuid.c  libsrc/ntddvdeo-uuid.clibsrc/oaidl-uuid.c 
libsrc/objidl-uuid.clibsrc/objsafe-uuid.c \
-  libsrc/ocidl-uuid.c libsrc/oleacc-uuid.c  libsrc/olectlid-uuid.c  
libsrc/oleidl-uuid.clibsrc/power-uuid.c   \
-  libsrc/powrprof-uuid.c  libsrc/uianimation-uuid.c libsrc/usbcamdi-uuid.c  
libsrc/usbiodef-uuid.c  libsrc/uuid.c \
-  libsrc/vds-uuid.c   libsrc/virtdisk-uuid.clibsrc/wia-uuid.c
+  libsrc/ativscp-uuid.c   libsrc/atsmedia-uuid.clibsrc/bth-uuid.c 
libsrc/cguid-uuid.c libsrc/comcat-uuid.c   \
+  libsrc/devguid.clibsrc/docobj-uuid.c  libsrc/dxva-uuid.c
libsrc/exdisp-uuid.clibsrc/extras-uuid.c   \
+  libsrc/fwp-uuid.c   libsrc/guid_nul.c libsrc/hlguids-uuid.c 
libsrc/hlink-uuid.c libsrc/mlang-uuid.c\
+  libsrc/msctf-uuid.c libsrc/mshtmhst-uuid.clibsrc/mshtml-uuid.c  
libsrc/msxml-uuid.c libsrc/netcfg-uuid.c   \
+  libsrc/netcon-uuid.clibsrc/ntddkbd-uuid.c libsrc/ntddmou-uuid.c 
libsrc/ntddpar-uuid.c   libsrc/ntddscsi-uuid.c \
+  libsrc/ntddser-uuid.c   libsrc/ntddstor-uuid.clibsrc/ntddvdeo-uuid.c
libsrc/oaidl-uuid.c libsrc/objidl-uuid.c   \
+  libsrc/objsafe-uuid.c   libsrc/ocidl-uuid.c   libsrc/oleacc-uuid.c  
libsrc/olectlid-uuid.c  libsrc/oleidl-uuid.c   \
+  libsrc/power-uuid.c libsrc/powrprof-uuid.clibsrc/uianimation-uuid.c 
libsrc/usbcamdi-uuid.c  libsrc/usbiodef-uuid.c \
+  libsrc/uuid.c   libsrc/vds-uuid.c libsrc/virtdisk-uuid.c
libsrc/wia-uuid.c
 
 src_libws2_32=libsrc/ws2_32.c \
   \
diff --git a/mingw-w64-crt/libsrc/netcfg-uuid.c 
b/mingw-w64-crt/libsrc/netcfg-uuid.c
new file mode 100644
index 000..ccd613d
--- /dev/null
+++ b/mingw-w64-crt/libsrc/netcfg-uuid.c
@@ -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.
+ */
+
+/* crt/libsrc/netcfg-uuid.c */
+/* Generate GUIDs for network configuration interfaces */
+
+#define INITGUID
+#include 
+#include 
+#include 
-- 
2.26.2

___
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/libsrc: add netcfg-uuid.c for network config interfaces

2020-05-08 Thread Jacek Caban

Hi Biswapriyo,

On 08.05.2020 22:32, Biswapriyo Nath wrote:

  mingw-w64-crt/Makefile.am  | 18 +++
  mingw-w64-crt/libsrc/netcfg-uuid.c | 37 ++
  2 files changed, 46 insertions(+), 9 deletions(-)
  create mode 100644 mingw-w64-crt/libsrc/netcfg-uuid.c



Could we include netcfgx.h instead of duplicating it?


Thanks,

Jacek



___
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/libsrc: include devguid.h in devguid.c and remove all defines

2020-05-08 Thread Jacek Caban

On 07.05.2020 18:45, Biswapriyo Nath wrote:

Main goal is to update the devguid.c in libsrc folder for libuuid.a. There
are two options I guess:

1. Copy the new GUIDs from devguid.h to devguid.c.
2. Include devguid.h in devguid.c.

Option 2 is done in the attached patch file. Because if a new GUID is added
to the library in Windows SDK then one has to add it in both .h and .c
file. I have checked that all the GUIDs from devguid.h are exported from
uuid.lib in Windows SDK using dumpbin tool.

Open to any suggestion/discussion.



It looks good to me, I pushed it.


Thanks,

Jacek



___
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/libsrc: add netcfg-uuid.c for network config interfaces

2020-05-08 Thread Biswapriyo Nath
...
From 47c42c14ab5905631e5e1553a9eb0ecdd847fd31 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath 
Date: Sat, 9 May 2020 23:00:28 +0530
Subject: [PATCH] crt/libsrc: add netcfg-uuid.c for network config interfaces

Signed-off-by: Biswapriyo Nath 
---
 mingw-w64-crt/Makefile.am  | 18 +++
 mingw-w64-crt/libsrc/netcfg-uuid.c | 37 ++
 2 files changed, 46 insertions(+), 9 deletions(-)
 create mode 100644 mingw-w64-crt/libsrc/netcfg-uuid.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 86b0b0d..fb5342b 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -132,15 +132,15 @@ src_libmingwthrd=libsrc/mingwthrd_mt.c
 src_libgdiplus=libsrc/gdiplus.c
 
 src_libuuid=\
-  libsrc/ativscp-uuid.c   libsrc/atsmedia-uuid.clibsrc/bth-uuid.c   
libsrc/cguid-uuid.c libsrc/comcat-uuid.c  \
-  libsrc/devguid.clibsrc/docobj-uuid.c  libsrc/dxva-uuid.c  
libsrc/exdisp-uuid.clibsrc/extras-uuid.c  \
-  libsrc/fwp-uuid.c   libsrc/guid_nul.c libsrc/hlguids-uuid.c   
libsrc/hlink-uuid.c libsrc/mlang-uuid.c   \
-  libsrc/msctf-uuid.c libsrc/mshtmhst-uuid.clibsrc/mshtml-uuid.c
libsrc/msxml-uuid.c libsrc/netcon-uuid.c  \
-  libsrc/ntddkbd-uuid.c   libsrc/ntddmou-uuid.c libsrc/ntddpar-uuid.c   
libsrc/ntddscsi-uuid.c  libsrc/ntddser-uuid.c \
-  libsrc/ntddstor-uuid.c  libsrc/ntddvdeo-uuid.clibsrc/oaidl-uuid.c 
libsrc/objidl-uuid.clibsrc/objsafe-uuid.c \
-  libsrc/ocidl-uuid.c libsrc/oleacc-uuid.c  libsrc/olectlid-uuid.c  
libsrc/oleidl-uuid.clibsrc/power-uuid.c   \
-  libsrc/powrprof-uuid.c  libsrc/uianimation-uuid.c libsrc/usbcamdi-uuid.c  
libsrc/usbiodef-uuid.c  libsrc/uuid.c \
-  libsrc/vds-uuid.c   libsrc/virtdisk-uuid.clibsrc/wia-uuid.c
+  libsrc/ativscp-uuid.c   libsrc/atsmedia-uuid.clibsrc/bth-uuid.c 
libsrc/cguid-uuid.c libsrc/comcat-uuid.c   \
+  libsrc/devguid.clibsrc/docobj-uuid.c  libsrc/dxva-uuid.c
libsrc/exdisp-uuid.clibsrc/extras-uuid.c   \
+  libsrc/fwp-uuid.c   libsrc/guid_nul.c libsrc/hlguids-uuid.c 
libsrc/hlink-uuid.c libsrc/mlang-uuid.c\
+  libsrc/msctf-uuid.c libsrc/mshtmhst-uuid.clibsrc/mshtml-uuid.c  
libsrc/msxml-uuid.c libsrc/netcfg-uuid.c   \
+  libsrc/netcon-uuid.clibsrc/ntddkbd-uuid.c libsrc/ntddmou-uuid.c 
libsrc/ntddpar-uuid.c   libsrc/ntddscsi-uuid.c \
+  libsrc/ntddser-uuid.c   libsrc/ntddstor-uuid.clibsrc/ntddvdeo-uuid.c
libsrc/oaidl-uuid.c libsrc/objidl-uuid.c   \
+  libsrc/objsafe-uuid.c   libsrc/ocidl-uuid.c   libsrc/oleacc-uuid.c  
libsrc/olectlid-uuid.c  libsrc/oleidl-uuid.c   \
+  libsrc/power-uuid.c libsrc/powrprof-uuid.clibsrc/uianimation-uuid.c 
libsrc/usbcamdi-uuid.c  libsrc/usbiodef-uuid.c \
+  libsrc/uuid.c   libsrc/vds-uuid.c libsrc/virtdisk-uuid.c
libsrc/wia-uuid.c
 
 src_libws2_32=libsrc/ws2_32.c \
   \
diff --git a/mingw-w64-crt/libsrc/netcfg-uuid.c 
b/mingw-w64-crt/libsrc/netcfg-uuid.c
new file mode 100644
index 000..f458107
--- /dev/null
+++ b/mingw-w64-crt/libsrc/netcfg-uuid.c
@@ -0,0 +1,37 @@
+/**
+ * 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.
+ */
+
+/* crt/libsrc/netcfg-uuid.c */
+/* Generate GUIDs for network configuration interfaces */
+
+#define INITGUID
+#include 
+
+DEFINE_GUID(CLSID_CNetCfg,0x5b035261,0x40f9,0x11d1,0xaa,0xec,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_IEnumNetCfgBindingInterface,0xc0e8ae90,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_IEnumNetCfgBindingPath,0xc0e8ae91,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_IEnumNetCfgComponent,0xc0e8ae92,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfg,0xc0e8ae93,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgLock,0xc0e8ae9f,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgBindingInterface,0xc0e8ae94,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgBindingPath,0xc0e8ae96,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgClass,0xc0e8ae97,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgClassSetup,0xc0e8ae9d,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgClassSetup2,0xc0e8aea0,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgComponent,0xc0e8ae99,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgComponentBindings,0xc0e8ae9e,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+DEFINE_GUID(IID_INetCfgSysPrep,0xc0e8ae98,0x306e,0x11d1,0xaa,0xcf,0x00,0x80,0x5f,0xc1,0x27,0x0e);
+

Re: [Mingw-w64-public] [PATCH] headers: add nserror.h

2020-05-08 Thread Liu Hao
在 2020/5/8 21:44, Biswapriyo Nath 写道:
> Required by mingw-w64-qt5.
> 
> 

Thanks. Patch looks good. Pushed.


-- 
Best regards,
LH_Mouse



signature.asc
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 1/2] dwrite.h: Fix build in C mode

2020-05-08 Thread Ruslan Garipov
On 5/8/2020 3:32 PM, Biswapriyo Nath wrote:
> I will not discourage your effort and contribution. But if you want, this
> can be fixed easily with IDL files. widl will take care the rest. And IDL
> files are smaller to manage than their .h counterpart.
To be honest, it makes no difference for me who and how fixes a bug in
mingw-w64 :-)  Currently all I need is to build a C project which uses
D2D.  I can live fine with local patches applied to the header files,
but to make my life easier I've sent them here.

If I understand you correctly, you want to add IDL files, which will be
piped into widl, which will generate the header files from the input?
If, so, and the header files will be freed from that ``overloaded
functions bug'' for C mode, I don't care who will add the header files
into the mingw-w64 tree.  All I need is ``correct for C compiler''
header files within MSYS2's mingw-w64-x86_64-headers.

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


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


[Mingw-w64-public] [PATCH] headers: add nserror.h

2020-05-08 Thread Biswapriyo Nath
Required by mingw-w64-qt5.
From f07a5b781c7d0ef215e84b241af1f1b74f418ead Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath 
Date: Fri, 8 May 2020 19:10:52 +0530
Subject: [PATCH] headers: add nserror.h

Signed-off-by: Biswapriyo Nath 
---
 mingw-w64-headers/include/nserror.h | 1235 +++
 1 file changed, 1235 insertions(+)
 create mode 100644 mingw-w64-headers/include/nserror.h

diff --git a/mingw-w64-headers/include/nserror.h 
b/mingw-w64-headers/include/nserror.h
new file mode 100644
index 000..b0016ec
--- /dev/null
+++ b/mingw-w64-headers/include/nserror.h
@@ -0,0 +1,1235 @@
+/**
+ * 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 _NSERROR_H
+#define _NSERROR_H
+
+#if defined (RC_INVOKED) || defined (__WIDL__)
+#define _HRESULT_TYPEDEF_(_sc) _sc
+#else
+#define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc)
+#endif
+
+#define FACILITY_NS 0xD
+#define FACILITY_NS_WIN32 0x7
+
+#define STATUS_SEVERITY_SUCCESS 0x0
+#define STATUS_SEVERITY_INFORMATIONAL 0x1
+#define STATUS_SEVERITY_WARNING 0x2
+#define STATUS_SEVERITY_ERROR 0x3
+
+#define NS_S_CALLPENDING _HRESULT_TYPEDEF_(0x000D)
+#define NS_S_CALLABORTED _HRESULT_TYPEDEF_(0x000D0001)
+#define NS_S_STREAM_TRUNCATED_HRESULT_TYPEDEF_(0x000D0002)
+#define NS_W_SERVER_BANDWIDTH_LIMIT  _HRESULT_TYPEDEF_(0x800D0003)
+#define NS_W_FILE_BANDWIDTH_LIMIT_HRESULT_TYPEDEF_(0x800D0004)
+#define NS_E_NOCONNECTION_HRESULT_TYPEDEF_(0xC00D0005)
+#define NS_E_CANNOTCONNECT   _HRESULT_TYPEDEF_(0xC00D0006)
+#define NS_E_CANNOTDESTROYTITLE  _HRESULT_TYPEDEF_(0xC00D0007)
+#define NS_E_CANNOTRENAMETITLE   _HRESULT_TYPEDEF_(0xC00D0008)
+#define NS_E_CANNOTOFFLINEDISK   _HRESULT_TYPEDEF_(0xC00D0009)
+#define NS_E_CANNOTONLINEDISK_HRESULT_TYPEDEF_(0xC00D000A)
+#define NS_E_NOREGISTEREDWALKER  _HRESULT_TYPEDEF_(0xC00D000B)
+#define NS_E_NOFUNNEL_HRESULT_TYPEDEF_(0xC00D000C)
+#define NS_E_NO_LOCALPLAY_HRESULT_TYPEDEF_(0xC00D000D)
+#define NS_E_NETWORK_BUSY_HRESULT_TYPEDEF_(0xC00D000E)
+#define NS_E_TOO_MANY_SESS   _HRESULT_TYPEDEF_(0xC00D000F)
+#define NS_E_ALREADY_CONNECTED   _HRESULT_TYPEDEF_(0xC00D0010)
+#define NS_E_INVALID_INDEX   _HRESULT_TYPEDEF_(0xC00D0011)
+#define NS_E_PROTOCOL_MISMATCH   _HRESULT_TYPEDEF_(0xC00D0012)
+#define NS_E_TIMEOUT _HRESULT_TYPEDEF_(0xC00D0013)
+#define NS_E_NET_WRITE   _HRESULT_TYPEDEF_(0xC00D0014)
+#define NS_E_NET_READ_HRESULT_TYPEDEF_(0xC00D0015)
+#define NS_E_DISK_WRITE  _HRESULT_TYPEDEF_(0xC00D0016)
+#define NS_E_DISK_READ   _HRESULT_TYPEDEF_(0xC00D0017)
+#define NS_E_FILE_WRITE  _HRESULT_TYPEDEF_(0xC00D0018)
+#define NS_E_FILE_READ   _HRESULT_TYPEDEF_(0xC00D0019)
+#define NS_E_FILE_NOT_FOUND  _HRESULT_TYPEDEF_(0xC00D001A)
+#define NS_E_FILE_EXISTS _HRESULT_TYPEDEF_(0xC00D001B)
+#define NS_E_INVALID_NAME_HRESULT_TYPEDEF_(0xC00D001C)
+#define NS_E_FILE_OPEN_FAILED_HRESULT_TYPEDEF_(0xC00D001D)
+#define NS_E_FILE_ALLOCATION_FAILED  _HRESULT_TYPEDEF_(0xC00D001E)
+#define NS_E_FILE_INIT_FAILED_HRESULT_TYPEDEF_(0xC00D001F)
+#define NS_E_FILE_PLAY_FAILED_HRESULT_TYPEDEF_(0xC00D0020)
+#define NS_E_SET_DISK_UID_FAILED _HRESULT_TYPEDEF_(0xC00D0021)
+#define NS_E_INDUCED _HRESULT_TYPEDEF_(0xC00D0022)
+#define NS_E_CCLINK_DOWN _HRESULT_TYPEDEF_(0xC00D0023)
+#define NS_E_INTERNAL_HRESULT_TYPEDEF_(0xC00D0024)
+#define NS_E_BUSY_HRESULT_TYPEDEF_(0xC00D0025)
+#define NS_E_UNRECOGNIZED_STREAM_TYPE_HRESULT_TYPEDEF_(0xC00D0026)
+#define NS_E_NETWORK_SERVICE_FAILURE _HRESULT_TYPEDEF_(0xC00D0027)
+#define NS_E_NETWORK_RESOURCE_FAILURE_HRESULT_TYPEDEF_(0xC00D0028)
+#define NS_E_CONNECTION_FAILURE  _HRESULT_TYPEDEF_(0xC00D0029)
+#define NS_E_SHUTDOWN_HRESULT_TYPEDEF_(0xC00D002A)
+#define NS_E_INVALID_REQUEST _HRESULT_TYPEDEF_(0xC00D002B)
+#define NS_E_INSUFFICIENT_BANDWIDTH  _HRESULT_TYPEDEF_(0xC00D002C)
+#define NS_E_NOT_REBUILDING  _HRESULT_TYPEDEF_(0xC00D002D)
+#define NS_E_LATE_OPERATION  _HRESULT_TYPEDEF_(0xC00D002E)
+#define NS_E_INVALID_DATA_HRESULT_TYPEDEF_(0xC00D002F)
+#define NS_E_FILE_BANDWIDTH_LIMIT_HRESULT_TYPEDEF_(0xC00D0030)
+#define NS_E_OPEN_FILE_LIMIT _HRESULT_TYPEDEF_(0xC00D0031)
+#define NS_E_BAD_CONTROL_DATA_HRESULT_TYPEDEF_(0xC00D0032)
+#define NS_E_NO_STREAM   _HRESULT_TYPEDEF_(0xC00D0033)
+#define 

Re: [Mingw-w64-public] [PATCH] crt: Build crt sources with -D__USE_MINGW_ANSI_STDIO=0

2020-05-08 Thread Liu Hao
在 2020/5/8 3:08, Martin Storsjö 写道:
> This fixes lots of warnings like these:
> 
> stdio/snprintf.c:9:13: warning: no previous prototype for function 
> '__ms_snprintf' [-Wmissing-prototypes]
> stdio/vwscanf.c:15:10: warning: implicit declaration of function 
> '__ms_vfwscanf' is invalid in C99 [-Wimplicit-function-declaration]
> 
> Signed-off-by: Martin Storsjö 
> ---
> It would be enough to set this flag when building the files in
> stdio/ though. Or we could just make this flag specific to libmingwex.a.
> 
> But I don't think there's any harm in setting it globally for the
> whole crt - this is the default mode in how these sources were
> expected to be compiled before anyway.
> ---
>  mingw-w64-crt/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

LGTM, too.


-- 
Best regards,
LH_Mouse



signature.asc
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] crt: Don't make sections executable when not necessary

2020-05-08 Thread Liu Hao
在 2020/5/8 2:30, Martin Storsjö 写道:
> With this in place, a VirtualProtect implementation in winstorecompat
> that just straight redirects to VirtualProtectFromApp will work
> fine even on UWP without any codeGeneration capability, as long as
> there's no runtime pseudo relocs in code sections. And code compiled by
> LLVM (and as far as I've seen, by GCC on x86_64 as well) only places
> such references in .data/.rdata.
> 
> Signed-off-by: Martin Storsjö 
> ---
>  mingw-w64-crt/crt/pseudo-reloc.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
>

LGTM, too.


-- 
Best regards,
LH_Mouse



signature.asc
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] crt: Remove the unused mingw-fseek.c

2020-05-08 Thread Liu Hao
在 2020/5/8 1:36, Martin Storsjö 写道:
> The functions in this file, __mingw_fseek/__mingw_fseeko64/__mingw_fwrite
> haven't ever been used within mingw-w64 throughout the SCM history,
> but were originally intended to work around issues with seeking past
> the end of files on Win9x.
> 
> Signed-off-by: Martin Storsjö 
> ---
>  mingw-w64-crt/Makefile.am|   2 +-
>  mingw-w64-crt/misc/mingw-fseek.c | 104 ---
>  2 files changed, 1 insertion(+), 105 deletions(-)
>  delete mode 100644 mingw-w64-crt/misc/mingw-fseek.c
> 
>


LGTM, too.


-- 
Best regards,
LH_Mouse



signature.asc
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 1/4] winstorecompat: Use __asm__() instead of asm() for setting symbol names

2020-05-08 Thread Liu Hao
在 2020/5/8 2:55, Martin Storsjö 写道:
> The previous form caused compiler warnings like "warning: extension used
> [-Wlanguage-extension-token]" when built with clang.
> 
> Signed-off-by: Martin Storsjö 
> ---
> 

This series of patches look good to me. Please go ahead and apply.


-- 
Best regards,
LH_Mouse



signature.asc
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 2/2] headers: add netcfgn.idl

2020-05-08 Thread Liu Hao
在 2020/5/8 12:11, Biswapriyo Nath 写道:
> ...
> 
> 

Thanks. Pushed these two patches.


-- 
Best regards,
LH_Mouse



signature.asc
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 1/2] dwrite.h: Fix build in C mode

2020-05-08 Thread Biswapriyo Nath
I will not discourage your effort and contribution. But if you want, this
can be fixed easily with IDL files. widl will take care the rest. And IDL
files are smaller to manage than their .h counterpart.

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


[Mingw-w64-public] [PATCH 1/2] dwrite.h: Fix build in C mode

2020-05-08 Thread Ruslan Garipov


IDWriteTextLayout interface declares some overloaded member functions
(for example, IDWriteTextFormat::GetFontCollection and
IDWriteTextLayout::GetFontCollection).  This causes a C compiler to fail
on a module including dwrite.h.

This commit splits declaration of IDWriteTextLayout interface for C and
C++ "modes".  For C consumer the interface declares only its direct
members; to access the base class' ones code must use the Base member --
just like in interfaces declared in d2d1.h, for example.

While here, fix some IDWriteTextLayout_ COBJMACROS.

No changes for compilation using C++ mode.

Signed-off-by: ‡Ruslan Garipov 
---
 mingw-w64-headers/include/dwrite.h | 318 ++---
 1 file changed, 196 insertions(+), 122 deletions(-)


diff --git a/mingw-w64-headers/include/dwrite.h b/mingw-w64-headers/include/dwrite.h
index 943cd738ca..96bbf5514e 100644
--- a/mingw-w64-headers/include/dwrite.h
+++ b/mingw-w64-headers/include/dwrite.h
@@ -1899,200 +1899,258 @@ DECLARE_INTERFACE_(IDWriteTextFormat,IUnknown)
 #define IDWriteTextFormat_SetWordWrapping(This,wordWrapping) (This)->lpVtbl->SetWordWrapping(This,wordWrapping)
 #endif /*COBJMACROS*/
 
+#ifndef D2D_USE_C_DEFINITIONS
+
 #undef  INTERFACE
 #define INTERFACE IDWriteTextLayout
 DECLARE_INTERFACE_(IDWriteTextLayout,IDWriteTextFormat)
 {
 BEGIN_INTERFACE
 
-#ifndef __cplusplus
-/* IUnknown methods */
-STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-STDMETHOD_(ULONG, Release)(THIS) PURE;
-
-/* IDWriteTextFormat methods */
-STDMETHOD(SetTextAlignment)(THIS_
-DWRITE_TEXT_ALIGNMENT textAlignment) PURE;
-STDMETHOD(SetParagraphAlignment)(THIS_
-DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment) PURE;
-STDMETHOD(SetWordWrapping)(THIS_
-DWRITE_WORD_WRAPPING wordWrapping) PURE;
-STDMETHOD(SetReadingDirection)(THIS_
-DWRITE_READING_DIRECTION readingDirection) PURE;
-STDMETHOD(SetFlowDirection)(THIS_
-DWRITE_FLOW_DIRECTION flowDirection) PURE;
-STDMETHOD(SetIncrementalTabStop)(THIS_
-FLOAT incrementalTabStop) PURE;
-STDMETHOD(SetTrimming)(THIS_
-DWRITE_TRIMMING const *trimmingOptions,
-IDWriteInlineObject *trimmingSign) PURE;
-STDMETHOD(SetLineSpacing)(THIS_
-DWRITE_LINE_SPACING_METHOD lineSpacingMethod,
-FLOAT lineSpacing,
-FLOAT baseline) PURE;
-STDMETHOD_(DWRITE_TEXT_ALIGNMENT, GetTextAlignment)(THIS) PURE;
-STDMETHOD_(DWRITE_PARAGRAPH_ALIGNMENT, GetParagraphAlignment)(THIS) PURE;
-STDMETHOD_(DWRITE_WORD_WRAPPING, GetWordWrapping)(THIS) PURE;
-STDMETHOD_(DWRITE_READING_DIRECTION, GetReadingDirection)(THIS) PURE;
-STDMETHOD_(DWRITE_FLOW_DIRECTION, GetFlowDirection)(THIS) PURE;
-STDMETHOD_(FLOAT, GetIncrementalTabStop)(THIS) PURE;
-STDMETHOD(GetTrimming)(THIS_
-DWRITE_TRIMMING* trimmingOptions,
-IDWriteInlineObject **trimmingSign) PURE;
-STDMETHOD(GetLineSpacing)(THIS_
-DWRITE_LINE_SPACING_METHOD *lineSpacingMethod,
-FLOAT *lineSpacing,
-FLOAT *baseline) PURE;
-STDMETHOD(GetFontCollection)(THIS_
-IDWriteFontCollection **fontCollection) PURE;
-STDMETHOD_(UINT32, GetFontFamilyNameLength)(THIS) PURE;
-STDMETHOD(GetFontFamilyName)(THIS_
+STDMETHOD(SetMaxWidth)(FLOAT maxWidth) PURE;
+STDMETHOD(SetMaxHeight)(FLOAT maxHeight) PURE;
+STDMETHOD(SetFontCollection)(IDWriteFontCollection *fontCollection,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetFontFamilyName)(WCHAR const *fontFamilyName,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetFontWeight)(DWRITE_FONT_WEIGHT fontWeight,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetFontStyle)(DWRITE_FONT_STYLE fontStyle,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetFontStretch)(DWRITE_FONT_STRETCH fontStretch,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetFontSize)(FLOAT fontSize,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetUnderline)(WINBOOL hasUnderline,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetStrikethrough)(WINBOOL hasStrikethrough,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetDrawingEffect)(IUnknown *drawingEffect,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetInlineObject)(IDWriteInlineObject *inlineObject,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetTypography)(IDWriteTypography *typography,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD(SetLocaleName)(WCHAR const *localeName,
+DWRITE_TEXT_RANGE textRange) PURE;
+STDMETHOD_(FLOAT, GetMaxWidth)(void) PURE;
+STDMETHOD_(FLOAT, GetMaxHeight)(void) PURE;
+STDMETHOD(GetFontCollection)(UINT32 currentPosition,
+IDWriteFontCollection** 

[Mingw-w64-public] [PATCH 2/2] dwrite_1.h: Fix build in C mode

2020-05-08 Thread Ruslan Garipov


Some classes in the file declare overloaded functions, and this causes a
C compiler to fail on module including dwrite_1.h.  This commit fixes
that.

No changes for compilation using C++ mode.

Signed-off-by: ‡Ruslan Garipov 
---
 mingw-w64-headers/include/dwrite_1.h | 651 ---
 1 file changed, 188 insertions(+), 463 deletions(-)


diff --git a/mingw-w64-headers/include/dwrite_1.h b/mingw-w64-headers/include/dwrite_1.h
index 52de1fc75b..00c6b7d103 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -9,12 +9,57 @@
 
 #include 
 
-enum DWRITE_OUTLINE_THRESHOLD {
+#ifndef __IDWriteFont1_FWD_DEFINED__
+#define __IDWriteFont1_FWD_DEFINED__
+typedef struct IDWriteFont1 IDWriteFont1;
+#endif
+
+#ifndef __IDWriteFontFace1_FWD_DEFINED__
+#define __IDWriteFontFace1_FWD_DEFINED__
+typedef struct IDWriteFontFace1 IDWriteFontFace1;
+#endif
+
+#ifndef __IDWriteRenderingParams1_FWD_DEFINED__
+#define __IDWriteRenderingParams1_FWD_DEFINED__
+typedef struct IDWriteRenderingParams1 IDWriteRenderingParams1;
+#endif
+
+#ifndef __IDWriteTextAnalysisSource1_FWD_DEFINED__
+#define __IDWriteTextAnalysisSource1_FWD_DEFINED__
+typedef struct IDWriteTextAnalysisSource1 IDWriteTextAnalysisSource1;
+#endif
+
+#ifndef __IDWriteTextAnalysisSink1_FWD_DEFINED__
+#define __IDWriteTextAnalysisSink1_FWD_DEFINED__
+typedef struct IDWriteTextAnalysisSink1 IDWriteTextAnalysisSink1;
+#endif
+
+#ifndef __IDWriteTextAnalyzer1_FWD_DEFINED__
+#define __IDWriteTextAnalyzer1_FWD_DEFINED__
+typedef struct IDWriteTextAnalyzer1 IDWriteTextAnalyzer1;
+#endif
+
+#ifndef __IDWriteTextLayout1_FWD_DEFINED__
+#define __IDWriteTextLayout1_FWD_DEFINED__
+typedef struct IDWriteTextLayout1 IDWriteTextLayout1;
+#endif
+
+#ifndef __IDWriteFactory1_FWD_DEFINED__
+#define __IDWriteFactory1_FWD_DEFINED__
+typedef struct IDWriteFactory1 IDWriteFactory1;
+#endif
+
+#ifndef __IDWriteBitmapRenderTarget1_FWD_DEFINED__
+#define __IDWriteBitmapRenderTarget1_FWD_DEFINED__
+typedef struct IDWriteBitmapRenderTarget1 IDWriteBitmapRenderTarget1;
+#endif
+
+typedef enum DWRITE_OUTLINE_THRESHOLD {
 DWRITE_OUTLINE_THRESHOLD_ANTIALIASED,
 DWRITE_OUTLINE_THRESHOLD_ALIASED
-};
+} DWRITE_OUTLINE_THRESHOLD;
 
-enum DWRITE_BASELINE
+typedef enum DWRITE_BASELINE
 {
 DWRITE_BASELINE_DEFAULT,
 DWRITE_BASELINE_ROMAN,
@@ -25,40 +70,40 @@ enum DWRITE_BASELINE
 DWRITE_BASELINE_IDEOGRAPHIC_TOP,
 DWRITE_BASELINE_MINIMUM,
 DWRITE_BASELINE_MAXIMUM,
-};
+} DWRITE_BASELINE;
 
-enum DWRITE_GLYPH_ORIENTATION_ANGLE
+typedef enum DWRITE_GLYPH_ORIENTATION_ANGLE
 {
 DWRITE_GLYPH_ORIENTATION_ANGLE_0_DEGREES,
 DWRITE_GLYPH_ORIENTATION_ANGLE_90_DEGREES,
 DWRITE_GLYPH_ORIENTATION_ANGLE_180_DEGREES,
 DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES,
-};
+} DWRITE_GLYPH_ORIENTATION_ANGLE;
 
-enum DWRITE_TEXT_ANTIALIAS_MODE
+typedef enum DWRITE_TEXT_ANTIALIAS_MODE
 {
 DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE,
 DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE
-};
+} DWRITE_TEXT_ANTIALIAS_MODE;
 
-enum DWRITE_VERTICAL_GLYPH_ORIENTATION
+typedef enum DWRITE_VERTICAL_GLYPH_ORIENTATION
 {
 DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT,
 DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED
-};
+} DWRITE_VERTICAL_GLYPH_ORIENTATION;
 
-struct DWRITE_CARET_METRICS {
+typedef struct DWRITE_CARET_METRICS {
 INT16 slopeRise;
 INT16 slopeRun;
 INT16 offset;
-};
+} DWRITE_CARET_METRICS;
 
-struct DWRITE_UNICODE_RANGE {
+typedef struct DWRITE_UNICODE_RANGE {
 UINT32 first;
 UINT32 last;
-};
+} DWRITE_UNICODE_RANGE;
 
-struct DWRITE_FONT_METRICS1
+typedef struct DWRITE_FONT_METRICS1
 #ifdef __cplusplus
 : public DWRITE_FONT_METRICS
 #endif
@@ -88,9 +133,9 @@ struct DWRITE_FONT_METRICS1
 INT16 superscriptSizeX;
 INT16 superscriptSizeY;
 WINBOOL hasTypographicMetrics;
-};
+} DWRITE_FONT_METRICS1;
 
-struct DWRITE_SCRIPT_PROPERTIES
+typedef struct DWRITE_SCRIPT_PROPERTIES
 {
 UINT32 isoScriptCode;
 UINT32 isoScriptNumber;
@@ -104,9 +149,9 @@ struct DWRITE_SCRIPT_PROPERTIES
 UINT32 isConnectedWriting   : 1;
 UINT32 isCursiveWriting : 1;
 UINT32 reserved : 25;
-};
+} DWRITE_SCRIPT_PROPERTIES;
 
-struct DWRITE_JUSTIFICATION_OPPORTUNITY
+typedef struct DWRITE_JUSTIFICATION_OPPORTUNITY
 {
 FLOAT expansionMinimum;
 FLOAT expansionMaximum;
@@ -118,9 +163,9 @@ struct DWRITE_JUSTIFICATION_OPPORTUNITY
 UINT32 applyToLeadingEdge: 1;
 UINT32 applyToTrailingEdge   : 1;
 UINT32 reserved  : 12;
-};
+} DWRITE_JUSTIFICATION_OPPORTUNITY;
 
-union DWRITE_PANOSE {
+typedef union DWRITE_PANOSE {
 UINT8 values[10];
 UINT8 familyKind;
 struct {
@@ -171,7 +216,9 @@ union DWRITE_PANOSE {
 UINT8 aspectRatio163;
 UINT8 aspectRatio211;
 } symbol;
-};
+} DWRITE_PANOSE;
+
+#ifndef D2D_USE_C_DEFINITIONS
 
 #undef  INTERFACE
 #define INTERFACE IDWriteFont1
@@ -179,159 +226,101 @@