aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-06-06Cygwin: child_info.h: remove declaration of init_child_infoKen Brown1-2/+0
The function was removed long ago, but its declaration remained.
2022-06-06Cygwin: Drop use of loadlib.h in regtoolJon Turney1-12/+1
Link directly with RegDeleteKeyExW(), available since Vista. (It's unclear the LoadLibrary wrapper was ever doing anything useful here, as (i) DLL lookup in PATH was avoided as advapi32 is already loaded into the process, and (ii) advapi32 is a 'known DLL' which is only ever loaded from system directory)
2022-06-06Cygwin: Drop pointless loadlib.h includes in utilitiesJon Turney4-4/+0
These utilities used to LoadLibrary()/GetProcAddress(), but don't anymore.
2022-05-29Cygwin: remove miscellaneous 32-bit codeKen Brown47-852/+12
2022-05-29Cygwin: remove 32-bit only clipboard codeKen Brown2-35/+4
2022-05-29Cygwin: remove some 32-bit only environment codeKen Brown7-86/+0
2022-05-29Cygwin: remove some 32-bit only path conversion functionsKen Brown3-89/+0
2022-05-29Cygwin: remove regparm.hKen Brown78-495/+473
This file defines the macros __reg1, __reg2, and __reg3, which are defined to be empty on 64-bit Cygwin. Remove all occurrences of these macros.
2022-05-29Cygwin: simplify some function namesKen Brown37-260/+124
Remove "32" or "64" from each of the following names: acl32, aclcheck32, aclfrommode32, aclfrompbits32, aclfromtext32, aclsort32, acltomode32, acltopbits32, acltotext32, facl32, fchown32, fcntl64, fstat64, _fstat64, _fstat64_r, ftruncate64, getgid32, getgrent32, getgrgid32, getgrnam32, getgroups32, getpwuid32, getpwuid_r32, getuid32, getuid32, initgroups32, lseek64, lstat64, mknod32, mmap64, setegid32, seteuid32, setgid32, setgroups32, setregid32, setreuid32, setuid32, stat64, _stat64_r, truncate64. Remove prototypes and macro definitions of these names. Remove "#ifndef __INSIDE_CYGWIN__" from some headers so that the new names will be available when compiling Cygwin. Remove aliases that are no longer needed. Include <unistd.h> in fhandler_clipboard.cc for the declarations of geteuid and getegid.
2022-05-29Cygwin: remove some 32-bit-only function definitionsKen Brown14-584/+0
Remove the definitions of the following: acl, aclcheck, aclfrommode, aclfrompbits, aclfromtext, aclsort, acltomode, acltopbits, acltotext, chown, fchown, _fcntl, fstat, _fstat_r, ftruncate, getegid, geteuid, getgid, getgrent, getgrgid, getgrnam, getgroups, getpwduid, getpwuid, getpwuid_r, getuid, initgroups, lacl, lacl32, lchown, lseek, lstat, mknod, mmap, setegid, seteuid, setgid, setgroups, setregid, setreuid, setuid, stat, _stat_r, truncate. [For most of these, the corresponding 64-bit entry points are obtained by exporting aliases. For example, acl is an alias for acl32, and truncate is an alias for truncate64.] Remove the following structs and all code using them (which is 32-bit only): __stat32, __group16, __flock32, __aclent16_t. Remove the typedefs of __blkcnt32_t __dev16_t, __ino32_t, which are used only in code that has been removed. Put the typedefs of __uid16_t and __gid16_t in one header, instead of one header if __INSIDE_CYGWIN__ is defined and a different header otherwise.
2022-05-29Cygwin: document last bug fixKen Brown1-0/+4
2022-05-28Cygwin: cygheap: Fix the issue of cygwin1.dll in the root directory.Takashi Yano1-0/+5
- After the commit 6d898f43, cygwin fails to start if cygwin1.dll is placed in the root directory. This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin/2022-May/251548.html
2022-05-27Add test cases for parser errors after reworked parsing behavior.jdoubleu1-16/+48
2022-05-27Modify tzset_r.c to handle errorsJeff Johnston1-20/+48
- change __tzset_r so errors end up setting the timezone to unnamed UTC
2022-05-25fhandler_proc.cc(format_proc_cpuinfo): add Linux 5.18 cpuinfo flagsBrian Inglis1-2/+20
0x80000008:0 EBX:31 brs AMD Branch Sampling available 0x80000022:0 EAX:0 perfmon_v2 AMD ExtPerfMonAndDbg Performance Monitoring Version 2 0x00000021:0 EBX|EDX|ECX=="IntelTDX " tdx_guest Intel Trust Domain Extensions- Guest Support
2022-05-23Cygwin: fix mknod (64-bit only)Ken Brown2-0/+7
The current definition of mknod in syscalls.cc has a third argument of type __dev16_t instead of dev_t. Fix this on 64-bit Cygwin by making the existing mknod 32-bit only and then exporting mknod as an alias for mknod32. (No fix is needed on 32-bit because mknod is redirected to mknod32 via NEW_FUNCTIONS in Makefile.am.) Addresses: https://cygwin.com/pipermail/cygwin-developers/2022-May/012589.html
2022-05-19Use weak reference for _REENT_SMALLSebastian Huber1-0/+4
Avoid a strong reference to __sfp[] for _impure_data. The __sfp[] is linked in if __sinit() is used for example.
2022-05-19Fix __sFILE::_lock initializationSebastian Huber1-8/+0
The __sFILE::_lock member is present if __SINGLE_THREAD__ is not defined. In this case, it is initialized in __sfp(). It is a bug to do it sometimes also in std().
2022-05-19Cygwin: make sure exec'ed process exists early in process listCorinna Vinschen3-9/+16
killpg(pgid, 0) (or kill_pgrp(pgid, si_signo=0), in signal.cc) fails (returns -1) even when there is a process in the process group pgid, if the process is in the middle of spawnve(), see https://cygwin.com/pipermail/cygwin/2022-May/251479.html When exec'ing a process the assumption is that the exec'ed process creates its own symlink (in pinfo::thisproc() in pinfo.cc). If the exec'ing process calls NtClose on it's own winpid symlink, but the exec'ed process didn't progress enough into initialization, there's a slim chance that neither the exec'ing process, nor the exec'ed process has a winpid symlink attached. Always create the winpid symlink in spawn.cc, even for exec'ed Cygwin processes. Make sure to dup the handle into the new process, and stop creating the winpid symlink in exec'ed processes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-19Cygwin: Use two pass parse for tlsoffsets generation.Takashi Yano1-5/+22
- The commit "Cygwin: fix new sigfe.o generation in optimized case" fixed the wrong tlsoffsets generation by adding -O0 to compile options. Current gentls_offsets expects entry of "start_offset" is the first entry in the assembler code. However, without -O0, entry of "start_offset" goes to the last entry for some reason. Currently, -O0 can prevents assembler code from reversing the order of the entries, however, there is no guarantee that it will retain the order of the entries in the future. This patch makes gentls_offsets parse the assembler code in the two pass to omit -O0 option dependency.
2022-05-18newlib: libc: reent.h: remove unnecessary parenthesesJia-Wei Chen1-1/+1
The compiler warns the double parentheses are unnecessary in some target, and cause fail cases when doing some testcases in regression. gcc/testsuite/g++.dg/warn/Wstringop-overflow-6.C Remove the unnecessary parentheses will fix it. See more details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85775 Same like in commit 05425831290c9869bc7987b5df3ce84aa4f19a6c, Author: Maxim Blinov <maxim.blinov@embecosm.com> Date: Thu Jul 22 22:41:42 2021 +0100 Remove unneccesary parenthesis around declarator Thanks for Sebastian Huber's remind!
2022-05-18Use global atexit data for all configurationsSebastian Huber12-107/+46
For the exit processing only members of _GLOBAL_REENT were used by default. If the _REENT_GLOBAL_ATEXIT option was enabled, then the data structures were provided through dedicated global objects. Make this option the default. Remove the option. Rename struct _reent members _atexit and _atexit0 to _reserved_6 and _reserved_7, respectively. Provide them only if _REENT_BACKWARD_BINARY_COMPAT is defined.
2022-05-18Optional struct _reent::_new::_unusedSebastian Huber1-7/+5
Rename struct _reent::_new::_unused members _nextf and _nmalloc to _reserved_3 and _reserved_4, respectively. Rename struct _reent::_new member _unused to _reserved_5. Provide them only if _REENT_BACKWARD_BINARY_COMPAT is defined. Remove unused _N_LISTS define.
2022-05-18Optional struct _reent::_new::_reent::_unused_randSebastian Huber1-2/+6
Rename struct _reent member _unused_rand to _reserved_2. Provide it only if _REENT_BACKWARD_BINARY_COMPAT is defined.
2022-05-18Optional struct _reent::_unspecified_locale_infoSebastian Huber1-7/+9
Rename struct _reent member _unspecified_locale_info to _reserved_1. Provide it only if _REENT_BACKWARD_BINARY_COMPAT is defined.
2022-05-18Optional struct _reent::__unused_sdidinitSebastian Huber1-9/+15
Rename struct _reent member __unused_sdidinit to _reserved_0. Provide it only if _REENT_BACKWARD_BINARY_COMPAT is defined.
2022-05-18Cygwin: Enable backward binary compatibilitySebastian Huber1-0/+1
2022-05-18Add --enable-newlib-reent-binary-compatSebastian Huber5-0/+51
Add the --enable-newlib-reent-binary-compat configure option. This option is disabled by default. If enabled, then unused members in struct _reent are preserved to maintain the structure layout.
2022-05-18Use right lock release in __register_exitproc()Sebastian Huber1-1/+1
2022-05-17Fix stdio exit handlingSebastian Huber1-12/+17
Make sure that the stdio exit handler is set in all stdio initialization paths. The bug was introduced by commit 26747c47bc0a1137e02e0377306d721cc3478855.
2022-05-17Cygwin: drop i686 exception handlingCorinna Vinschen3-484/+72
Leave x86_64 CPU-specific code and #error out when trying to build for another target. Access special registers CPU-agnostic. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-16Cygwin: drop PROCESSOR_ARCHITECTURE_INTEL from unameCorinna Vinschen1-3/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-16Cygwin: document why we can't drop the _pei386_runtime_relocator dummyCorinna Vinschen1-1/+4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-16Cygwin: drop i386 refs from header files where source isn't affectedCorinna Vinschen3-10/+2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-16Cygwin: drop 32 bit considerations in crt0 codeCorinna Vinschen2-21/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-16Cygwin: CI: Drop i686 buildsJon Turney2-8/+1
i686 builds just fail with 'Invalid target processor "i686"' since commit fcb32b7.
2022-05-16Cygwin: add 3.3.6 release notesTakashi Yano1-0/+5
2022-05-16newlib: Regenerate Makefile.inSebastian Huber1-18/+18
Regenerate Makefile.in to include changes in Makefile.am of commit 81b7cf09faa523e7bb438abe24e6e5376e45a0e5.
2022-05-15Cygwin: pty: Fix script command crash on console in Win7.Takashi Yano6-8/+96
- Previously, the command "cmd /c script -c cmd" in console of Win7 crashes. This seems to be due to a bug (?) of AttachConsole(). This patch adds workaround for this issue. Currently, pty reattaches to the console of the process which is predetermined by ConsoleProcessList() after temporarily attaching to another console. After that, the console output handle opened with the name "CONOUT$" may not be accessible in Win7. This seems to happen when the attached process does not have the same handle even if the console attached is the same. With this patch, cygwin-console-helper which is started when pty master is opened in console, is utilized to be a target process to which pty reattaches if the OS is Win7.
2022-05-13Cygwin: fix new sigfe.o generation in optimized caseCorinna Vinschen2-11/+11
Commit 0597c84b9bdb ("Cygwin: revamp TLS offsets computation") introduced a really weird problem when building Cygwin with optimization. First of all, the tlsoffsets file is broken with -O2. This can easily be fixed by running the compiler with -O0 when called from the gentls_offsets script. But it gets worse: When creating sigfe.o with optimization, the generated machine code uses incorrect offsets: For some reason the assembler codes using _cygtls.stackptr as offset value are assembled into machine code using _cygtls.pstackptr as offsets. And as if that isn't already absurd enough, renaming _cygtls.pstackptr to, say, _cygtls.blurb, fixes the assembled machine code expressions; they use the value of _cygtls.stackptr again. So I changed gentls_offsets and gendef to use _cygtls.foo_p rather than _cygtls.pfoo and that fixes the assembled code in the optimized case. No, I can't explain that. There's no system in that behaviour. It looks absolutely crazy. Fixes: 0597c84b9bdb ("Cygwin: revamp TLS offsets computation") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: utils: drop unnecessary wow64 checksCorinna Vinschen2-33/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: drop a few minor references to WOW64Corinna Vinschen4-8/+4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: wincap: drop has_gaa_largeaddress_bug flag and related codeCorinna Vinschen3-63/+9
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: wincap: drop has_broken_prefetchvm flag and related codeCorinna Vinschen3-24/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: drop system_wow64_directory and related codeCorinna Vinschen3-17/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: drop create_token and dependent functionsCorinna Vinschen4-392/+9
Given we only called create_token on W7 WOW64 anyway, we can now drop this function and all other functions only called from there entirely. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: wincap: drop no_msv1_0_s4u_logon_in_wow64 flag and related codeCorinna Vinschen3-189/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: wincap: set def_guard_pages to x86_64 value right awayCorinna Vinschen1-16/+12
Drop conditional code in wincapc::init. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: wincap: drop wow64 flag and all conditions depending on itCorinna Vinschen6-46/+4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13Cygwin: revamp TLS offsets computationCorinna Vinschen6-332/+169
- convert gentls_offsets to a shell script, only running the target compiler and gawk. - Simplify cygtls.h. The new gentls_offsets script only requires two lines with the "public:" keyword as markers. The comments are not used anymore, the output is a preprocesses file without comments. Align Makefile rules accordingly. - Rather than generating perl variables and C #defines, just generate .ecu statements and .include the TLS offsets file right from the generated assembler file sigfe.s. It's the only place we really need (some of) the offsets. - Drop the target-specific name of the TLS offsets file and generate it on the fly in the build dir. Fix configure and Makefile rules accordingly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>