Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-15newlib: libc: merge build up a directorytopic/vapier-libcMike Frysinger
Convert all the libc/ subdir makes into the top-level Makefile. This allows us to build all of libc from the top Makefile without using any recursive make calls. This is faster and avoids the funky lib.a logic where we unpack subdir archives to repack into a single libc.a. The machine override logic is maintained though by way of Makefile include ordering, and source file accumulation in libc_a_SOURCES. There's a few dummy.c files that are no longer necessary since we aren't doing the lib.a accumulating, so punt them.
2022-03-14Cygwin: path: Add fallback for DFS mounted drive.Takashi Yano
- 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 Yano
- 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-14newlib: xstormy16: move malloc multiplex logic from build to source filesMike Frysinger
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-14newlib: xstormy16: break up mallocr stubsMike Frysinger
Move the multiplex logic out of the build and into source files to make the build rules a lot simpler.
2022-03-14newlib: xstormy16: fix mallopt definition & mstats handlingMike Frysinger
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 Yano
- 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-10newlib: libc: move stdlib multiplex logic from build to source filesMike Frysinger
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 Huber
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 Frysinger
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 Frysinger
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 Johnston
- 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 Yano
2022-03-05Cygwin: add 3.3.5 release notesTakashi Yano
2022-03-05Cygwin: pty: Adopt the variable name to the name generally used.Takashi Yano
- 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 Yano
2022-03-04Cygwin: pty: Take account of CR+NL line feed in input.Takashi Yano
- 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 Yano
- 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 Yano
2022-03-04Cygwin: pty: Omit transfer_input() call where it is no longer needed.Takashi Yano
- 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 Yano
- 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 Yano
- 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 Frysinger
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-03Cygwin: pty: Stop to use PID_NEW_PG flag as a marker for GDB.Takashi Yano
- 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-03Cygwin: pty: Simplify the setup code for GDB a bit.Takashi Yano
- This patch omits the unnecessary code path for setup for GDB.
2022-03-03Cygwin: pty: Rename nat_pipe_owner_alive() to process_alive().Takashi Yano
- 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-03Cygwin: getconf: align -a output to glibc getconfCorinna Vinschen
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-03Cygwin: sysconf: don't set errno for unsupported optionsCorinna Vinschen
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-03Cygwin: sysconf: belatedly add correct return value for _SC_DELAYTIMER_MAXCorinna Vinschen
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-02Cygwin: pty: Add still missing acquire/release_attach_mutex.Takashi Yano
- 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 Yano
- 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 Yano
- 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 Vinschen
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 Yano
2022-03-02newlib: convert INTERNAL_NEWLIB to _LIBCMike Frysinger
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-02newlib: drop redundant AM_MAINTAINER_MODE callMike Frysinger
This is already called earlier in this file, so no need to do it again.
2022-03-02libgloss: merge lm32 into top-level MakefileMike Frysinger
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-02libgloss: use m4_foreach_w to simplify the logic a bitMike Frysinger
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 Yano
- 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 Yano
- 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 Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: /proc/<PID>/status: Fill SigPnd, SigBlk and SigIgn values with lifeCorinna Vinschen
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 Vinschen
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 Vinschen
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 Vinschen
--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 Vinschen
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 Vinschen
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 Yano
- 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 Vinschen
sysconf incorrectly sets errno to EINVAL for _SC_TZNAME_MAX. Don't do that. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01Cygwin: pty: Reorganize the code path of setting up and closing pcon.Takashi Yano
- This patch reorganizes the code path of setting-up and cleaning-up of the pseudo console to improve readability and maintainability of pty code.