Commit Graph

6347 Commits

Author SHA1 Message Date
Biswapriyo Nath
b6e657e55b headers: Add missing names in wininet.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-29 09:58:01 +08:00
Biswapriyo Nath
ae63cde274 headers: Add missing names in winevt.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-27 21:50:25 +08:00
Biswapriyo Nath
15dafe50af Revert "headers: Move IP_MREQ from _ip_mreq1.h to ws2ipdef.h."
This reverts commit 0c7108c439
This revert fixes the build of SDL_net for x86 architecture.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-26 16:54:57 +08:00
Biswapriyo Nath
b440745d05 headers: Add MsvAvSingleHost in MSV1_0_AVID enum.
MsvAvSingleHost present in MS-NLMP specifications[1] but not in WinSDK
[1]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-25 23:44:36 +08:00
Ozkan Sezer
6728827e41 dinput.h: Rename wReserved to wReportId in DIDEVICEOBJECTINSTANCE.
(from: wine git, commit 2d629228ddd71d8c308da755c91b667a895dc4f8.)
2021-06-24 04:37:02 +03:00
Martin Storsjö
38c9f0318c headers: Use the right windows specific arm instruction for __debugbreak()
The udf arm instruction has a platform specific meaning; on Windows
udf #0xfe is mapped to an exception with STATUS_BREAKPOINT. (The
previous instruction form does stop execution in a debugger, but
continuing might not be possible, but with udf #0xfe it is possible
to continue after stopping.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-22 15:34:51 +03:00
Biswapriyo Nath
d1ab95860e crt: Add missing members in setjmp for x86_64.
This add MxCsr and FpCsr members in _JUMP_BUFFER sturcture.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-18 17:06:25 +08:00
Liu Hao
cb37f01f9c headers/locale: Make result of localeconv() accord to GCC's -funsigned-char option
This enables the old behavior when `-funsigned-char` is specified.

The `selectany` attribute is assumed to be supported since GCC 4.2, and
probably by Clang as well.

This test program should print 127 when `char` is signed and 255 when it
is unsigned:

  #include <stdio.h>
  #include <locale.h>

  int main(void)
    {
      struct lconv* lc = localeconv();
      printf("frac_digits = %d\n", lc->frac_digits);
    }

Reference: https://sourceforge.net/p/mingw-w64/mailman/message/37300502/
Reference: https://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Variable-Attributes.html
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-14 19:27:13 +08:00
Martin Storsjö
973b932e2d crt: Add double underscore prefix to the mingw_app_type symbol
This symbol vaguely seems like it might be meant to be overridden
by the app code, but I don't see how that practically would work,
as the init routines (crtdll.c and crtexe.c) set it anyway, so
whatever default value the user code provided wouldn't have any
effect anyway.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-14 10:37:17 +03:00
Martin Storsjö
112d84d1f8 crt: Add double underscore prefix to internal symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-14 10:31:17 +03:00
Martin Storsjö
f0710c3bc8 crt: Add double underscore prefix to internal symbols used for linking in init routines
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-14 10:29:30 +03:00
Martin Storsjö
9ddb881595 crt: Don't initialize lconv to unsigned char mode
Since the initial commit of mingw-w64, there's a call (in a
constructor in crt/charmax.c, pulled in via the mingw_initcharmax
variable) to __lconv_init(), which reconfigures the CRT's lconv
info to unsigned char mode - but there's no explanation for why
this is the case.

The fact that mingw-w64 initializes lconv info this way breaks
a test in llvm's libc++ (where it expects lconv's frac_digits to
be intialized to CHAR_MAX, not UCHAR_MAX). This also differs to
how MSVC environments behave, where they are initialized to
CHAR_MAX.

So unless there's a clear known reason why we'd initialize it
to unsigned char mode, revert to the same behaviour as MSVC has.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-10 23:08:49 +03:00
Martin Storsjö
8b437d314e crt: Don't print a leading '+' for format strings like "%+u"
For unsigned print formats like %u, %o and %x, don't print a leading
plus. It wasn't printed for %+o and %+x, but %+u did print one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-08 11:41:17 +03:00
Martin Storsjö
1a231cc54f crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-08 11:41:17 +03:00
Martin Storsjö
73806c0709 crt: Use the __mingw_strtold implementation for strtold, too
The second implementation, which was under the 'strtold' name, was
lacking (it didn't support e.g. strings like "0x125p-1"), while the
'__mingw_strtold' one seemed correct and complete.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-08 11:41:17 +03:00
Martin Storsjö
ac560397c2 crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-08 11:41:17 +03:00
Martin Storsjö
f9e944d378 crt: Make __mingw_wcstold an alias to wcstold
There's no need to keep two vaguely differing versions of the same
functions; out of the two, wcstold seems to be more correct.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-08 11:41:16 +03:00
Martin Storsjö
19db623dee crt: Don't provide strtold/wcstold in the UCRT import libraries
The long double type in the UCRT doesn't match the one in mingw
on x86, thus make sure we don't accidentally link to them (if
the user e.g. specifies the CRT import library before libmingwex.a).

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-08 11:41:16 +03:00
Biswapriyo Nath
db6335b844 headers: Add afunix.h file.
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-07 22:09:22 +08:00
Matheus Izvekov
bbb89c69ff crt: make iswblank always available in C++
Before this patch, wctype.h would make iswblank always available on C++,
but ctype.h and wchar.h would not. Since they share the same definition guard
macro, one could end up not getting iswblank in C++ when including
wctype.h after ctype.h / wchar.h .

This fixes this inconsistency by making it always available when
including those headers as well.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-06 12:04:08 +08:00
Mark Harmstone
fc5123e0e7 include/wdm.h: Add CLFS definitions.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-04 22:27:33 +08:00
Mark Harmstone
c56825370b include/wdm.h: Add missing enum values.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-06-04 22:22:40 +08:00
Martin Storsjö
333a219d5a crt: Set errno where needed in __mingw_wcstod
This is similar to faa8333104 but for
the __mingw_wcstod function which is implemented around __mingw_wcstold.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-01 23:47:13 +03:00
Jonathan Yong
b8fb25e971
headers: regenerate Makefile.in
Signed-off-by: Jonathan Yong <10walls@gmail.com>
2021-06-01 00:40:50 +00:00
Liu Hao
5a602d166e include/tsvirtualchannels: Generate header from IDL
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-31 22:05:53 +08:00
Biswapriyo Nath
9bb45ba4cb headers: Add tsvirtualchannels.idl file.
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-31 22:05:01 +08:00
Martin Storsjö
faa8333104 crt: Fix setting errno in the strtod based strtof implementation
In this case, strtod will have set errno for cases that were out of
range for doubles. For doubles that were in range, but that are out
of ranges for float, set errno before returning.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-05-31 10:48:19 +03:00
Ruslan Garipov
28eb44ca81 Add missing members into MINIDUMP_TYPE
Signed-off-by: Ruslan Garipov <ruslanngaripov@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-31 09:05:29 +08:00
Liu Hao
e1bf419902 headers/wincon: Don't define LF_FACESIZE when NOGDI is in effect
Defining it prevents other definitions such as `LOGFONT{A,W}` and causes
errors:

  $ echo '#include <shobjidl.h>' | gcc -xc -c -DNOGDI -
  In file included from <stdin>:1:
  C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7170:15: error:
  unknown type name 'LOGFONTW'
   7170 |         const LOGFONTW *plf);
        |               ^~~~~~~~
  C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7324:15: error:
  unknown type name 'LOGFONTW'
   7324 |         const LOGFONTW *plf,
        |               ^~~~~~~~
  C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7329:9: error:
  unknown type name 'LOGFONTW'; did you mean 'LPFONT'?
   7329 |         LOGFONTW *plf);
        |         ^~~~~~~~
        |         LPFONT

Reference: https://sourceforge.net/p/mingw-w64/mailman/message/37288840/
Reported-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-30 16:29:29 +08:00
Biswapriyo Nath
f95546461f headers: Add missing flags in pchannel.h.
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-28 21:42:38 +08:00
Mark Harmstone
5ea5e62044 include/ntsecapi.h: Add missing definitions.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-27 22:22:27 +08:00
Liu Hao
d2374f8984 include/intrin: Don't define __cpuid and __cpuidex for GCC 11
GCC has `__cpuid` as a macro. GCC 11 has `__cpuidex` as a static inline
function taking the same arguments, but without any indicative macros.

Reference: 23855a1766/gcc/config/i386/cpuid.h (L333)
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-24 09:06:48 +08:00
Jonathan Yong
788f577019
mingw-w64-headers: bump _mingw_mac.h to 10.0.0
Signed-off-by: Jonathan Yong <10walls@gmail.com>
2021-05-22 14:06:18 +00:00
Liu Hao
acc9b9d9eb headers: Update to current Wine master
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-22 20:34:25 +08:00
Liu Hao
20170a9cc5 include/process: Declare quick_exit() here too
This duplicates the declaration in 7dda261ef0.

Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-22 14:45:21 +08:00
Liu Hao
5f6757fbbc include/assert: Remove unreferenced declarations
This de-duplicates them a bit.

Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-22 14:45:18 +08:00
Liu Hao
5fb88cd1ec crt: Regenerate Makefile.in
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-21 23:41:30 +08:00
Mark Harmstone
e0013415f0 crt: Add libopends60.a.
This is the counterpart to srv.h, used to create extended stored
procedures for MSSQL.

Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-21 23:36:27 +08:00
Martin Storsjö
2d93b36b1b crt: Implement at_quick_exit()
The declaration of at_quick_exit() was added in
7dda261ef0. However it is not exported
from any DLL, so we have to implement it ourselves.

This uses _crt_at_quick_exit to register functions to call if called
from an EXE, but does nothing if called from a DLL. In a DLL, we can't
unregister the callbacks if the DLL gets unloaded. This also matches
actual observed behaviour when using at_quick_exit from a DLL
when built with MSVC with the -MD option.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-05-20 22:39:23 +03:00
Biswapriyo Nath
7f53c134b0 headers: Add missing APIs in wow64apiset.h.
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 23:49:44 +08:00
Liu Hao
842f2ce249 crt/configure: Delete trailing whitespace
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 22:24:44 +08:00
Liu Hao
5db45ff14e include/mfidl: Regenerate header from IDL
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 22:12:12 +08:00
Biswapriyo Nath
a7577a4d49 headers: Add missing interfaces in mfidl.idl.
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 22:11:36 +08:00
Biswapriyo Nath
50356a0f94 headers: Add thread pool wrappers in winbase.h.
Required for FreeRDP project.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 22:00:25 +08:00
Mark Harmstone
2d687f3e0f include/ntddstor.h: Update for Windows 8.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 21:57:12 +08:00
Mark Harmstone
7252b41d71 include/sspi.h: Add missing definitions.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 21:55:33 +08:00
Mark Harmstone
2044426ea7 include/sspi.h: Fix ChangeAccountPassword definition.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-20 21:55:22 +08:00
Liu Hao
a528542c80 include/stdio: Move macro push/pops outside any #if...#endif blocks
Some projects have `#define snprintf _snprintf`, which causes errors for
UCRT. This patch moves those macros so they have effects on both MSVCRT
and UCRT.

Signed-off-by: Liu Hao <lh_mouse@126.com>
2021-05-17 16:57:57 +08:00
Jonathan Yong
c3b37d5e42
crt: regenerate Makefile.in
Signed-off-by: Jonathan Yong <10walls@gmail.com>
2021-05-16 11:02:05 +00:00
Jonathan Yong
5a4f14f699
crt: _HUGE for UCRT
Signed-off-by: Jonathan Yong <10walls@gmail.com>
2021-05-16 10:48:02 +00:00