aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-15Cygwin: Add description of fsync() fix to 3.3.5 release notes.Takashi Yano1-0/+4
2022-03-14Cygwin: path: Convert type of variable 'remlen' to DWORD.Takashi Yano1-2/+1
- Variable remlen stores the return value of QueryDosDeviceW(), so it is better to be DWORD.
2022-03-14Cygwin: path: Add fallback for DFS mounted drive.Takashi Yano1-5/+12
- If UNC path for DFS is mounted to a drive with drive letter, the error "Too many levels of symbolic links" occurs when accessing to that drive. This is because GetDosDeviceW() returns unexpected string such as "\Device\Mup\DfsClient\;Z:000000000003fb89\dfsserver \dfs\linkname" for the mounted UNC path "\??\UNC\fileserver\share". This patch adds a workaround for this issue. Addresses: https://cygwin.com/pipermail/cygwin/2022-March/250979.html
2022-03-14Cygwin: fsync: Return EINVAL for special files.Takashi Yano1-1/+1
- Unlike linux, fsync() calls FlushFileBuffers() even for special files. This causes the problem reported in: https://cygwin.com/pipermail/cygwin/2022-March/251022.html This patch fixes the issue.
2022-03-13newlib: xstormy16: move malloc multiplex logic from build to source filesMike Frysinger9-85/+84
Rather than define per-object rules in the Makefile, have small files that define & include the right content. This simplifies the build rules, and makes understanding the source a little easier (imo) as it makes all the subdirs behave the same: you have 1 source file and it produces 1 object. It's also about the same amount of boiler plate, without having to define custom build rules that can fall out of sync. We also realign the free & pvalloc definitions: common code puts these in malloc.o & valloc.o respectively, not in free.o & pvalloc.o objects. This will also be important as we merge the libc.a build into the top dir since it relies on a single flat list of objects for overrides.
2022-03-13newlib: xstormy16: break up mallocr stubsMike Frysinger6-63/+60
Move the multiplex logic out of the build and into source files to make the build rules a lot simpler.
2022-03-13newlib: xstormy16: fix mallopt definition & mstats handlingMike Frysinger3-28/+29
The mallopt symbol is defined in tiny-malloc.c, not mallocr.c, but the Makefile in here tries to compile it out of the latter. This leads to mallopt never being defined. The build also creates mallinfo.o & mallopt.o & mallstats.o objects to override common ones, but the common dir doesn't use these names. Instead, it places these all in mstats.o. So move the build define logic to a dedicated file and compile it directly to make things a bit simpler while fixing the missing func and aligning objects with the cmomon code.
2022-03-10Cygwin: console, pty: Fix segfault in child_info_spawn::worker().Takashi Yano2-3/+7
- After the commit "Cygwin: pty, console: Fix handle leak which occurs on exec() error.", startxwin cannot start X due to the error "Failed to activate virtual core keyboard: 2". The problem is access violation in the code retrieving the pgid of the ctty. This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251013.html
2022-03-09newlib: libc: move stdlib multiplex logic from build to source filesMike Frysinger14-193/+153
Rather than define per-object rules in the Makefile, have small files that define & include the right content. This simplifies the build rules, and makes understanding the source a little easier (imo) as it makes all the subdirs behave the same: you have 1 source file and it produces 1 object. It's also about the same amount of boiler plate, without having to define custom build rules that can fall out of sync. This will also be important as we merge the libc.a build into the top dir since it relies on a single flat list of objects for overrides. Also take the opportunity to clean up the unnecessary header deps in here. Automake provides dependency generation for free now.
2022-03-09build: Avoid length() awk functionSebastian Huber2-4/+4
Some awk implementations such as old versions of mawk do not support the length() function. Use the return value of the POSIX split() function instead.
2022-03-09newlib: rename mallocr.c to _mallocr.cMike Frysinger3-24/+24
This file is a little confusing: it provides all of the mallocr logic, but is compiled multiple times to produce a unique symbol each time. For example, building mallocr.c with -DDEFINE_FREER produces freer.o that only defines _free_r(). This is fine for most symbols, but it's a little confusing when defining mallocr itself -- we produce a file with the same symbol name, but we still need -DDEFINE_MALLOCR. In order to move the logic from the build rules to source files, using mallocr.c both as a multiplexer and for defining a single symbol is a bit tricky. It's possible (if we add a lot of redundant preprocessor checks to mallocr.c, or we add complicated build flags just for this one files), but it's easier if we simply rename this to a dedicated file. So let's do that. We do this as a dedicated commit because the next one will create a new mallocr.c file and git's automatic diff algorithms can handle trivial renames, but it can't handle renames+creates in the same commit.
2022-03-09newlib: move nano-malloc logic from build to source filesMike Frysinger3-116/+67
Simplify the build system logic a bit by moving the mallocr.c -> nano-mallocr.c redirection from the Makefile to the source files. This allows for consistent object name usage regardless of the configuration options used in case a machine dir wants to define its own override.
2022-03-07Fix Bug libc/28945Jeff Johnston1-1/+1
- apply fix from Tom de Vries <vries@gcc.gnu.org> to have calloc zero out storage for nvptx calloc function
2022-03-05Cygwin: update 3.3.5 release notesTakashi Yano1-0/+8
2022-03-05Cygwin: add 3.3.5 release notesTakashi Yano1-0/+30
2022-03-05Cygwin: pty: Adopt the variable name to the name generally used.Takashi Yano1-10/+10
- Generally, '\n' is called "line feed" (not "new line"), so the variable name p_nl has been changed to p_lf.
2022-03-05Cygwin: pty: Add several further comments to the pty code.Takashi Yano1-3/+15
2022-03-05Cygwin: pty: Take account of CR+NL line feed in input.Takashi Yano1-7/+16
- Currently, individual CR or NL is treated as line feed in accept_input() and transfer_input(). This patch takes account of CR+NL as well.
2022-03-04Cygwin: pty: Fix a possible race issue in initialization of pcon.Takashi Yano1-1/+2
- Currently, tty::pcon_start flag is cleared before transfer_input() in master::write(), however, the code in setup_pseudoconsole() waits for transfer_input() using tty::pcon_start. This possibly causes the race issue. The patch fixes this potential issue.
2022-03-04Cygwin: pty: Update some comments in pty code.Takashi Yano1-8/+21
2022-03-04Cygwin: pty: Omit transfer_input() call where it is no longer needed.Takashi Yano1-47/+0
- This patch removes the old code which calls transfer_input() but is no longer needed. These code was necessary indeed in the past, however, as a result of recent frequent code changes, it is no longer needed.
2022-03-04Cygwin: pty: Rearrange reset_switch_to_nat_pipe() calls.Takashi Yano3-14/+11
- Previously, reset_switch_to_nat_pipe() is called from many places in pty code. This patch reorganizes that. With this patch, it is called only from bg_check() and setpgid_aux(). The calls which does not have enough reason have been omitted.
2022-03-04Cygwin: pty: Treat both CR and NL as line feed in transfer_inpup().Takashi Yano1-2/+4
- To make read() work properly in canonical mode, writing to the pty pipe should be done line by line. However, only CR was treated as line separator previously in transfer_input(). This patch fixes the issue.
2022-03-04libgloss: add new Build System Internals node to the menuMike Frysinger1-1/+2
Seems that some versions of texinfo require the @menu to have all entries at the top level, so add the new build one to it.
2022-03-04Cygwin: pty: Stop to use PID_NEW_PG flag as a marker for GDB.Takashi Yano3-13/+16
- Previously, the PID_NEW_PG flag was also used as a marker for GDB with non-cygwin inferior, unlike its original meaning. With this patch, the condition exec_dwProcessId == dwProcessId is used as a marker for that instead.
2022-03-04Cygwin: pty: Simplify the setup code for GDB a bit.Takashi Yano1-13/+14
- This patch omits the unnecessary code path for setup for GDB.
2022-03-04Cygwin: pty: Rename nat_pipe_owner_alive() to process_alive().Takashi Yano1-6/+9
- The function nat_pipe_owner_alive() is used even for the process which is not a nat pipe owner, so, it is renamed to process_alive().
2022-03-02Cygwin: getconf: align -a output to glibc getconfCorinna Vinschen1-2/+2
glibc getconf doesn't print "undefined" for undefined values in -a output. It just prints the empty string. Do it the same way. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-02Cygwin: sysconf: don't set errno for unsupported optionsCorinna Vinschen1-9/+7
We return -1 with errno set to EINVAL for sysconf options for values required by POSIX, but not implemented on Cygwin. This is incorrect. Return -1, but don't set errno for these options. Drop the "nsup" enum to indicate unsupported values, it's not required anymore. Fixes: 59e3b6ca7dc10 (CVS import) Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-02Cygwin: sysconf: belatedly add correct return value for _SC_DELAYTIMER_MAXCorinna Vinschen1-1/+1
When adding the timer_getoverrun function, DELAYTIMER_MAX was added to limits.h, but the return value of sysconf(_SC_DELAYTIMER_MAX) wasn't changed accordingly. Fix that now. Fixes: 9e295a8d193e ("Cygwin: posix timers: implement timer_getoverrun") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-03Cygwin: pty: Add still missing acquire/release_attach_mutex.Takashi Yano1-8/+40
- transfer_input() function uses console api, so it should be guarded by attach_mutex. However, in most cases, it is missing. This patch fixes the issue.
2022-03-02Cygwin: pty: Communalize the code for temporary attach to console.Takashi Yano3-91/+66
- This patch communalizes the code for attaching another console temporarily and resuming to the original attach state, because there were a plurality of similar codes throughout.
2022-03-02Cygwin: console, pty: Revamp the acquire/release_attach_mutex timing.Takashi Yano5-44/+155
- This patch revises the acquiring/releasing timing for attach_mutex to make the period in which it is being acquired shorter. Further, acquiring/releasing are added to where they are missing but needed.
2022-03-02Cygwin: _pinfo::siginfo: fix sig_send callCorinna Vinschen1-1/+1
Request __SIGPENDINGALL, not __SIGPENDING, when fetching signal info for the calling process. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-02Cygwin: console: Fix a bug from comparison between int and DWORD.Takashi Yano1-1/+1
2022-03-01newlib: convert INTERNAL_NEWLIB to _LIBCMike Frysinger4-41/+38
Since we already set up _LIBC to indicate source files are building for newlib, we don't need this malloc-specific symbol. Convert it over to simplify the build a bit.
2022-03-01newlib: drop redundant AM_MAINTAINER_MODE callMike Frysinger2-31/+1
This is already called earlier in this file, so no need to do it again.
2022-03-01libgloss: merge lm32 into top-level MakefileMike Frysinger6-126/+82
Avoid a recursive make to speed things up a bit. This drops the header install logic because the lm32/ subdir doesn't actually have any header files to install.
2022-03-01libgloss: use m4_foreach_w to simplify the logic a bitMike Frysinger2-22/+24
It's functionally the same, but the configure.ac code is simpler and less boiler plate duplicated.
2022-03-02Cygwin: console: Prevent special keys processing from drop.Takashi Yano2-9/+15
- There was a potential risk to drop special key processing when process_input_messsage() is called intermittently. This patch fixes the issue.
2022-03-02Cygwin: console: Stop to create struct instance which is not needed.Takashi Yano1-9/+9
- In fhandler_console::cons_master_thread(), a struct which has only a static function is used. In this case, struct instance is not necessary. So with this patch, the static function is invoked without creating instance.
2022-03-01Cygwin: update 3.4 release textCorinna Vinschen2-0/+6
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: /proc/<PID>/status: Fill SigPnd, SigBlk and SigIgn values with lifeCorinna Vinschen4-12/+70
So far the values of SigPnd and SigBlk were always 0 and SigIgn was incorrectly set to the block mask of the current thread of the calling process. Fix that by adding a _pinfo::siginfo method and a PICOM_SIGINFO message to allow to request actual signal info of any running process. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: wait_sig: allow to compute process-wide mask of pending signalsCorinna Vinschen2-1/+22
Add a signal __SIGPENDINGALL to allow computing the mask of all currently pending signals. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: add init_cygheap::compute_sigblkmask methodCorinna Vinschen2-0/+19
Add method to compute process-wide signal block mask Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: Makefile: fix ctags --extras optionCorinna Vinschen1-1/+1
--extra is deprectated, use --extras Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: handle_sigprocmask: If new signal set is NULL, ignore "how"Corinna Vinschen1-3/+3
The "how" value only makes sense if a new set is given. If we only read the current signal set, ignore the value of "how" per POSIX: "If set is a null pointer, the value of the argument how is not significant" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: /proc/<PID>/status: fix format specifierCorinna Vinschen1-3/+3
The format specifier used for the signal masks is incorrectly assuming 32 bit values. Fix it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: pty: Rename some functions/variables with the name *pcon*.Takashi Yano5-179/+203
- With this patch, some pty functions/variables have been renamed so that the name *pcon* is not used for those that are called even when the pseudo console is not active.
2022-03-01Cygwin: sysconf: _SC_TZNAME_MAX: return -1 as valid valueCorinna Vinschen1-1/+1
sysconf incorrectly sets errno to EINVAL for _SC_TZNAME_MAX. Don't do that. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>