]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
2 years agoCygwin: utils: drop unnecessary wow64 checks topic/rip-off-32 github/topic/rip-off-32
Corinna Vinschen [Sat, 19 Mar 2022 11:54:07 +0000 (12:54 +0100)]
Cygwin: utils: drop unnecessary wow64 checks

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: drop a few minor references to WOW64
Corinna Vinschen [Mon, 7 Mar 2022 12:11:34 +0000 (13:11 +0100)]
Cygwin: drop a few minor references to WOW64

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: wincap: drop has_gaa_largeaddress_bug flag and related code
Corinna Vinschen [Mon, 7 Mar 2022 11:51:40 +0000 (12:51 +0100)]
Cygwin: wincap: drop has_gaa_largeaddress_bug flag and related code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: wincap: drop has_broken_prefetchvm flag and related code
Corinna Vinschen [Mon, 7 Mar 2022 11:30:32 +0000 (12:30 +0100)]
Cygwin: wincap: drop has_broken_prefetchvm flag and related code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: drop system_wow64_directory and related code
Corinna Vinschen [Mon, 7 Mar 2022 11:20:00 +0000 (12:20 +0100)]
Cygwin: drop system_wow64_directory and related code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: drop create_token and dependent functions
Corinna Vinschen [Mon, 7 Mar 2022 10:29:42 +0000 (11:29 +0100)]
Cygwin: drop create_token and dependent functions

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>
2 years agoCygwin: wincap: drop no_msv1_0_s4u_logon_in_wow64 flag and related code
Corinna Vinschen [Mon, 7 Mar 2022 09:42:08 +0000 (10:42 +0100)]
Cygwin: wincap: drop no_msv1_0_s4u_logon_in_wow64 flag and related code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: wincap: set def_guard_pages to x86_64 value right away
Corinna Vinschen [Mon, 7 Mar 2022 09:35:20 +0000 (10:35 +0100)]
Cygwin: wincap: set def_guard_pages to x86_64 value right away

Drop conditional code in wincapc::init.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: wincap: drop wow64 flag and all conditions depending on it
Corinna Vinschen [Mon, 7 Mar 2022 09:31:15 +0000 (10:31 +0100)]
Cygwin: wincap: drop wow64 flag and all conditions depending on it

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: revamp TLS offsets computation
Corinna Vinschen [Wed, 2 Feb 2022 16:27:34 +0000 (17:27 +0100)]
Cygwin: revamp TLS offsets computation

- 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>
2 years agoCygwin: configure: Define default valus for target specific variables
Corinna Vinschen [Thu, 27 Jan 2022 11:41:55 +0000 (12:41 +0100)]
Cygwin: configure: Define default valus for target specific variables

Define default values for DLL_ENTRY, DIN_FILE, and TLSOFFSETS_H
and drop them from the x86_64-specific branch.  Keep the mechanism
intact to allow other target CPUs if there ever will be.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: config.h: stop including auto-generated tlsoffsets.h file
Corinna Vinschen [Thu, 27 Jan 2022 11:39:57 +0000 (12:39 +0100)]
Cygwin: config.h: stop including auto-generated tlsoffsets.h file

This was a hack to begin with.  Clean this mess up:

- Move definition of CYGTLS_PADSIZE to cygwin/config.h and drop
  local cygtls_padsize.h
- Rename CYGTLS_PADSIZE to __CYGTLS_PADSIZE__ to keep namespace
  clean.  Redefine as macro, rather than as const.
- Move struct _reent first in struct _cygtls to allow using
  __CYGTLS_PADSIZE__ as offset in __getreent().

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: drop i686-only files
Corinna Vinschen [Wed, 26 Jan 2022 16:30:43 +0000 (17:30 +0100)]
Cygwin: drop i686-only files

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: configure: drop unused DEF_DLL_ENTRY variable
Corinna Vinschen [Wed, 26 Jan 2022 16:28:04 +0000 (17:28 +0100)]
Cygwin: configure: drop unused DEF_DLL_ENTRY variable

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: configure: disable i686 builds
Corinna Vinschen [Wed, 26 Jan 2022 16:20:13 +0000 (17:20 +0100)]
Cygwin: configure: disable i686 builds

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: signal.cc: Include <unistd.h>
Sebastian Huber [Thu, 12 May 2022 09:21:08 +0000 (11:21 +0200)]
Cygwin: signal.cc: Include <unistd.h>

Include <unistd.h> for sleep() and usleep() declarations.  Fix return type of
usleep().

2 years agofhandler_process.cc(format_process_stat): fix /proc/pid/stat issues
Brian Inglis [Tue, 10 May 2022 14:44:42 +0000 (08:44 -0600)]
fhandler_process.cc(format_process_stat): fix /proc/pid/stat issues

fix tty_nr maj/min bits, vmmaxrss units, and x86 format mismatch:
ctty maj is 31:16, min is 15:0; tty_nr s/b maj 15:8, min 31:20, 7:0;
vmmaxrss s/b bytes not pages;
times all 64 bit - change formats of first two instances from %lu to %U;
realign sprintf formats and variables/values in more logical groups

2 years agoCygwin: pty: Avoid script command crash in console.
Takashi Yano [Mon, 9 May 2022 10:45:18 +0000 (19:45 +0900)]
Cygwin: pty: Avoid script command crash in console.

- Previously, script command sometimes crashes by Ctrl-C in Win 7
  if it is running in console, and non-cygwin app is foreground.
  This patch fixes the issue.

2 years agoCygwin: pty: Not to change code page of parent console.
Takashi Yano [Mon, 9 May 2022 03:23:57 +0000 (12:23 +0900)]
Cygwin: pty: Not to change code page of parent console.

- The recent commit "Cygwin: pty: Fix timing of creating invisible
  console." breaks the feature added by commit 72770148, which
  prevents pty from changing code page of parent console. This patch
  restores that.

2 years agoCygwin: pty: Add missing attach_mutex guard.
Takashi Yano [Sun, 8 May 2022 15:54:35 +0000 (00:54 +0900)]
Cygwin: pty: Add missing attach_mutex guard.

2 years agoCygwin: pty: Avoid deadlock when pcon is started on console.
Takashi Yano [Sun, 8 May 2022 15:19:47 +0000 (00:19 +0900)]
Cygwin: pty: Avoid deadlock when pcon is started on console.

- Previously, "env SHELL=cmd script" command in console caused
  deadlock when starting cmd.exe. This patch fixes the issue.

2 years agoCygwin: pty: Change the condition to send Ctrl-C event.
Takashi Yano [Sun, 8 May 2022 13:04:38 +0000 (22:04 +0900)]
Cygwin: pty: Change the condition to send Ctrl-C event.

- Previously, non-cygwin app started by "script -c <non-cygwin app>"
  receives Ctrl-C twice. This patch fixes the issue.

2 years agoCygwin: pty: Fix timing of creating invisible console.
Takashi Yano [Sun, 8 May 2022 10:47:05 +0000 (19:47 +0900)]
Cygwin: pty: Fix timing of creating invisible console.

- Previously, invisible console was created in fixup_after_exec().
  However, actually this should be done in fixup_after_fork(). this
  patch fixes the issue.

2 years agoCygwin: pty: Fix acquiring attach_mutex timing.
Takashi Yano [Sun, 8 May 2022 10:45:31 +0000 (19:45 +0900)]
Cygwin: pty: Fix acquiring attach_mutex timing.

- When temporarily attaching a console, the timing of acquiring
  attach_mutex was not appropriate. This sometimes caused master
  forwarding thread to crash on Ctrl-C in Windows 7. This patch
  fixes the issue.

2 years agoCygwin: sigproc: Avoid segfault caused by signal just after fork().
Takashi Yano [Thu, 5 May 2022 12:12:26 +0000 (21:12 +0900)]
Cygwin: sigproc: Avoid segfault caused by signal just after fork().

- The commit "Cygwin: always add sigmask to child info" also tries
  to fix this issue, however, did not fix enough. This patch fixes
  that.

2 years agoGenerate manpages for functions in chapter sys.tex
Jon Turney [Mon, 2 May 2022 12:55:17 +0000 (13:55 +0100)]
Generate manpages for functions in chapter sys.tex

Also generate manpages for functions in chapter sys.tex, omitted in
error.

2 years agoFix warning about duplicate id in docbook XML
Jon Turney [Mon, 2 May 2022 12:55:16 +0000 (13:55 +0100)]
Fix warning about duplicate id in docbook XML

../newlib/libc/libc.xml:22242: element refentry: validity error : ID iconv already defined
    <refentry id="iconv">

Use a separate namespace for chaper ids, to avoid collision between the
ids for the chapter and function 'iconv', now that iconv documentation
is generated unconditionally.

2 years agoSilence xsltproc when writing manpages
Jon Turney [Mon, 2 May 2022 12:55:15 +0000 (13:55 +0100)]
Silence xsltproc when writing manpages

Unless make is invoked with V=1, have xmlto pass the parameter
'man.output.quietly=1' to xsltproc to suppress "Note: Writing foo.N"
output from the manpages stylesheet.

(This doesn't quite do what it says: The output is not silenced if V has
any value, including 0.  You could consider that either a bug or a
feature.)

2 years agoAdd build avoidance for 'make man'
Jon Turney [Mon, 2 May 2022 12:55:14 +0000 (13:55 +0100)]
Add build avoidance for 'make man'

This will generate multiple manpage files as an output, but we don't
know what they will be called, so use a timestamp for build avoidance.

2 years agoSimplify rules for creating man pages
Jon Turney [Mon, 2 May 2022 12:55:13 +0000 (13:55 +0100)]
Simplify rules for creating man pages

Simplify rules for creating docbook XML used to create manpages:
Updating the output using move-if-change and then unconditionally
touching the .stamp file doesn't make much sense.

2 years agoFix ndbm.c build break
Dimitar Dimitrov [Wed, 4 May 2022 17:03:04 +0000 (20:03 +0300)]
Fix ndbm.c build break

The ndbm.c build broke with:
  Commit 357d7fcc6
  In <stdio.h> provide only necessary types

The above commit exposed a latent missing-header bug:
  newlib/newlib/libc/include/ndbm.h:83:38: error: unknown type name ‘mode_t’

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2 years agoFix nano-malloc build
Dimitar Dimitrov [Wed, 4 May 2022 16:31:43 +0000 (19:31 +0300)]
Fix nano-malloc build

The nano malloc build broke with:
  Commit 357d7fcc6
  In <stdio.h> provide only necessary types

The above commit exposed a latent missing-header bug:
  newlib/libc/stdlib/nano-mallocr.c:220:33: error: ‘uintptr_t’ undeclared (first use in this function)

Fix by including <stdint.h>.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2 years agoRemove _global_impure_ptr indirection
Sebastian Huber [Tue, 3 May 2022 12:51:55 +0000 (14:51 +0200)]
Remove _global_impure_ptr indirection

Remove the pointer indirection through the read-only _global_impure_ptr and
directly use a externally visible _impure_data object of type struct _reent.
This enables the static initialization of global data structures in a follow up
patch.  In addition, we get rid of a machine-specific file.

2 years agoIn <stdio.h> provide only necessary types
Sebastian Huber [Wed, 4 May 2022 08:10:48 +0000 (10:10 +0200)]
In <stdio.h> provide only necessary types

2 years agoRevert "sys/types.h: Don't include sys/_stdint.h"
Corinna Vinschen [Wed, 4 May 2022 13:08:44 +0000 (15:08 +0200)]
Revert "sys/types.h: Don't include sys/_stdint.h"

This reverts commit 4232d171a620662aaed650879936eac60aefd9e0.

2 years agosys/types.h: Don't include sys/_stdint.h
Corinna Vinschen [Tue, 3 May 2022 16:58:18 +0000 (18:58 +0200)]
sys/types.h: Don't include sys/_stdint.h

By including sys/_stdint.h, all types from stdint.h are
exposed even if stdint.h isn't pulled in explicitely. Include
<machine/_default_types.h instead. Fix up newlib and Cygwin
files which rely on stdint.h types, too.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: always add sigmask to child info
Corinna Vinschen [Tue, 3 May 2022 13:16:18 +0000 (15:16 +0200)]
Cygwin: always add sigmask to child info

Even after fork, we might need the parent sigmask without having
access to the real _main_tls. There's a short time at process startup,
when _main_tls points to the system-allocated stack, but wait_sig is
already running. If we can't lock _main_tls, because find_tls can't
find it yet, we now access the parent's sigmask via child_info.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: move x86_64 thread stack area
Corinna Vinschen [Tue, 3 May 2022 13:10:24 +0000 (15:10 +0200)]
Cygwin: move x86_64 thread stack area

The x86_64 thread stack area collides with the share user data in
recent versions of Windows. Let's get ourselvels get out of the
way and move the thread stack area in the former slack space
between DLL area and heap, from 0x6:00000000 to 0x8:00000000.
That quadruplicates the stack area, so allow bigger maximum stack
sizes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: simplify create_new_main_thread_stack
Corinna Vinschen [Tue, 3 May 2022 12:34:42 +0000 (14:34 +0200)]
Cygwin: simplify create_new_main_thread_stack

Originally the function was designed to be used in forked
processes as well, but it has never been used this way. Drop
the parameter only required for forkees.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2 years agoCygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY
Jon Turney [Tue, 12 Apr 2022 10:48:54 +0000 (11:48 +0100)]
Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY

2 years agoCygwin: Fix build with w32api 10.0.0
Jon Turney [Tue, 12 Apr 2022 10:41:13 +0000 (11:41 +0100)]
Cygwin: Fix build with w32api 10.0.0

> ../../../../src/winsup/cygwin/sec_auth.cc:1240:16: error: redefinition of ‘struct _MSV1_0_S4U_LOGON’
>  1240 | typedef struct _MSV1_0_S4U_LOGON
>       |                ^~~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
>                  from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1425:18: note: previous definition of ‘struct _MSV1_0_S4U_LOGON’
>  1425 |   typedef struct _MSV1_0_S4U_LOGON {
>       |                  ^~~~~~~~~~~~~~~~~
> ../../../../src/winsup/cygwin/sec_auth.cc:1246:3: error: conflicting declaration ‘typedef int MSV1_0_S4U_LOGON’
>  1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
>       |   ^~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
>                  from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1430:5: note: previous declaration as ‘typedef struct _MSV1_0_S4U_LOGON MSV1_0_S4U_LOGON’
>  1430 |   } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
>       |     ^~~~~~~~~~~~~~~~
> ../../../../src/winsup/cygwin/sec_auth.cc:1246:22: error: conflicting declaration ‘typedef int* PMSV1_0_S4U_LOGON’
>  1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
>       |                      ^~~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
>                  from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1430:24: note: previous declaration as ‘typedef struct _MSV1_0_S4U_LOGON* PMSV1_0_S4U_LOGON’
>  1430 |   } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;

2 years agolibgloss: pru: Fix _open syscal arguments
Dimitar Dimitrov [Sun, 3 Apr 2022 18:57:39 +0000 (21:57 +0300)]
libgloss: pru: Fix _open syscal arguments

The _open() C function is declared as having variable arguments in
newlib, so second and third arguments are passed on stack. Add code to
move them into registers, since that's where the PRU simulator expects
them.

Issue was exposed by the GCC test gcc.c-torture/execute/fprintf-2.c,
which relies on tmpnam implementation to pass correct flags to _open.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2 years agoCygwin: Fix "0x0x" in gmondump and ssp man pages
Mark Geisert [Fri, 22 Apr 2022 05:36:33 +0000 (22:36 -0700)]
Cygwin: Fix "0x0x" in gmondump and ssp man pages

A recent patch fixed gmondump to stop printing "0x0x" as an address
prefix.  It turns out the Cygwin User's Guide and the gmondump and
ssp man pages (all from utils.xml) have examples of the same error.

2 years agoCygwin: pty: Fix Ctrl-C behaviour in latest GDB.
Takashi Yano [Mon, 18 Apr 2022 11:07:48 +0000 (20:07 +0900)]
Cygwin: pty: Fix Ctrl-C behaviour in latest GDB.

- In the latest GDB (11.2-1), Ctrl-C behaviour is broken a bit for
  non-cygwin inferior. For example, Ctrl-C on GDB prompt is not sent
  to GDB but to the inferior. This patch fixes the issue.

2 years agoCygwin: pty: Fix deadlock caused by Ctrl-C in setup_pseudoconsole().
Takashi Yano [Mon, 18 Apr 2022 10:56:14 +0000 (19:56 +0900)]
Cygwin: pty: Fix deadlock caused by Ctrl-C in setup_pseudoconsole().

- If Ctrl-C is pressed just after setup_pseudoconsole() is called,
  mintty stops to respond a while when CPU load is high. This patch
  fixes the issue.

Addresses: https://cygwin.com/pipermail/cygwin/2022-April/251272.html

2 years agoCygwin: pty: Do not set internal handles in HPCON inheritable.
Takashi Yano [Mon, 11 Apr 2022 01:44:41 +0000 (10:44 +0900)]
Cygwin: pty: Do not set internal handles in HPCON inheritable.

- The internal handles in HPCON should not be inheritable, however,
  the current code duplicates them as inheritable when handing over
  ownership of the pseudo console. This patch fixes the issue.

Addresses: https://cygwin.com/pipermail/cygwin/2022-April/251222.html

2 years agoAarch32/64: Support __FLT_EVAL_METHOD__ values other than 0, 1, 2
Andrea Corallo [Wed, 30 Mar 2022 13:40:59 +0000 (15:40 +0200)]
Aarch32/64: Support __FLT_EVAL_METHOD__ values other than 0, 1, 2

2022-03-30  Andrea Corallo  <andrea.corallo@arm.com>

* libc/include/machine/ieeefp.h (__FLOAT_TYPE, __DOUBLE_TYPE): New
macros.
* libc/include/math.h: Uses __DOUBLE_TYPE __FLOAT_TYPE to define
double_t float_t if possible.

2 years agoCygwin: pty: Close pseudo console only if the process is the owner.
Takashi Yano [Sat, 9 Apr 2022 03:59:54 +0000 (12:59 +0900)]
Cygwin: pty: Close pseudo console only if the process is the owner.

- Currently, close_pseudoconsole() is called unconditionally from
  fhandler_termios::process_sigs() on Ctrl-C. This causes deadlock
  if Ctrl-C is pressed while setup_pseudoconsole() is called. With
  this patch, close_pseudoconsole() is called only if the master
  process is the owner of the nat-pipe to avoid the deadlock.

2 years agoAdd tests for tzset POSIX timezone string compliance
Jeff Johnston [Fri, 8 Apr 2022 21:19:16 +0000 (17:19 -0400)]
Add tests for tzset POSIX timezone string compliance

- patch from jdbouleu <hi@jdoubleu.de>

  - create time.exp and tzset.c files in newlib/testsuite/newlib.time

2 years agoAdd angle TZ angle bracket support to tzset_r
Jeff Johnston [Fri, 8 Apr 2022 19:06:37 +0000 (15:06 -0400)]
Add angle TZ angle bracket support to tzset_r

- from Brian Inglis <Brian.Inglis@systematicsw.ab.ca>

  - add support to _tzset_unlocked_r() to support quoting std and dst
    names with angle brackets <> as per Posix
  - modify documentation of tzset.c

2 years agofix testsuite cannot compile tests
jdoubleu [Thu, 7 Apr 2022 09:31:40 +0000 (11:31 +0200)]
fix testsuite cannot compile tests

DEJAGNU could not find the function 'newlib_target_compile', because it was defined in another file.

2 years agonewlib: Remove superfluous CHECK_STD_INIT() macro
Sebastian Huber [Thu, 31 Mar 2022 06:43:49 +0000 (08:43 +0200)]
newlib: Remove superfluous CHECK_STD_INIT() macro

This macro is unused or expands to nothing.

2 years agoCygwin: pipe: Avoid deadlock for non-cygwin writer.
Takashi Yano [Tue, 22 Mar 2022 13:49:46 +0000 (22:49 +0900)]
Cygwin: pipe: Avoid deadlock for non-cygwin writer.

- As mentioned in commit message of the commit b531d6b0, if multiple
  writers including non-cygwin app exist, the non-cygwin app cannot
  detect pipe closure on the read side when the pipe is created by
  system account or the the pipe creator is running as service.
  This is because query_hdl which is held in write side also is a
  read end of the pipe, so the pipe is still alive for the non-cygwin
  app even after the reader is closed.

  To avoid this problem, this patch lets all processes in the same
  process group close query_hdl using newly introduced internal signal
  __SIGNONCYGCHLD when non-cygwin app is started.

  Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251097.html

2 years agoRemove unused _cleanup()
Matt Joyce [Thu, 31 Mar 2022 14:34:55 +0000 (16:34 +0200)]
Remove unused _cleanup()

Removed the unused function _cleanup() from findfp.c.

2 years agoFix bug introduced in previous patch (44b60f0c)
Matt Joyce [Thu, 31 Mar 2022 14:34:54 +0000 (16:34 +0200)]
Fix bug introduced in previous patch (44b60f0c)

This fixes a bug introduced in a previous patch (Commit 44b60f0c:
Make __sdidinit unused). Removed intitialization of __cleanup from
__smakebuf_r(). All callers of __smakebuf_r() call __sinit()
through the_CHECK_INIT macro, thus __cleanup is already
initialized. This fix also allows _cleanup_r() to be made static.
Changed its name to cleanup_stdio() and removed its declaration
from local.h.

2 years agofhandler_proc.cc(format_proc_cpuinfo): add Linux Superb Owl cpuinfo flags
Brian Inglis [Thu, 24 Mar 2022 04:57:58 +0000 (22:57 -0600)]
fhandler_proc.cc(format_proc_cpuinfo): add Linux Superb Owl cpuinfo flags

0x00000007:1 EBX:0  intel_ppin Intel Protected Processor Inventory Number
0x00000006:0 EAX:19 hfi Hardware Feedback Interface
0x00000007:0 EDX:20 ibt Intel Indirect Branch Tracking

2 years agonewlib: Rename __sfmoreglue() and make it static
Sebastian Huber [Wed, 30 Mar 2022 09:19:59 +0000 (11:19 +0200)]
newlib: Rename __sfmoreglue() and make it static

Rename __sfmoreglue() in sfmoreglue() and make it static.  This function is
only used by __sfp() in the same translation unit.

Remove use of register keyword.

2 years agoReplace _fwalk() calls with _fwalk_reent()
Sebastian Huber [Wed, 30 Mar 2022 09:15:07 +0000 (11:15 +0200)]
Replace _fwalk() calls with _fwalk_reent()

Remove the _fwalk() implementation to avoid duplicated code with
_fwalk_reent().

2 years agoCommit patch from Tobias Burnus <tobias@codesourcery.com>
Jeff Johnston [Wed, 30 Mar 2022 19:58:06 +0000 (15:58 -0400)]
Commit patch from Tobias Burnus <tobias@codesourcery.com>

[PATCH] newlib: Only call _fputwc_r if ELIX_LEVEL >= 4

(nano-)vfprintf.c is enabled for ELIX_LEVEL >= 1. When _WIDE_ORIENT
is set, its __sprint_r / __sfputs_r functions unconditionally called
_fputwc_r which is only in ELEX_LEVEL >= 4. With this commit,
the _WIDE support in (nano-)vfprintf.c is disabled for ELEX_LEVEL < 4.

2 years agoCygwin: pty: Fix crash on master close in Windows 7.
Takashi Yano [Wed, 30 Mar 2022 03:46:08 +0000 (12:46 +0900)]
Cygwin: pty: Fix crash on master close in Windows 7.

- The 4th parameter of WriteFile() cannot be NULL especially in
  Windows 7 as mentioned in Microsoft documentation. This patch
  fixes that.

Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251162.html

2 years agonewlib: drop phoenix support
Mike Frysinger [Sun, 13 Mar 2022 21:22:36 +0000 (17:22 -0400)]
newlib: drop phoenix support

This code has not been updated since 2016, and it looks like it has
rotted quite a bit since.  It does not build against the current set
of phoenix sources -- I had to hack both the kernel headers and the
newlib headers up to get it to build, and I still have no idea if it
actually links or runs.  It seems like the project itself has moved
away from newlib and to its own C library:
https://phoenix-rtos.com/documentation/libc/README.md

So since there's no interest from the phoenix folks to maintain this,
and it has a significant amount of non-standard code that we try to
keep up-to-date (without actually testing it), just punt it all.

2 years agoamdgcn: Fix build failure
Andrew Stubbs [Mon, 21 Mar 2022 14:25:45 +0000 (14:25 +0000)]
amdgcn: Fix build failure

The recent makefile reorganization broke the amdgcn port by creating
duplicate __malloc_lock symbols.  This patch fixes the problem by renaming
the malloc_support.c file to mlock.c, thus overriding the default symbol
properly.  Actually, I'm not sure how this ever worked?

2 years agoiconv: Fix EL/IX level 2 handling
Sebastian Huber [Fri, 18 Mar 2022 15:36:26 +0000 (16:36 +0100)]
iconv: Fix EL/IX level 2 handling

Consistently use

if !ELIX_LEVEL_1

to enable EL/IX level 2 interfaces.

2 years agoRevert accidental change to v850/sim.ld
Jeff Law [Sun, 20 Mar 2022 14:19:45 +0000 (10:19 -0400)]
Revert accidental change to v850/sim.ld

2 years agoAvoid using common symbols in v850 libgloss
Jeff Law [Sun, 20 Mar 2022 00:01:33 +0000 (20:01 -0400)]
Avoid using common symbols in v850 libgloss

I've had this lying around for probably a year or two at this point.
It just changes all the instance of "errno" from a common symbol to an
extern.  I can't offhand recall where the actual definition is, but it
certainly exists in the generic code.

2 years agoCygwin: console: Do not use memcmp() to compare INPUT_RECORD.
Takashi Yano [Sat, 19 Mar 2022 00:21:04 +0000 (09:21 +0900)]
Cygwin: console: Do not use memcmp() to compare INPUT_RECORD.

- Using memcmp() to compare structure such as INPUT_RECORD is not
  correct manner because padding may not be initialized. This patch
  stops to use memcmp() for comparison of INPUT_RECORD.

2 years agoCygwin: console: Ignore dwControlKeyState in event comparison.
Takashi Yano [Fri, 18 Mar 2022 23:43:24 +0000 (08:43 +0900)]
Cygwin: console: Ignore dwControlKeyState in event comparison.

- dwControlKeyState also may be null'ed on WriteConsoleInputW().
  Therefore ignore it in event comparison as well as wVirtualKeyCode
  and wVirtualScanCode.

2 years agoCygwin: console: Add attach_mutex guard that was not added.
Takashi Yano [Fri, 18 Mar 2022 14:28:36 +0000 (23:28 +0900)]
Cygwin: console: Add attach_mutex guard that was not added.

2 years agoCygwin: console: Fix typeahead key swapping which still occurs.
Takashi Yano [Fri, 18 Mar 2022 12:35:07 +0000 (21:35 +0900)]
Cygwin: console: Fix typeahead key swapping which still occurs.

- The commit "Cygwin: console: Improve the code to avoid typeahead
  key swapping." did not solve the problem enough. Two unexpected
  things happen.
  (1) wVirtualKeyCode and wVirtualScanCode of readback key event may
      be null'ed even if they are not zero on WriteConsoleInputW().
      Therefore, memcmp() may report the event sequence is not equal.
  (2) WriteConsoleInputW() may not be atomic. The event sequence
      which is written by WriteConsoleInputW() may be inserted by
      key input in the middle of the sequence. Current code gives
      up to fix in this situation.
  This patch should fix that issue.

2 years agonewlib: enable automatic dependency generation
Mike Frysinger [Tue, 1 Mar 2022 04:36:27 +0000 (23:36 -0500)]
newlib: enable automatic dependency generation

This was disabled as part of the migration away from the cygnus option
as that implied no-dependencies.

We currently have 1-to-1 updates enabled -- if you touch a .c file,
the corresponding .o file will be rebuilt.  But if you touch a header
file, none of the files using that get rebuilt.

2 years agoCygwin: document recent gmondump formatting fix
Mark Geisert [Thu, 17 Mar 2022 03:02:07 +0000 (20:02 -0700)]
Cygwin: document recent gmondump formatting fix

2 years agoCygwin: Fix gmondump formatting goofs
Mark Geisert [Tue, 15 Mar 2022 00:47:30 +0000 (17:47 -0700)]
Cygwin: Fix gmondump formatting goofs

The rewrite of %X to %p was malhandled.  Fix that/them.

2 years agowinsup: disable fortify source
Mike Frysinger [Tue, 15 Mar 2022 03:17:44 +0000 (23:17 -0400)]
winsup: disable fortify source

When using a compiler that automatically enables -D_FORTIFY_SOURCE,
building winsup fails with errors like below.  Since winsup is not
setup to compile itself with _FORTIFY_SOURCE, disable it for now.

make[4]: Entering directory '.../x86_64-pc-cygwin/winsup/cygwin'
  CC       libc/minires-os-if.o
In file included from .../newlib/newlib/libc/include/ssp/strings.h:34,
                 from .../newlib/newlib/libc/include/strings.h:77,
                 from .../newlib/newlib/libc/include/string.h:24,
                 from ../../../../../winsup/cygwin/string.h:12,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/guiddef.h:154,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/winnt.h:635,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/minwindef.h:163,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/windef.h:9,
                 from /usr/x86_64-pc-cygwin/usr/include/windows.h:69,
                 from ../../../../../winsup/cygwin/winlean.h:56,
                 from ../../../../../winsup/cygwin/winsup.h:84,
                 from ../../../../../winsup/cygwin/libc/minires-os-if.c:13:
.../newlib/winsup/cygwin/include/ssp/socket.h:9:1: error: conflicting types for 'recv';
  have 'ssize_t(int,  void *, size_t,  int)' {aka 'long int(int,  void *, long unsigned int,  int)'}
    9 | __ssp_redirect0(ssize_t, recv, \
      | ^~~~~~~~~~~~~~~
In file included from /usr/x86_64-pc-cygwin/usr/include/w32api/ws2tcpip.h:17,
                 from ../../../../../winsup/cygwin/libc/minires-os-if.c:14:
/usr/x86_64-pc-cygwin/usr/include/w32api/winsock2.h:1022:34: note: previous declaration of 'recv' with
  type 'int(SOCKET,  char *, int,  int)' {aka 'int(long long unsigned int,  char *, int,  int)'}
 1022 |   WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags);
      |                                  ^~~~
In file included from .../newlib/newlib/libc/include/ssp/strings.h:34,
                 from .../newlib/newlib/libc/include/strings.h:77,
                 from .../newlib/newlib/libc/include/string.h:24,
                 from ../../../../../winsup/cygwin/string.h:12,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/guiddef.h:154,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/winnt.h:635,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/minwindef.h:163,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/windef.h:9,
                 from /usr/x86_64-pc-cygwin/usr/include/windows.h:69,
                 from ../../../../../winsup/cygwin/winlean.h:56,
                 from ../../../../../winsup/cygwin/winsup.h:84,
                 from ../../../../../winsup/cygwin/libc/minires-os-if.c:13:
.../newlib/winsup/cygwin/include/ssp/socket.h:13:1: error: conflicting types for 'recvfrom';
  have 'ssize_t(int,  void *, size_t,  int,  struct sockaddr *, socklen_t *)' {aka 'long int(int,  void *, long unsigned int,  int,  struct sockaddr *, int *)'}
   13 | __ssp_redirect0(ssize_t, recvfrom, \
      | ^~~~~~~~~~~~~~~
In file included from /usr/x86_64-pc-cygwin/usr/include/w32api/ws2tcpip.h:17,
                 from ../../../../../winsup/cygwin/libc/minires-os-if.c:14:
/usr/x86_64-pc-cygwin/usr/include/w32api/winsock2.h:1023:34: note: previous declaration of 'recvfrom' with
  type 'int(SOCKET,  char *, int,  int,  struct sockaddr *, int *)' {aka 'int(long long unsigned int,  char *, int,  int,  struct sockaddr *, int *)'}
 1023 |   WINSOCK_API_LINKAGE int WSAAPI recvfrom(SOCKET s,char *buf,int len,int flags,struct sockaddr *from,int *fromlen);
      |                                  ^~~~~~~~
make[4]: *** [Makefile:1930: libc/minires-os-if.o] Error 1
  CC       gmon.o
../../../../../winsup/cygwin/gmon.c:60: error: "bzero" redefined [-Werror]
   60 | #define bzero(ptr,size) memset (ptr, 0, size);
      |
In file included from .../newlib/newlib/libc/include/strings.h:77,
                 from .../newlib/newlib/libc/include/string.h:24,
                 from ../../../../../winsup/cygwin/string.h:12,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/guiddef.h:154,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/winnt.h:635,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/minwindef.h:163,
                 from /usr/x86_64-pc-cygwin/usr/include/w32api/windef.h:9,
                 from /usr/x86_64-pc-cygwin/usr/include/windows.h:69,
                 from ../../../../../winsup/cygwin/winlean.h:56,
                 from ../../../../../winsup/cygwin/winsup.h:84,
                 from ../../../../../winsup/cygwin/gmon.h:69,
                 from ../../../../../winsup/cygwin/gmon.c:47:
.../newlib/newlib/libc/include/ssp/strings.h:43: note: this is the location of the previous definition
   43 | #define bzero(dst, len) \
      |
cc1: all warnings being treated as errors

2 years agonewlib: libm: integrate tests subdir
Mike Frysinger [Mon, 14 Mar 2022 02:28:25 +0000 (22:28 -0400)]
newlib: libm: integrate tests subdir

Integrate the old libm/test/ subdir into the main build.  It hasn't
been used in a long time causing the code to rot a bit.  I've fixed
some of those, but it still fails for many ports, so it's disabled
by default.  People who want to take a closer look can run:
$ make libm/test/test

2 years agonewlib: integrate iconv update to maintainer build
Mike Frysinger [Mon, 14 Mar 2022 01:52:04 +0000 (21:52 -0400)]
newlib: integrate iconv update to maintainer build

To help prevent people from missing running this script, integrate it
into the build via maintainer mode.

Also fix the inverted exit status to make this work correctly -- for
some reason, it exited 1 when it worked, and 0 when it failed.

2 years agonewlib: update build system generation documentation
Mike Frysinger [Mon, 14 Feb 2022 02:43:37 +0000 (21:43 -0500)]
newlib: update build system generation documentation

Replace all of the individual autotool steps with a single autoreconf.
This simplifies the documentation greatly, and in the current system,
only takes ~10 seconds to regenerate everything.

Update the developer documentation to cover all the major components
of the current build system.  Hopefully this is a fairly complete road
map to everything.  I tried to include everything that I wish I knew
when I started hacking on this :P.

2 years agonewlib: libc: merge build up a directory
Mike Frysinger [Sun, 13 Feb 2022 08:11:01 +0000 (03:11 -0500)]
newlib: libc: merge build up a directory

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.

The winsup code has been pulling the internal newlib ssp library out,
but that doesn't exist anymore, so change that to pull the objects.

2 years agoCygwin: Add description of fsync() fix to 3.3.5 release notes.
Takashi Yano [Mon, 14 Mar 2022 23:15:29 +0000 (08:15 +0900)]
Cygwin: Add description of fsync() fix to 3.3.5 release notes.

2 years agoCygwin: path: Convert type of variable 'remlen' to DWORD.
Takashi Yano [Mon, 14 Mar 2022 11:32:53 +0000 (20:32 +0900)]
Cygwin: path: Convert type of variable 'remlen' to DWORD.

- Variable remlen stores the return value of QueryDosDeviceW(), so
  it is better to be DWORD.

2 years agoCygwin: path: Add fallback for DFS mounted drive.
Takashi Yano [Fri, 11 Mar 2022 08:26:30 +0000 (17:26 +0900)]
Cygwin: path: Add fallback for DFS mounted drive.

- 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

2 years agoCygwin: fsync: Return EINVAL for special files.
Takashi Yano [Fri, 11 Mar 2022 21:19:53 +0000 (06:19 +0900)]
Cygwin: fsync: Return EINVAL for special files.

- 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.

2 years agonewlib: xstormy16: move malloc multiplex logic from build to source files
Mike Frysinger [Tue, 1 Mar 2022 06:37:19 +0000 (01:37 -0500)]
newlib: xstormy16: move malloc multiplex logic from build to source files

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.

2 years agonewlib: xstormy16: break up mallocr stubs
Mike Frysinger [Tue, 1 Mar 2022 06:02:40 +0000 (01:02 -0500)]
newlib: xstormy16: break up mallocr stubs

Move the multiplex logic out of the build and into source files to
make the build rules a lot simpler.

2 years agonewlib: xstormy16: fix mallopt definition & mstats handling
Mike Frysinger [Tue, 1 Mar 2022 05:58:55 +0000 (00:58 -0500)]
newlib: xstormy16: fix mallopt definition & mstats handling

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.

2 years agoCygwin: console, pty: Fix segfault in child_info_spawn::worker().
Takashi Yano [Thu, 10 Mar 2022 11:20:00 +0000 (20:20 +0900)]
Cygwin: console, pty: Fix segfault in child_info_spawn::worker().

- 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

2 years agonewlib: libc: move stdlib multiplex logic from build to source files
Mike Frysinger [Sat, 26 Feb 2022 04:47:03 +0000 (23:47 -0500)]
newlib: libc: move stdlib multiplex logic from build to source files

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.

2 years agobuild: Avoid length() awk function
Sebastian Huber [Wed, 9 Mar 2022 06:46:13 +0000 (07:46 +0100)]
build: Avoid length() awk function

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.

2 years agonewlib: rename mallocr.c to _mallocr.c
Mike Frysinger [Tue, 1 Mar 2022 05:30:46 +0000 (00:30 -0500)]
newlib: rename mallocr.c to _mallocr.c

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.

2 years agonewlib: move nano-malloc logic from build to source files
Mike Frysinger [Tue, 1 Mar 2022 04:46:52 +0000 (23:46 -0500)]
newlib: move nano-malloc logic from build to source files

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.

2 years agoFix Bug libc/28945
Jeff Johnston [Mon, 7 Mar 2022 20:35:02 +0000 (15:35 -0500)]
Fix Bug libc/28945

- apply fix from Tom de Vries <vries@gcc.gnu.org>
  to have calloc zero out storage for nvptx calloc function

2 years agoCygwin: update 3.3.5 release notes
Takashi Yano [Sat, 5 Mar 2022 09:21:09 +0000 (18:21 +0900)]
Cygwin: update 3.3.5 release notes

2 years agoCygwin: add 3.3.5 release notes
Takashi Yano [Sat, 5 Mar 2022 01:56:50 +0000 (10:56 +0900)]
Cygwin: add 3.3.5 release notes

2 years agoCygwin: pty: Adopt the variable name to the name generally used.
Takashi Yano [Sat, 5 Mar 2022 00:39:26 +0000 (09:39 +0900)]
Cygwin: pty: Adopt the variable name to the name generally used.

- Generally, '\n' is called "line feed" (not "new line"), so the
  variable name p_nl has been changed to p_lf.

2 years agoCygwin: pty: Add several further comments to the pty code.
Takashi Yano [Fri, 4 Mar 2022 23:39:05 +0000 (08:39 +0900)]
Cygwin: pty: Add several further comments to the pty code.

2 years agoCygwin: pty: Take account of CR+NL line feed in input.
Takashi Yano [Fri, 4 Mar 2022 14:57:12 +0000 (23:57 +0900)]
Cygwin: pty: Take account of CR+NL line feed in input.

- 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.

2 years agoCygwin: pty: Fix a possible race issue in initialization of pcon.
Takashi Yano [Fri, 4 Mar 2022 13:02:35 +0000 (22:02 +0900)]
Cygwin: pty: Fix a possible race issue in initialization of pcon.

- 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.

2 years agoCygwin: pty: Update some comments in pty code.
Takashi Yano [Fri, 4 Mar 2022 13:00:24 +0000 (22:00 +0900)]
Cygwin: pty: Update some comments in pty code.

2 years agoCygwin: pty: Omit transfer_input() call where it is no longer needed.
Takashi Yano [Fri, 4 Mar 2022 09:54:18 +0000 (18:54 +0900)]
Cygwin: pty: Omit transfer_input() call where it is no longer needed.

- 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.

2 years agoCygwin: pty: Rearrange reset_switch_to_nat_pipe() calls.
Takashi Yano [Fri, 4 Mar 2022 05:42:46 +0000 (14:42 +0900)]
Cygwin: pty: Rearrange reset_switch_to_nat_pipe() calls.

- 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.

2 years agoCygwin: pty: Treat both CR and NL as line feed in transfer_inpup().
Takashi Yano [Fri, 4 Mar 2022 07:05:35 +0000 (16:05 +0900)]
Cygwin: pty: Treat both CR and NL as line feed in transfer_inpup().

- 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.

This page took 0.07703 seconds and 5 git commands to generate.