aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-08-05Cygwin: fhandler/null.cc: remove redundant includesgithub/topic/split_source_dirtopic/split_source_dirCorinna Vinschen1-9/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-05Cygwin: update the "dirs" variable in Makefile.amKen Brown1-1/+1
Add the new fhandler and sec subdirs.
2022-08-05Cygwin: Reorganize cygwin source dirCorinna Vinschen143-85/+108
Create subdirs and move files accordingly: - DevDocs: doc files - fhandler: fhandler sources, split fhandler.cc into base.cc and null.cc - local_includes: local include files - scripts: scripts called during build - sec: security sources Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-05Cygwin: mount_info::get_mounts_here: alloc temp mountpoint info on cygheapCorinna Vinschen1-5/+5
That *should* be slightly faster than allocating on the user heap. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-05Cygwin: drop last usage of RtlCreateUnicodeStringFromAsciizCorinna Vinschen3-3/+18
This function is just bad. It really only works for ASCII chars, everything else is broken after the conversion. Introduce new helper function sys_mbstouni to replace RtlCreateUnicodeStringFromAsciiz in hash_path_name. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-05Cygwin: pty: Fix a small bug in is_console_app().Takashi Yano1-1/+1
- Previsouly, there was potential risk of buffer over run in is_console_app(). This patch fixes the issue.
2022-08-04Cygwin: use locale-aware conversion to UNICODE_STRING checking mount pointsCorinna Vinschen4-16/+35
mount_info::get_mounts_here used RtlCreateUnicodeStringFromAsciiz which translates bytes into wide chars verbatim. Create a new function sys_mbstouni_alloc which can be used from mount_info::get_mounts_here to convert multibyte mount point strings to UNICODE_STRINGS in a locale-aware way. For symmetry, create a function mount_info::free_mounts_here, so the knwoledge how to free the UNICODE_STRING buffers is encapsulated in the same class. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: drop all usages of NTAPICorinna Vinschen3-285/+223
and drop unused prototypes from ntdll.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: drop all usages of WINAPICorinna Vinschen29-94/+93
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: clock.cc: Drop redundant Windows prototypesCorinna Vinschen1-3/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: drop obsolete _cygwin_noncygwin_dll_entry entry pointCorinna Vinschen1-6/+0
This was obsoleted more than 22 years ago. Time to drop it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: syscalls.cc: remove ".dll" from blessed_executable_suffixesKen Brown2-7/+0
This reverts commit d9e9c7b5a7. The latter added ".dll" to the blessed_executable_suffixes array because on 32-bit Windows, the GetBinaryType function would report that a 64-bit DLL is an executable, contrary to the documentation of that function. That anomaly does not exist on 64-bit Windows, so we can remove ".dll" from the list. Reverting the commit does, however, change the behavior of the rename(2) syscall in the following unlikely situation: Suppose we have an executable foo.exe and we make the call rename ("foo", "bar.dll"); Previously, foo.exe would be renamed to bar.dll. So bar.dll would then be an executable without the .exe extension. The new behavior is that foo.exe will be renamed to bar.dll.exe. [Exception: If there already existed an executable (not a DLL!) with the name bar.dll, then .exe will not be appended.]
2022-08-04Cygwin: Drop outdated IsWow64Process2 prototypeCorinna Vinschen1-13/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: drop outdated __MINGW64_VERSION_MAJOR checksCorinna Vinschen2-11/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: drop __stdcall usageCorinna Vinschen4-5/+5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: syscalls.cc: drop masking macros for standard IO functionsCorinna Vinschen1-25/+2
The actual reason for these wrappers are lost in time, there's no hint even in the pre-2000 ChangeLog files. Apparently they were masking the prototypes or, alternatively, macros from newlib to clash with the definitions in syscalls.cc. They are not needed anymore, so just drop them. This uncovered that the buffer pointer to pwrite is erronously non-const. Fix this on the way out. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: Drop export aliases and masking macros for stdio64 functionsCorinna Vinschen1-12/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: create sparse errmap arrayCorinna Vinschen3-149/+9017
To avoid linear searches for error codes, autogenerate errmap as simple array of errno values indexed by Windows error codes. Restrict to the first 9000 Windows error codes, we don't care for most of them anyway. Define errmap in its own file errmap.h to clean up errno.cc. Change geterrno_from_win_error accordingly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04cacosh: Use approximation for large input.Markus Mützel1-0/+21
Signed-off-by: Martin Storsjö <martin@martin.st> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04casinh: Use approximation for large input.Markus Mützel1-0/+21
Signed-off-by: Martin Storsjö <martin@martin.st> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: net.cc: convert wsock_errmap into a simple array of error codesCorinna Vinschen1-52/+82
Avoid linear searches for error codes by converting wsock_errmap to a ordered array, indexed by WinSock error code (subtracted by WSABASEERR. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: net.cc: create own type host_errmap_t for host_errmapCorinna Vinschen1-5/+6
This decouples host_errmap from the errmap_t definition which is about to be changed in a followup patch. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-04Cygwin: net.cc: constify gai_errmapCorinna Vinschen1-1/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: fix/drop a few commentsCorinna Vinschen4-11/+8
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: __WORDSIZE: Drop 32 bit considerationsCorinna Vinschen5-123/+2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_DLL_EPOCHCorinna Vinschen2-12/+1
fix a comment in check_sanity_and_sync() on the way Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop unused CYGWIN_VERSION_CYGWIN_CONV macroCorinna Vinschen1-2/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: version.h: document API_VERSION of the first 64 bit buildCorinna Vinschen1-0/+3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLLCorinna Vinschen2-4/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_OLD_CTYPECorinna Vinschen2-18/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_OLD_IFREQCorinna Vinschen3-122/+21
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUESCorinna Vinschen2-30/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDRCorinna Vinschen2-5/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop unused CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES macroCorinna Vinschen1-3/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCKCorinna Vinschen5-33/+9
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop unused CYGWIN_VERSION_CHECK_FOR_S_IEXEC macroCorinna Vinschen1-3/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLINGCorinna Vinschen2-11/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_DLL_MALLOC_ENVCorinna Vinschen2-14/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop macro and code for CYGWIN_VERSION_DLL_IS_OLD_TERMIOSCorinna Vinschen3-74/+11
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: drop requirement to build newlib's stdio64Corinna Vinschen4-9/+2
Given that 64 bit Cygwin defines all file access types (off_t, fpos_t, and derived types) as 64 bit anyway, there's no reason left to rely on the stdio64 part of newlib. Use base functions and base types. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-03Cygwin: path: Make some symlinks to /cygdrive/* work.Takashi Yano2-1/+9
- Previously, some symbolic links to /cygdrive/* (e.g. /cygdrive/C, /cygdrive/./c, /cygdrive//c, etc.) did not work. This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin/2022-July/251994.html
2022-08-02Cygwin: console: Modify ConEmu cygwin connector hook.Takashi Yano1-11/+6
- Previously, LoadLibraryA() is hooked for ConEmu cygwin connector. With this patch, GetProcAddress() for "RequestTermConnector" is hooked instead which is more essential for ConEmu cygwin connector.
2022-07-31Cygwin: pty: Treat *.bat and *.cmd as a non-cygwin console app.Takashi Yano2-1/+11
- If *.bat or *.cmd is executed directly from cygwin shell, pty failed to switch I/O pipe to that for native apps. This patch fixes the issue.
2022-07-29Cygwin: console: Avoid accessing NULL pointer via cygheap->ctty.Takashi Yano2-9/+15
- Recent commit "Cygwin: console: Add missing input_mutex guard." has a problem that causes NULL pointer access if cygheap->ctty is NULL. This patch fixes the issue.
2022-07-29Cygwin: Set threadnames with SetThreadDescription()Jon Turney2-2/+32
gdb master recently learnt how to use GetThreadDescription() [1], so set threadnames using SetThreadDescription() [available since Windows 10 1607] as well. This is superior to using a special exception to indicate the thread name to the debugger, because the thread name isn't missed if you don't have a debugger attached at the time it's set. It's not clear what the encoding of a thread name string is, we assume UTF8 for the moment. For the moment, continue to use the old method as well, for the benefit of older gdb versions etc. [1] https://sourceware.org/pipermail/gdb-patches/2022-April/187833.html
2022-07-29Cygwin: uname: drop useless support for unsupported CPU archesCorinna Vinschen1-22/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-07-29Cygwin: gmon.h: drop 32 bit considerationsCorinna Vinschen1-5/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-07-29Cygwin: profile.c: drop i686 register accessCorinna Vinschen1-3/+3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-07-28Cygwin: rename __cygwin_environ and drop env redirection via cur_environ()Corinna Vinschen11-36/+30
Back in early Cygwin development a function based access to the environment was exported, the internal environ in Cygwin was called __cygwin_environ and cur_environ() was used to access the environment indirectly . The history of that necessity is not documented, but kept in i686 for backward compatibility. The x86_64 port eventually used __cygwin_environ directly and exported it as DATA under the usual name environ. We don't need the i686 workaround anymore, so just rename __cygwin_environ to environ, drop the cur_environ() macro and simply export environ under its own name. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-07-28Cygwin: perl scripts: drop support for i686Corinna Vinschen3-410/+14
- rename "is64bit" to "is_x86_64" - Always set sym_prefix to empty string and add a FIXME - speclib: rename uscore to sym_prefix and fix bug in string handling Signed-off-by: Corinna Vinschen <corinna@vinschen.de>