Re: [Mingw-w64-public] [PATCH 1/2] Added sperror.h file.

2015-08-14 Thread JonY
On 7/28/2015 22:28, Jacek Caban wrote:
 ---
  mingw-w64-headers/include/sperror.h | 26 ++
  1 file changed, 26 insertions(+)
  create mode 100644 mingw-w64-headers/include/sperror.h
 

Looks good to me.



0xD4EBC740.asc
Description: application/pgp-keys


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


[Mingw-w64-public] [PATCH 1/2] Added sperror.h file.

2015-07-28 Thread Jacek Caban
---
 mingw-w64-headers/include/sperror.h | 26 ++
 1 file changed, 26 insertions(+)
 create mode 100644 mingw-w64-headers/include/sperror.h


diff --git a/mingw-w64-headers/include/sperror.h b/mingw-w64-headers/include/sperror.h
new file mode 100644
index 000..6376a60
--- /dev/null
+++ b/mingw-w64-headers/include/sperror.h
@@ -0,0 +1,26 @@
+/**
+ * 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 SPError_h
+#define SPError_h
+
+#include winapifamily.h
+
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
+#include winerror.h
+
+#define FACILITY_SAPI FACILITY_ITF
+#define SAPI_ERROR_BASE 0x5000
+
+#define MAKE_SAPI_HRESULT(sev, err) MAKE_HRESULT(sev, FACILITY_SAPI, err)
+#define MAKE_SAPI_ERROR(err)MAKE_SAPI_HRESULT(SEVERITY_ERROR, err+SAPI_ERROR_BASE)
+#define MAKE_SAPI_SCODE(scode)  MAKE_SAPI_HRESULT(SEVERITY_SUCCESS, scode+SAPI_ERROR_BASE)
+
+#define SPERR_NOT_FOUND MAKE_SAPI_ERROR(0x003a)
+
+#endif
+#endif

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