Commit Graph

19152 Commits

Author SHA1 Message Date
Keith Packard 954504ea14 riscv: Use current pseudo-instructions to access the FCSR register
Use fscsr and frcsr to store and read the FCSR register instead of
fssr and frsr.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-01-21 10:28:35 +01:00
Ken Brown 4261a8f5ca Cygwin: document recent changes 2020-01-20 09:47:41 -05:00
Ken Brown 352dbd304b Cygwin: fstatat, fchownat: support the AT_EMPTY_PATH flag
Following Linux, allow the pathname argument to be an empty string if
the AT_EMPTY_PATH flag is specified.  In this case the dirfd argument
can refer to any type of file, not just a directory, and the call
operates on that file.  In particular, dirfd can refer to a symlink
that was opened with O_PATH | O_NOFOLLOW.
2020-01-20 09:47:15 -05:00
Ken Brown 6cc05784e1 Cygwin: readlinkat: allow pathname to be empty
Following Linux, allow the pathname argument to be an empty string,
provided the dirfd argument refers to a symlink opened with
O_PATH | O_NOFOLLOW.  The readlinkat call then operates on that
symlink.
2020-01-17 10:27:48 -05:00
Ken Brown 35a1a6dbdf Cygwin: allow opening a symlink with O_PATH | O_NOFOLLOW
Up to now, opening a symlink with O_NOFOLLOW fails with ELOOP.
Following Linux, allow this to succeed if O_PATH is also specified.
2020-01-17 07:43:02 -05:00
Ken Brown 85aff2830a Cygwin: normalize_win32_path: allow drive without trailing backslash
Commit 283cb372, "Cygwin: normalize_win32_path: improve error
checking", required a prefix '\\?\' or '\??\' in the source path to be
followed by 'UNC\' or 'X:\', where X is a drive letter.  That was too
restrictive, since it disallowed the paths '\\?\X: and '\??\X:'.  This
caused problems when a user tried to use the root of a drive as the
Cygwin installation root, as reported here:

  https://cygwin.com/ml/cygwin/2020-01/msg00111.html

Modify the requirement so that '\??\X:' and '\\?\X:' are now allowed
as source paths, without a trailing backslash.
2020-01-17 07:37:29 -05:00
Takashi Yano 7e6c96d6e1 Cygwin: pty: Fix state mismatch caused in octave gui.
- In octave gui, sometimes state mismatch between real pty state
  and state variable occurs. For example, this occurs when 'ls'
  command is executed in octave gui. This patch fixes the issue.
2020-01-17 10:20:43 +01:00
Takashi Yano 50e2a63b04 Cygwin: pty: Set console code page only if pseudo console is enabled.
- Input UTF-8 chars are garbled in ConEmu with cygwin connector if
  the environment does not support pseudo console. This patch fixes
  the issue.
2020-01-14 17:19:49 +01:00
Takashi Yano 2f415d5efa Cygwin: pty: Disable FreeConsole() on close for non cygwin process.
- After commit e1a0775dc0, the problem
  reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00093.html
  occurs. For Gnu scren and tmux, calling FreeConsole() on pty close
  is necessary. However, if FreeConsole() is called, cygwin setup
  with '-h' option does not work. Therefore, the commit
  e1a0775dc0 delayed closing pty.
  This is the cause of the problem above. Now, instead of delaying
  pty close, FreeConsole() is not called if the process is non cygwin
  processes such as cygwin setup.
2020-01-14 17:19:19 +01:00
Takashi Yano 783eaa888f Cygwin: console: Add code to restore console mode on close.
- The console with 24bit color support has a problem that console
  mode is changed if cygwin process is executed in cmd.exe which
  started in cygwin shell. For example, cursor keys become not
  working if bash -> cmd -> true are executed in this order.
  This patch fixes the issue.
2020-01-14 17:18:25 +01:00
Takashi Yano f03806b68a Cygwin: console: Add workaround for broken CSI3J in Win10 1809.
- In Win10 1809, the cursor position sometimes goes out of screen
  by clear command in console. This seems to be caused by escape
  sequence CSI3J (ESC[3J). This happens only for 1809. This patch
  is a workaround for the issue.
2020-01-14 17:17:20 +01:00
Takashi Yano d7478090d6 Cygwin: console: Disable xterm mode for non cygwin process only.
- Special function keys such as arrow keys or function keys do not
  work in ConEmu with cygwin-connector after commit
  6a06c6bc8f. This patch fixes the
  issue.
2020-01-14 17:16:50 +01:00
Takashi Yano bb30582a99 Cygwin: pty: Add missing CloseHandle() calls.
- PTY code which support pseudo console has a problem that causes
  handle leaks. Four of these are bug in pty code, and the other
  one seems to be a bug of Windows10. ClosePseudoConsole() fails
  to close one internal handle. This patch fixes the issue.
2020-01-14 17:16:11 +01:00
Takashi Yano bb7741acf8 Cygwin: pty: Fix the issue regarding open and close multiple PTYs.
- If two PTYs are opened in the same process and the first one
  is closed, the helper process for the first PTY remains running.
  This patch fixes the issue.
2020-01-14 17:15:34 +01:00
Takashi Yano a1c7e92084 Cygwin: select: Speed up select() call for pty, pipe and fifo.
- The slowing down issue of X11 forwarding using ssh -Y, reported
  in https://www.cygwin.com/ml/cygwin/2019-12/msg00295.html,
  is due to the change of select() code for pty in the commit
  915fcd0ae8. cygthread::detach()
  takes at most about 10msec because Sleep() is used in the thread.
  For this issue, this patch uses cygwait() instead of Sleep() and
  introduces an event to abort the wait. For not only pty, but pipe
  and fifo also have the same problem potentially, so this patch
  applies same strategy to them as well.
2020-01-13 17:31:26 +01:00
Takashi Yano a6e87f589a Cygwin: console: Make suspending process work properly.
- After commit f4b47827cf, suspending
  process by Ctrl-Z does not work in console and results in hang up.
  This patch fixes the issue.
2020-01-13 17:26:32 +01:00
Takashi Yano b3e78186d1 Cygwin: pty: Revise the code for setting code page of pseudo console.
- Fix the problem which overrides the code page setting, reported
  in https://www.cygwin.com/ml/cygwin/2019-12/msg00292.html.
2020-01-13 17:00:14 +01:00
Takashi Yano fd03749b9c Cygwin: pty: Remove destructor for fhandler_pty_master class.
- The destructor for fhandler_pty_master class does not seem to be
  necessary anymore. Therefore, it has been removed.
2020-01-13 16:51:17 +01:00
Arseniy Lartsev 4ddf5903fd Fixed crash on wine by adding NULL check after memchr
This is not a joke, there are vendors out there who build software for cygwin
only. Besides, this NULL check is good to have anyway.
2020-01-13 16:34:36 +01:00
Mark Geisert 7b6414d459 Cygwin: Add missing Linux #define of CPU_SETSIZE
Though our implementation of cpu sets doesn't need it, software from
Linux environments expects this definition to be present.  It's
documented on the Linux CPU_SET(3) man page but was left out due to
oversight.

Addresses https://cygwin.com/ml/cygwin/2019-12/msg00248.html
2020-01-13 16:32:51 +01:00
Jeff Johnston 1fdf871c9d Prevent more NULL ptr accesses due to Balloc out of memory
- fix gdtoa-gethex.c, ldtoa.c, and strtodg.c to use eBalloc
2020-01-09 15:18:14 -05:00
Jeff Johnston 1afb22a120 Bump up release to 3.2.0 for yearly snapshot 2020-01-02 14:56:24 -05:00
Jon Turney 7685c4dd6c
doc: add more details about adding documentation to HOWTO
Add a little more detail to the checklist for adding documentation
Also update the list of supported sections
2019-12-29 17:10:15 +00:00
Ken Brown 3bc79b275e Cygwin: FIFO: use FILE_PIPE_REJECT_REMOTE_CLIENTS flag
Add that flag to the pipe type argument when creating the Windows
named pipe.  And add a definition of that flag to ntdll.h (copied from
/usr/include/w32api/ddk/ntifs.h).
2019-12-21 17:53:52 -05:00
Corinna Vinschen b42d565150 Cygwin: add 3.1.2 release text
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-21 11:44:08 +01:00
Anthony Green b481c11e5a Optimize setjmp/longjmp for moxie.
We don't need to save/restore every register -- just those
we don't expect to be trashed by function calls.
2019-12-20 09:00:26 -05:00
Takashi Yano 27202a1b14 Cygwin: pty: Fix ESC[?3h and ESC[?3l handling again.
- Even with commit fe512b2b12, pty
  still has a problem in ESC[?3h and ESC[?3l handling if invalid
  sequence such as ESC[?$ is sent. This patch fixes the issue.
2019-12-19 12:28:20 +01:00
Keith Packard 76dcfd0c4d Don't display trailing '.' in _dcvt
In the two helper functions that _dcvt calls for 'f' and 'e' mode, if
there are no digits to display after the decimal point, don't add one.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-12-18 20:53:36 +01:00
Keith Packard 11f99384d2 Fix gcvt to always show 'ndigits' of precision
Leading zeros after the decimal point should not count
towards the 'ndigits' limit.

This makes gcvt match glibc and the posix gcvt man page.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-12-18 20:53:36 +01:00
Keith Packard abcc586ffe Fix fcvt to only show 'ndigit' past decimal
Even if the number is really small and this means showing *no* digits.
This makes newlib match glibc, and the fcvt posix man page.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-12-18 20:53:36 +01:00
Takashi Yano fe512b2b12 Cygwin: pty: Fix a bug regarding ESC[?3h and ESC[?3l handling.
- Midnight commander (mc) does not work after the commit
  1626569222 as reported in
  https://www.cygwin.com/ml/cygwin/2019-12/msg00173.html.
  This patch fixes the issue.
2019-12-18 20:20:13 +01:00
Jon Turney 91f1eab9a9
doc: Untabify python scripts used for making man pages
These scripts fail with a TabError exception if 'python' is python3, as
mixing tabs and spaces in indentation is forbidden in python3.
2019-12-18 13:35:35 +00:00
Corinna Vinschen 7fc78f07ed Cygwin: Bump DLL version to 3.1.2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-18 10:48:10 +01:00
Corinna Vinschen 5317e3f4ec Cygwin: add 3.1.1 release text belatedly
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-18 10:47:43 +01:00
Corinna Vinschen 26cc7769b4 Cygwin: autoload: Add missing GetProcessGroupAffinity/GetThreadGroupAffinity
Both functions were introduce with Windows 7 only, so we need to
autoload them for the sake of Vista/2008.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-17 16:44:54 +01:00
Keith Packard ed2a469cdd Set __IEEE_LITTLE_ENDIAN for _XTENSA_EL__ (ESP32)
Signed-off-by: Keith Packard <keithp@keithp.com>
2019-12-17 10:09:36 +01:00
Keith Packard 2635b580ec Return EINVAL for illegal base in strtol
Signed-off-by: Keith Packard <keithp@keithp.com>
2019-12-17 10:07:44 +01:00
Corinna Vinschen d3574fc148 Cygwin: Bump DLL version to 3.1.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-16 21:09:50 +01:00
Corinna Vinschen f69b2421bb Cygwin: add strtold fix to release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-16 16:39:17 +01:00
Bruno Haible c81a76b3b9 strtold: set errno to ERANGE on underflow per POSIX
https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtod.html
2019-12-16 15:18:52 +01:00
Corinna Vinschen 29ba52da95 Cygwin: ilogbl: Make sure to return FP_ILGB0 on zero input
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-16 10:50:17 +01:00
Jozef Lawrynowicz b74ba7dca6 MSP430: Support new msp430-elfbare target
Update the target triplet glob used when configuring for msp430 to
support a new msp430-elfbare target being added to gcc.
2019-12-16 10:15:06 +01:00
Anthony Green 78b7a3b0f8 Implement the unlink system call for the moxie simulator.
Corresponding support for this was just added to the gdb moxie simulator.
Unlink support is required by the GCC testsuite.
2019-12-14 05:27:38 -05:00
Anthony Green 31227ba53d Fix setjmp/longjmp for the moxie port.
These functions needs to save and restore the stack frame, because
that's where the return address is stored.
2019-12-13 13:08:06 -05:00
Ken Brown 69772c4332 Cygwin: document the last bugfix 2019-12-10 08:45:17 -05:00
Ken Brown 48fbe173f4 Cygwin: symlink_info::check: avoid assertion failure
On certain error conditions there is a code snippet that checks
whether the last component of the path has a trailing dot or space or
a leading space.  Skip this check if the last component is empty,
i.e., if the path ends with a backslash.  This avoids an assertion
failure if the trailing backslash is the only backslash in the path,
as is the case for a DOS drive 'X:\'.

Addresses: https://cygwin.com/ml/cygwin/2019-12/msg00016.html
2019-12-09 07:43:44 -05:00
Keith Packard 7a526cdc28 libm: switch sf_log1p from double error routines to float
sf_log1p was using __math_divzero and __math_invalid, which
drag in a pile of double-precision code. Switch to using the
single-precision variants. This also required making those
available in __OBSOLETE_MATH mode.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-12-02 10:00:32 +01:00
Anton Lavrentiev via cygwin-patches 8574f8a1e4 Cygwin: /proc/[PID]/stat to pull process priority correctly
Fix to prior commit 5fa9a0e7 to address https://cygwin.com/ml/cygwin/2019-08/msg00082.html
2019-12-02 09:57:04 +01:00
Brian Inglis c63c29e76e newlib/libc/include/sys/features.h: update __STDC_ISO_10646__
newlib wide char conversion functions were updated to
Unicode 11 on 2019-01-12
update standard symbol __STDC_ISO_10646__ to
Unicode 11 release date 2018-06-05 for Cygwin
2019-11-26 18:34:39 +01:00
Takashi Yano edb1be4cce Cygwin: pty: Convert CamelCase names to snake_case names. 2019-11-18 11:12:08 +01:00