]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
4 years agoCygwin: Fix signal handling issue introduced by PTY related change.
Takashi Yano [Thu, 3 Oct 2019 10:43:37 +0000 (19:43 +0900)]
Cygwin: Fix signal handling issue introduced by PTY related change.

- After commit 41864091014b63b0cb72ae98281fa53349b6ef77, there is a
  regression in signal handling reported in
  https://www.cygwin.com/ml/cygwin/2019-10/msg00010.html. This patch
  fixes the issue.

4 years agoDocument the last bug fix
Ken Brown [Fri, 27 Sep 2019 17:36:45 +0000 (13:36 -0400)]
Document the last bug fix

4 years agoCygwin: normalize_win32_path: improve error checking
Ken Brown [Wed, 25 Sep 2019 18:18:18 +0000 (14:18 -0400)]
Cygwin: normalize_win32_path: improve error checking

If the source path starts with the Win32 long path prefix '\\?\' or
the NT object directory prefix '\??\', require the prefix to be
followed by 'UNC\' or '<drive letter>:\'.  Otherwise return EINVAL.

This fixes the assertion failure in symlink_info::check that was
reported here:

  https://cygwin.com/ml/cygwin/2019-09/msg00228.html

That assertion failure was caused by normalize_win32_path returning a
path with no backslashes when the source path was '\\?\DRIVE'.

4 years agoCygwin: pty: Fix PTY so that cygwin setup shows help with -h option.
Takashi Yano [Thu, 26 Sep 2019 10:52:46 +0000 (19:52 +0900)]
Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option.

- After commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57, cygwin
  setup fails to show help message when -h option is specified, as
  reported in https://cygwin.com/ml/cygwin/2019-09/msg00248.html.
  This patch fixes the problem.

4 years agoAdd SIOCGIFDOWNREASON.
kib [Tue, 17 Sep 2019 18:49:13 +0000 (18:49 +0000)]
Add SIOCGIFDOWNREASON.

The ioctl(2) is intended to provide more details about the cause of
the down for the link.

Eventually we might define a comprehensive list of codes for the
situations.  But interface also allows the driver to provide free-form
null-terminated ASCII string to provide arbitrary non-formalized
information.  Sample implementation exists for mlx5(4), where the
string is fetched from firmware controlling the port.

Reviewed by: hselasky, rrs
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D21527

4 years agoAdd kernel-side support for in-kernel TLS.
jhb [Tue, 27 Aug 2019 00:01:56 +0000 (00:01 +0000)]
Add kernel-side support for in-kernel TLS.

KTLS adds support for in-kernel framing and encryption of Transport
Layer Security (1.0-1.2) data on TCP sockets.  KTLS only supports
offload of TLS for transmitted data.  Key negotation must still be
performed in userland.  Once completed, transmit session keys for a
connection are provided to the kernel via a new TCP_TXTLS_ENABLE
socket option.  All subsequent data transmitted on the socket is
placed into TLS frames and encrypted using the supplied keys.

Any data written to a KTLS-enabled socket via write(2), aio_write(2),
or sendfile(2) is assumed to be application data and is encoded in TLS
frames with an application data type.  Individual records can be sent
with a custom type (e.g. handshake messages) via sendmsg(2) with a new
control message (TLS_SET_RECORD_TYPE) specifying the record type.

At present, rekeying is not supported though the in-kernel framework
should support rekeying.

KTLS makes use of the recently added unmapped mbufs to store TLS
frames in the socket buffer.  Each TLS frame is described by a single
ext_pgs mbuf.  The ext_pgs structure contains the header of the TLS
record (and trailer for encrypted records) as well as references to
the associated TLS session.

KTLS supports two primary methods of encrypting TLS frames: software
TLS and ifnet TLS.

Software TLS marks mbufs holding socket data as not ready via
M_NOTREADY similar to sendfile(2) when TLS framing information is
added to an unmapped mbuf in ktls_frame().  ktls_enqueue() is then
called to schedule TLS frames for encryption.  In the case of
sendfile_iodone() calls ktls_enqueue() instead of pru_ready() leaving
the mbufs marked M_NOTREADY until encryption is completed.  For other
writes (vn_sendfile when pages are available, write(2), etc.), the
PRUS_NOTREADY is set when invoking pru_send() along with invoking
ktls_enqueue().

A pool of worker threads (the "KTLS" kernel process) encrypts TLS
frames queued via ktls_enqueue().  Each TLS frame is temporarily
mapped using the direct map and passed to a software encryption
backend to perform the actual encryption.

(Note: The use of PHYS_TO_DMAP could be replaced with sf_bufs if
someone wished to make this work on architectures without a direct
map.)

KTLS supports pluggable software encryption backends.  Internally,
Netflix uses proprietary pure-software backends.  This commit includes
a simple backend in a new ktls_ocf.ko module that uses the kernel's
OpenCrypto framework to provide AES-GCM encryption of TLS frames.  As
a result, software TLS is now a bit of a misnomer as it can make use
of hardware crypto accelerators.

Once software encryption has finished, the TLS frame mbufs are marked
ready via pru_ready().  At this point, the encrypted data appears as
regular payload to the TCP stack stored in unmapped mbufs.

ifnet TLS permits a NIC to offload the TLS encryption and TCP
segmentation.  In this mode, a new send tag type (IF_SND_TAG_TYPE_TLS)
is allocated on the interface a socket is routed over and associated
with a TLS session.  TLS records for a TLS session using ifnet TLS are
not marked M_NOTREADY but are passed down the stack unencrypted.  The
ip_output_send() and ip6_output_send() helper functions that apply
send tags to outbound IP packets verify that the send tag of the TLS
record matches the outbound interface.  If so, the packet is tagged
with the TLS send tag and sent to the interface.  The NIC device
driver must recognize packets with the TLS send tag and schedule them
for TLS encryption and TCP segmentation.  If the the outbound
interface does not match the interface in the TLS send tag, the packet
is dropped.  In addition, a task is scheduled to refresh the TLS send
tag for the TLS session.  If a new TLS send tag cannot be allocated,
the connection is dropped.  If a new TLS send tag is allocated,
however, subsequent packets will be tagged with the correct TLS send
tag.  (This latter case has been tested by configuring both ports of a
Chelsio T6 in a lagg and failing over from one port to another.  As
the connections migrated to the new port, new TLS send tags were
allocated for the new port and connections resumed without being
dropped.)

ifnet TLS can be enabled and disabled on supported network interfaces
via new '[-]txtls[46]' options to ifconfig(8).  ifnet TLS is supported
across both vlan devices and lagg interfaces using failover, lacp with
flowid enabled, or lacp with flowid enabled.

Applications may request the current KTLS mode of a connection via a
new TCP_TXTLS_MODE socket option.  They can also use this socket
option to toggle between software and ifnet TLS modes.

In addition, a testing tool is available in tools/tools/switch_tls.
This is modeled on tcpdrop and uses similar syntax.  However, instead
of dropping connections, -s is used to force KTLS connections to
switch to software TLS and -i is used to switch to ifnet TLS.

Various sysctls and counters are available under the kern.ipc.tls
sysctl node.  The kern.ipc.tls.enable node must be set to true to
enable KTLS (it is off by default).  The use of unmapped mbufs must
also be enabled via kern.ipc.mb_use_ext_pgs to enable KTLS.

KTLS is enabled via the KERN_TLS kernel option.

This patch is the culmination of years of work by several folks
including Scott Long and Randall Stewart for the original design and
implementation; Drew Gallatin for several optimizations including the
use of ext_pgs mbufs, the M_NOTREADY mechanism for TLS records
awaiting software encryption, and pluggable software crypto backends;
and John Baldwin for modifications to support hardware TLS offload.

Reviewed by: gallatin, hselasky, rrs
Obtained from: Netflix
Sponsored by: Netflix, Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D21277

4 years agoRename IPPROTO 33 from SEP to DCCP
thj [Thu, 8 Aug 2019 11:43:09 +0000 (11:43 +0000)]
Rename IPPROTO 33 from SEP to DCCP

IPPROTO 33 is DCCP in the IANA Registry:
https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

IPPROTO_SEP was added about 20 years ago in r33804. The entries were added
straight from RFC1700, without regard to whether they were used.

The reference in RFC1700 for SEP is '[JC120] <mystery contact>', this is an
indication that the protocol number was probably in use in a private network.

As RFC1700 is no longer the authoritative list of internet numbers and that
IANA assinged 33 to DCCP in RFC4340, change the header to the actual
authoritative source.

Reviewed by: Richard Scheffenegger, bz
Approved by: bz (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21178

4 years agoThis commit updates rack to what is basically
rrs [Wed, 10 Jul 2019 20:40:39 +0000 (20:40 +0000)]
This commit updates rack to what is basically

being used at NF as well as sets in some of the groundwork for
committing BBR. The hpts system is updated as well as some other needed
utilities for the entrance of BBR. This is actually part 1 of 3 more
needed commits which will finally complete with BBRv1 being added as a
new tcp stack.

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D20834

4 years agoAdd an external mbuf buffer type that holds
jhb [Sat, 29 Jun 2019 00:48:33 +0000 (00:48 +0000)]
Add an external mbuf buffer type that holds

multiple unmapped pages.

Unmapped mbufs allow sendfile to carry multiple pages of data in a
single mbuf, without mapping those pages.  It is a requirement for
Netflix's in-kernel TLS, and provides a 5-10% CPU savings on heavy web
serving workloads when used by sendfile, due to effectively
compressing socket buffers by an order of magnitude, and hence
reducing cache misses.

For this new external mbuf buffer type (EXT_PGS), the ext_buf pointer
now points to a struct mbuf_ext_pgs structure instead of a data
buffer.  This structure contains an array of physical addresses (this
reduces cache misses compared to an earlier version that stored an
array of vm_page_t pointers).  It also stores additional fields needed
for in-kernel TLS such as the TLS header and trailer data that are
currently unused.  To more easily detect these mbufs, the M_NOMAP flag
is set in m_flags in addition to M_EXT.

Various functions like m_copydata() have been updated to safely access
packet contents (using uiomove_fromphys()), to make things like BPF
safe.

NIC drivers advertise support for unmapped mbufs on transmit via a new
IFCAP_NOMAP capability.  This capability can be toggled via the new
'nomap' and '-nomap' ifconfig(8) commands.  For NIC drivers that only
transmit packet contents via DMA and use bus_dma, adding the
capability to if_capabilities and if_capenable should be all that is
required.

If a NIC does not support unmapped mbufs, they are converted to a
chain of mapped mbufs (using sf_bufs to provide the mapping) in
ip_output or ip6_output.  If an unmapped mbuf requires software
checksums, it is also converted to a chain of mapped mbufs before
computing the checksum.

Submitted by: gallatin (earlier version)
Reviewed by: gallatin, hselasky, rrs
Discussed with: ae, kp (firewalls)
Relnotes: yes
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D20616

4 years agoConvert all IPv4 and IPv6 multicast memberships
hselasky [Tue, 25 Jun 2019 11:54:41 +0000 (11:54 +0000)]
Convert all IPv4 and IPv6 multicast memberships

into using a STAILQ instead of a linear array.

The multicast memberships for the inpcb structure are protected by a
non-sleepable lock, INP_WLOCK(), which needs to be dropped when
calling the underlying possibly sleeping if_ioctl() method. When using
a linear array to keep track of multicast memberships, the computed
memory location of the multicast filter may suddenly change, due to
concurrent insertion or removal of elements in the linear array. This
in turn leads to various invalid memory access issues and kernel
panics.

To avoid this problem, put all multicast memberships on a STAILQ based
list. Then the memory location of the IPv4 and IPv6 multicast filters
become fixed during their lifetime and use after free and memory leak
issues are easier to track, for example by: vmstat -m | grep multi

All list manipulation has been factored into inline functions
including some macros, to easily allow for a future hash-list
implementation, if needed.

This patch has been tested by pho@ .

Differential Revision: https://reviews.freebsd.org/D20080
Reviewed by: markj @
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoExtend mmap/mprotect API to specify the max page
brooks [Thu, 20 Jun 2019 18:24:16 +0000 (18:24 +0000)]
Extend mmap/mprotect API to specify the max page

protections.

A new macro PROT_MAX() alters a protection value so it can be OR'd with
a regular protection value to specify the maximum permissions.  If
present, these flags specify the maximum permissions.

While these flags are non-portable, they can be used in portable code
with simple ifdefs to expand PROT_MAX() to 0.

This change allows (e.g.) a region that must be writable during run-time
linking or JIT code generation to be made permanently read+execute after
writes are complete.  This complements W^X protections allowing more
precise control by the programmer.

This change alters mprotect argument checking and returns an error when
unhandled protection flags are set.  This differs from POSIX (in that
POSIX only specifies an error), but is the documented behavior on Linux
and more closely matches historical mmap behavior.

In addition to explicit setting of the maximum permissions, an
experimental sysctl vm.imply_prot_max causes mmap to assume that the
initial permissions requested should be the maximum when the sysctl is
set to 1.  PROT_NONE mappings are excluded from this for compatibility
with rtld and other consumers that use such mappings to reserve
address space before mapping contents into part of the reservation.  A
final version this is expected to provide per-binary and per-process
opt-in/out options and this sysctl will go away in its current form.
As such it is undocumented.

Reviewed by: emaste, kib (prior version), markj
Additional suggestions from: alc
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18880

4 years agoSome devices take undesired actions when RTS and
shurd [Wed, 12 Jun 2019 18:07:04 +0000 (18:07 +0000)]
Some devices take undesired actions when RTS and

DTR are asserted. Some development boards for example will reset on DTR,
and some radio interfaces will transmit on RTS.

This patch allows "stty -f /dev/ttyu9.init -rtsdtr" to prevent
RTS and DTR from being asserted on open(), allowing these devices
to be used without problems.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D20031

4 years agoFix mismatch from r342379.
pfg [Sun, 23 Dec 2018 20:51:13 +0000 (20:51 +0000)]
Fix mismatch from r342379.

4 years agogai_strerror() - Update string error messages according to RFC 3493.
pfg [Sun, 23 Dec 2018 18:15:48 +0000 (18:15 +0000)]
gai_strerror() - Update string error messages according to RFC 3493.

Error messages in gai_strerror(3) vary largely among OSs.

For new software we largely replaced the obsoleted EAI_NONAME and
with EAI_NODATA but we never updated the corresponding message to better
match the intended use. We also have references to ai_flags and ai_family
which are not very descriptive for non-developer end users.

Bring new new error messages based on informational RFC 3493, which has
obsoleted RFC 2553, and make them consistent among the header adn
manpage.

MFC after: 1 month
Differentical Revision: D18630

4 years agoDocument the last change
Ken Brown [Tue, 24 Sep 2019 19:31:17 +0000 (15:31 -0400)]
Document the last change

4 years agoCygwin: rmdir: fail if last component is a symlink, as on Linux
Ken Brown [Sun, 22 Sep 2019 15:33:34 +0000 (11:33 -0400)]
Cygwin: rmdir: fail if last component is a symlink, as on Linux

If the last component of the directory name is a symlink followed by a
slash, rmdir now fails, following Linux but not POSIX, even if the
symlink resolves to an existing empty directory.

mkdir was similarly changed in 2009 in commit
52dba6a5c45e8d8ba1e237a15213311dc11d91fb.  Modify a comment to clarify
the purpose of that commit.

Addresses https://cygwin.com/ml/cygwin/2019-09/msg00221.html.

4 years agoCygwin: remove old cruft from path_conv::check
Ken Brown [Sat, 21 Sep 2019 17:09:09 +0000 (13:09 -0400)]
Cygwin: remove old cruft from path_conv::check

Prior to commit b0717aae, path_conv::check had the following code:

      if (strncmp (path, "\\\\.\\", 4))
        {
          /* Windows ignores trailing dots and spaces in the last path
             component, and ignores exactly one trailing dot in inner
             path components. */
          char *tail = NULL;
          [...]
          if (!tail || tail == path)
            /* nothing */;
          else if (tail[-1] != '\\')
            {
              *tail = '\0';
          [...]
        }

Commit b0717aae0 intended to disable this code, but it inadvertently
disabled only part of it.  In particular, the declaration of the local
tail variable was in the disabled code, but the following remained:

          if (!tail || tail == path)
            /* nothing */;
          else if (tail[-1] != '\\')
            {
              *tail = '\0';
          [...]
        }

[A later commit removed the disabled code.]

The tail variable here points into a string different from path,
causing that string to be truncated under some circumstances.  See

  https://cygwin.com/ml/cygwin/2019-09/msg00001.html

for more details.

This commit fixes the problem by removing the leftover code
that was intended to be removed in b0717aae.

4 years agoCygwin: Fix incorrect TTY for non-cygwin process.
Takashi Yano [Fri, 20 Sep 2019 03:04:36 +0000 (12:04 +0900)]
Cygwin: Fix incorrect TTY for non-cygwin process.

- After commit d4045fdbef60d8e7e0d11dfe38b048ea2cb8708b, the TTY
  displayed by ps command is incorrect if the process is non-cygwin
  process. This patch fixes this issue.

4 years agoCygwin: console: Make console input work in GDB and strace.
Takashi Yano [Fri, 20 Sep 2019 21:10:35 +0000 (06:10 +0900)]
Cygwin: console: Make console input work in GDB and strace.

- After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console
  input cause error in GDB or strace. This patch fixes this issue.

4 years agoCygwin: pty: Add missing guard when PTY is in the legacy mode.
Takashi Yano [Wed, 18 Sep 2019 14:29:21 +0000 (23:29 +0900)]
Cygwin: pty: Add missing guard when PTY is in the legacy mode.

4 years agoCygwin: pty: Add charset conversion for console apps in legacy PTY.
Takashi Yano [Wed, 18 Sep 2019 14:29:20 +0000 (23:29 +0900)]
Cygwin: pty: Add charset conversion for console apps in legacy PTY.

4 years agoCygwin: pty: Unify the charset conversion codes into a function.
Takashi Yano [Wed, 18 Sep 2019 14:29:19 +0000 (23:29 +0900)]
Cygwin: pty: Unify the charset conversion codes into a function.

4 years agoCygwin: pty: Make GDB work again on pty.
Takashi Yano [Wed, 18 Sep 2019 14:29:18 +0000 (23:29 +0900)]
Cygwin: pty: Make GDB work again on pty.

4 years agoCygwin: pty: Avoid potential segfault in PTY code when ppid = 1.
Takashi Yano [Wed, 18 Sep 2019 14:29:17 +0000 (23:29 +0900)]
Cygwin: pty: Avoid potential segfault in PTY code when ppid = 1.

4 years agoCygwin: console: Revive Win7 compatibility.
Takashi Yano [Wed, 18 Sep 2019 20:49:55 +0000 (05:49 +0900)]
Cygwin: console: Revive Win7 compatibility.

- The commit fca4cda7a420d7b15ac217d008527e029d05758e broke Win7
  compatibility. This patch fixes the issue.

4 years agoCygwin: document last change
Ken Brown [Sun, 15 Sep 2019 17:40:12 +0000 (13:40 -0400)]
Cygwin: document last change

4 years agowinsup/cygwin/times.cc (times): follow Linux and allow for a NULL buf argument
Achim Gratz [Sun, 15 Sep 2019 16:28:21 +0000 (18:28 +0200)]
winsup/cygwin/times.cc (times): follow Linux and allow for a NULL buf argument

Adresses the problem reported here:

  https://cygwin.com/ml/cygwin/2019-09/msg00141.html

4 years agoCygwin: pty: Use autoload feature for pseudo console system calls.
Takashi Yano [Sun, 15 Sep 2019 10:55:44 +0000 (19:55 +0900)]
Cygwin: pty: Use autoload feature for pseudo console system calls.

- The autoload feature is used rather than GetModuleHandle(),
  GetProcAddress() for CreatePseudoConsole(), ResizePseudoConsole()
  and ClosePseudoConsole().

4 years agoCygwin: pty: Correct typos that do not fit the coding style.
Takashi Yano [Sun, 15 Sep 2019 04:36:23 +0000 (13:36 +0900)]
Cygwin: pty: Correct typos that do not fit the coding style.

4 years agoCygwin: pty: Change the timing of clearing screen.
Takashi Yano [Sun, 15 Sep 2019 04:05:53 +0000 (13:05 +0900)]
Cygwin: pty: Change the timing of clearing screen.

- The code which clears screen is moved from reset_switch_to_pcon()
  to fixup_after_exec() because it seems not too early even at this
  timing.

4 years agoCygwin: pty: Use system NLS function instead of PTY's own one.
Takashi Yano [Sun, 15 Sep 2019 04:05:52 +0000 (13:05 +0900)]
Cygwin: pty: Use system NLS function instead of PTY's own one.

- Since calling system __loadlocale() caused execution error,
  PTY used its own NLS function. The cause of the error has been
  found, the corresponding code has been rewritten using system
  function.

4 years agoCygwin: pty: Fix bad file descriptor error in some environment.
Takashi Yano [Sun, 15 Sep 2019 04:05:51 +0000 (13:05 +0900)]
Cygwin: pty: Fix bad file descriptor error in some environment.

- The bad file descriptor problem reported in:
  https://cygwin.com/ml/cygwin-patches/2019-q3/msg00104.html
  was recurring. Fixed again.

4 years agoCygwin: fix CPU_SET macro visibility
Mark Geisert [Sat, 14 Sep 2019 04:58:02 +0000 (21:58 -0700)]
Cygwin: fix CPU_SET macro visibility

The CPU_SET macros defined in Cygwin's include/sys/cpuset.h must not
be visible in an application's namespace unless _GNU_SOURCE has been
#defined.  Internally this means wrapping them in #if __GNU_VISIBLE.

4 years agoCygwin: console: Fix read() in non-canonical mode.
Takashi Yano [Fri, 13 Sep 2019 19:34:39 +0000 (04:34 +0900)]
Cygwin: console: Fix read() in non-canonical mode.

- In non-canonical mode, cygwin console returned only one character
  even if several keys are typed before read() called. This patch
  fixes this behaviour.

4 years agoCygwin: pty: Switch input and output pipes individually.
Takashi Yano [Fri, 13 Sep 2019 21:48:14 +0000 (06:48 +0900)]
Cygwin: pty: Switch input and output pipes individually.

- Previously, input and output pipes were switched together between
  the traditional pty and the pseudo console. However, for example,
  if stdin is redirected to another device, it is better to leave
  input pipe traditional pty side even for non-cygwin program. This
  patch realizes such behaviour.

4 years agoCygwin: pty: Prevent the helper process from exiting by Ctrl-C.
Takashi Yano [Mon, 9 Sep 2019 12:08:20 +0000 (21:08 +0900)]
Cygwin: pty: Prevent the helper process from exiting by Ctrl-C.

4 years agoCygwin: pty: Fix screen alternation while pseudo console switching.
Takashi Yano [Sun, 8 Sep 2019 13:23:23 +0000 (22:23 +0900)]
Cygwin: pty: Fix screen alternation while pseudo console switching.

- If screen alternated while pseudo console switching, it sometimes
  failed. This might happen when the output of the non-cygwin program
  is piped to less. This patch fixes this issue.

4 years agoCygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode.
Takashi Yano [Sun, 8 Sep 2019 12:58:35 +0000 (21:58 +0900)]
Cygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode.

- When the I/O pipe is switched to the pseudo console side, the
  behaviour of Ctrl-C was unstable. This rarely happens, however,
  for example, shell sometimes crashes by Ctrl-C in that situation.
  Furthermore, Ctrl-C was ignored if output of non-cygwin program
  is redirected to pipe. This patch fixes these issues.

4 years agolibc/include/devctl.h: Add SOCKCLOSE per FACE Technical Standard, Edition 3.0
Joel Sherrill [Tue, 10 Sep 2019 15:49:11 +0000 (10:49 -0500)]
libc/include/devctl.h: Add SOCKCLOSE per FACE Technical Standard, Edition 3.0

The FACE Technical Standard, Edition 3.0 and later require the
definition of the subcommand SOCKCLOSE in <devctl.h>.
Reference: https://www.opengroup.org/face

4 years agoCygwin: pty: Make SetConsoleCursorPosition() to be hooked.
Takashi Yano [Fri, 6 Sep 2019 13:01:27 +0000 (22:01 +0900)]
Cygwin: pty: Make SetConsoleCursorPosition() to be hooked.

- Win32 API SetConsoleCursorPosition() injects ANSI escape sequence
  to pseudo console. Therefore, it should be added to the API list
  to be hooked.

4 years agoCygwin: pty: Make sure to show system error messages
Takashi Yano [Thu, 5 Sep 2019 13:22:27 +0000 (22:22 +0900)]
Cygwin: pty: Make sure to show system error messages

- Forcibly attach to pseudo console in advance so that the error
  messages by system_printf() are displayed to screen reliably.
  This is needed when stdout is redirected to another pty. In this
  case, process has two ptys opened. However, process can attach
  to only one console. So it is necessary to change console attached.

4 years agoCygwin: pty: Fix potential state mismatch regarding pseudo console.
Takashi Yano [Thu, 5 Sep 2019 10:44:41 +0000 (19:44 +0900)]
Cygwin: pty: Fix potential state mismatch regarding pseudo console.

- PTY with pseudo console support sitll has problem which potentially
  cause state mismatch between state variable and real console state.
  This patch fixes this issue.

4 years agoCygwin: pty: Fix select() with pseudo console support.
Takashi Yano [Thu, 5 Sep 2019 04:22:54 +0000 (13:22 +0900)]
Cygwin: pty: Fix select() with pseudo console support.

- select() did not work correctly when both read and except are
  polled simultaneously for the same fd and the r/w pipe is switched
  to pseudo console side. This patch fixes this isseu.

4 years agoCygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.
Takashi Yano [Thu, 5 Sep 2019 00:24:26 +0000 (09:24 +0900)]
Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.

- Pseudo console support introduced by commit
  169d65a5774acc76ce3f3feeedcbae7405aa9b57 shows garbage ^[[H^[[J in
  some of emacs screens. These screens do not handle ANSI escape
  sequences. Therefore, clear screen is disabled on these screens.

4 years agoCygwin: pty: Add a workaround for ^C handling.
Takashi Yano [Wed, 4 Sep 2019 13:47:42 +0000 (22:47 +0900)]
Cygwin: pty: Add a workaround for ^C handling.

- Pseudo console support introduced by commit
  169d65a5774acc76ce3f3feeedcbae7405aa9b57 sometimes cause random
  crash or freeze by pressing ^C while cygwin and non-cygwin
  processes are executed simultaneously in the same pty. This
  patch is a workaround for this issue.

4 years agoCygwin: pty: Limit API hook to the program linked with the APIs.
Takashi Yano [Wed, 4 Sep 2019 13:46:51 +0000 (22:46 +0900)]
Cygwin: pty: Limit API hook to the program linked with the APIs.

- API hook used for pseudo console support causes slow down.
  This patch limits API hook to only program which is linked
  with the corresponding APIs. Normal cygwin program is not
  linked with such APIs (such as WriteFile, etc...) directly,
  therefore, no slow down occurs. However, console access by
  cygwin.dll itself cannot switch the r/w pipe to pseudo console
  side. Therefore, the code to switch it forcely to pseudo
  console side is added to smallprint.cc and strace.cc.

4 years agoCygwin: pty: Fix state management for pseudo console support.
Takashi Yano [Wed, 4 Sep 2019 01:45:35 +0000 (10:45 +0900)]
Cygwin: pty: Fix state management for pseudo console support.

- Pseudo console support introduced by commit
  169d65a5774acc76ce3f3feeedcbae7405aa9b57 has some bugs which
  cause mismatch between state variables and real pseudo console
  state regarding console attaching and r/w pipe switching. This
  patch fixes this issue by redesigning the state management.

4 years agoCygwin: pty: Move function hook_api() into hookapi.cc.
Takashi Yano [Wed, 4 Sep 2019 01:44:25 +0000 (10:44 +0900)]
Cygwin: pty: Move function hook_api() into hookapi.cc.

- PTY uses Win32 API hook for pseudo console suppot. The function
  hook_api() is used for this purpose and defined in fhandler_tty.cc
  previously. This patch moves it into hookapi.cc.

4 years agoCygwin: pty: Speed up a little hooked Win32 API for pseudo console.
Takashi Yano [Wed, 4 Sep 2019 01:44:24 +0000 (10:44 +0900)]
Cygwin: pty: Speed up a little hooked Win32 API for pseudo console.

- Some Win32 APIs are hooked in pty code for pseudo console support.
  This causes slow down. This patch improves speed a little.

4 years agoCygwin: pty: Code cleanup
Takashi Yano [Wed, 4 Sep 2019 01:44:23 +0000 (10:44 +0900)]
Cygwin: pty: Code cleanup

- Cleanup the code which is commented out by #if 0 regarding pseudo
  console.
- Remove #if 1 for experimental code which seems to be stable.

4 years agoAdjust nios2 and m68k semihosting for sys/stat.h changes.
Sandra Loosemore [Tue, 3 Sep 2019 15:35:18 +0000 (09:35 -0600)]
Adjust nios2 and m68k semihosting for sys/stat.h changes.

Commit 72ff9acad2ab54e80a19ddaec0106065c817e3f6 caused st_atime,
st_ctime, and st_mtime to be defined as macros.  This collided with
use of these identifiers as field names in struct gdb_stat (which
represents the GDB RSP encoding of struct stat) in libgloss
semihosting support for nios2 and m68k.  This patch renames the
affected fields of struct gdb_stat.

Signed-off-by: Sandra Loosemore <sandra@codesourcery.com>
4 years agoCygwin: sys/wait.h: Add _wait prototype to avoid compiler warning
Corinna Vinschen [Tue, 3 Sep 2019 10:45:55 +0000 (12:45 +0200)]
Cygwin: sys/wait.h: Add _wait prototype to avoid compiler warning

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
4 years agofe_dfl_env.c: Fix typo in comment
Joel Sherrill [Wed, 28 Aug 2019 17:22:41 +0000 (12:22 -0500)]
fe_dfl_env.c: Fix typo in comment

4 years agoriscv/include/fenv.h: Use shared fenv.h.
Joel Sherrill [Tue, 27 Aug 2019 12:46:47 +0000 (07:46 -0500)]
riscv/include/fenv.h: Use shared fenv.h.

libc/include/fenv.h was a direct copy of this file.

4 years agoCygwin: add W10 pseudo console support to release notes
Corinna Vinschen [Thu, 29 Aug 2019 11:56:00 +0000 (13:56 +0200)]
Cygwin: add W10 pseudo console support to release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
4 years agoCygwin: pty: add pseudo console support.
Takashi Yano [Tue, 27 Aug 2019 18:04:02 +0000 (03:04 +0900)]
Cygwin: pty: add pseudo console support.

- Support pseudo console in PTY. Pseudo console is a new feature
  in Windows 10 1809, which provides console APIs on virtual
  terminal. With this patch, native console applications can work
  in PTYs such as mintty, ssh, gnu screen or tmux.

5 years agoCygwin: get_posix_access: avoid negative subscript
Ken Brown [Mon, 26 Aug 2019 17:38:31 +0000 (13:38 -0400)]
Cygwin: get_posix_access: avoid negative subscript

Don't refer to lacl[pos] unless we know that pos >= 0.

5 years agoFix regression in visium caused by sys/stat.h change
Jeff Law [Tue, 20 Aug 2019 15:26:10 +0000 (09:26 -0600)]
Fix regression in visium caused by sys/stat.h change

5 years agoCygwin: math: Properly propagate input NANs in a few functions
Martin Storsjö [Wed, 24 Jul 2019 21:13:13 +0000 (00:13 +0300)]
Cygwin: math: Properly propagate input NANs in a few functions

While the C99 standard doesn't explicitly require this, the standard
says it is recommended (F.9.13).

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoCygwin: math: Fix cosh(-INFINITY) to return +INFINITY
Martin Storsjö [Tue, 30 Jul 2019 20:51:09 +0000 (23:51 +0300)]
Cygwin: math: Fix cosh(-INFINITY) to return +INFINITY

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoCygwin: math: Fix the return value for tgammal for zero and negative integers
Martin Storsjö [Mon, 29 Jul 2019 20:48:01 +0000 (23:48 +0300)]
Cygwin: math: Fix the return value for tgammal for zero and negative integers

For zero, it should return HUGE_VAL (INFINITY), for negative integers,
it should return NAN.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoRevert previous change to sys/stat.h and fix cris libgloss
Jeff Johnston [Mon, 19 Aug 2019 22:01:45 +0000 (18:01 -0400)]
Revert previous change to sys/stat.h and fix cris libgloss

- revert previous fix which altered sys/stat.h
- fix libgloss/cris/gensyscalls to undef st_atime, st_mtime,
  and st_ctime macros which cannot be used with new_stat structure

5 years agoFix regression in cris-elf caused by sys/stat.h change
Jeff Johnston [Mon, 19 Aug 2019 21:46:51 +0000 (17:46 -0400)]
Fix regression in cris-elf caused by sys/stat.h change

5 years agoCygwin: select: revamp non-polling code for signalfd
Corinna Vinschen [Fri, 16 Aug 2019 14:36:06 +0000 (16:36 +0200)]
Cygwin: select: revamp non-polling code for signalfd

Rather than waiting for signalfd_select_wait in a thread, which is racy,
create a global event "my_pendingsigs_evt" which is set and reset by
wait_sig depending only on the fact if blocked signals are pending or not.

This in turn allows to WFMO on this event in select as soon as signalfds
are present in the read descriptor set.  Select's peek and verify
will then check if one of the present signalfds is affected.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoRevert "Cygwin: fix potential SEGV in sigwaitinfo/signalfd scenario"
Corinna Vinschen [Fri, 16 Aug 2019 14:36:20 +0000 (16:36 +0200)]
Revert "Cygwin: fix potential SEGV in sigwaitinfo/signalfd scenario"

This reverts commit 92115a83a4579635e253be2887d3706d28b477fd.

This was utterly wrong.

5 years agostat.h: use POSIX-required timefields throughout
Corinna Vinschen [Fri, 16 Aug 2019 08:52:17 +0000 (10:52 +0200)]
stat.h: use POSIX-required timefields throughout

...except in certain SysV R4 cases for backward compat.
This is probably not required anymore, but it doesn't hurt
to keep it in.

5 years agofenv: Include documentation in generated .info file
Joel Sherrill [Wed, 14 Aug 2019 10:24:37 +0000 (11:24 +0100)]
fenv: Include documentation in generated .info file

5 years agoCygwin: ldd: Try harder to get dll names
Mark Geisert [Thu, 15 Aug 2019 05:59:43 +0000 (22:59 -0700)]
Cygwin: ldd: Try harder to get dll names

Borrow a trick from strace to lessen occurrences of "??? => ???" in ldd
output.  Specifically, if the module name isn't found in the usual place
in the mapped image, use the file handle we have to look up the name.

5 years agoCygwin: console: Fix the condition to interrupt select() by SIGWINCH
Takashi Yano [Thu, 15 Aug 2019 05:03:00 +0000 (14:03 +0900)]
Cygwin: console: Fix the condition to interrupt select() by SIGWINCH

- Add code so that select() is not interrupted by SIGWINCH if it is
  ignored (SIG_IGN or SIG_DFL).

5 years agoCygwin: console: Fix workaround for horizontal tab position
Takashi Yano [Thu, 15 Aug 2019 05:02:05 +0000 (14:02 +0900)]
Cygwin: console: Fix workaround for horizontal tab position

- The workaround commit 33a21904a702191cebf0e81b4deba2dfa10a406c
  does not work as expected if window size is changed while screen
  is alternated. Fixed.

5 years agomemmem.c and strstr.c: do not require -std=c99
Giacomo Tesio [Tue, 13 Aug 2019 00:00:07 +0000 (02:00 +0200)]
memmem.c and strstr.c: do not require -std=c99

5 years agofenv: Update makedocbook for eae68bfc
Jon Turney [Mon, 12 Aug 2019 18:27:10 +0000 (19:27 +0100)]
fenv: Update makedocbook for eae68bfc

Teach makedocbook how to handle some new things seen in the makedoc markup
since eae68bfc:
- 'link with' lines appearing in SYNOPSIS sections

Also, don't raise a NoneType exception when there's something we don't
know how to handle in a SYNOPSIS section, just exit.

5 years agofenv: Fix typo-ed variable name in documentation
Jon Turney [Mon, 12 Aug 2019 18:24:54 +0000 (19:24 +0100)]
fenv: Fix typo-ed variable name in documentation

5 years agofenv: Fix mangled makedoc markup
Jon Turney [Mon, 12 Aug 2019 18:18:15 +0000 (19:18 +0100)]
fenv: Fix mangled makedoc markup

See makedoc.c:657:
Variables are marked up as '<[foo]>'.
Code is marked up as '<<foo>>'.

5 years agofenv: fe_dfl_env.c doesn't contain any documentation
Jon Turney [Mon, 12 Aug 2019 18:13:33 +0000 (19:13 +0100)]
fenv: fe_dfl_env.c doesn't contain any documentation

fe_dfl_env.c doesn't contain any documentation, so drop it from makedoc
processing.

5 years agoCygwin: fix potential SEGV in sigwaitinfo/signalfd scenario
Corinna Vinschen [Mon, 12 Aug 2019 20:40:50 +0000 (22:40 +0200)]
Cygwin: fix potential SEGV in sigwaitinfo/signalfd scenario

On sigwaitinfo or reading from a signalfd, signal processing sets up
signal handling via sigdelayed even if the handler address is NULL.
This doesn't have any impact on sigwaitinfo scenarios (or at least, I
wasn't able to come up with a reproducer) but it breaks signalfd
scenarios, where eventually a call to call_signal_handler from
sigdelayed will try to call the NULL function.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agosched.h: Declare affinity functions only on targets supporting them
Corinna Vinschen [Mon, 12 Aug 2019 10:13:20 +0000 (12:13 +0200)]
sched.h: Declare affinity functions only on targets supporting them

5 years agoCygwin: ps: fix a compiler warning
Corinna Vinschen [Mon, 12 Aug 2019 15:29:59 +0000 (17:29 +0200)]
Cygwin: ps: fix a compiler warning

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: console: Fix cursor position restore after screen alternation.
Takashi Yano [Mon, 12 Aug 2019 13:48:45 +0000 (22:48 +0900)]
Cygwin: console: Fix cursor position restore after screen alternation.

- If screen is alternated on console, cursor position is not restored
  correctly in the case of xterm compatible mode is enabled. For example,
  the shell prompt is shown at incorrect position after using vim.
  This patch fixes this problem.

5 years agoCygwin: console: Add workaround for windows xterm compatible mode bug.
Takashi Yano [Mon, 12 Aug 2019 13:47:42 +0000 (22:47 +0900)]
Cygwin: console: Add workaround for windows xterm compatible mode bug.

- The horizontal tab positions are broken after resizing console window.
  This seems to be a bug of xterm compatible mode of windows console.
  This workaround fixes this problem.

5 years agoCygwin: console: Fix deadlock at calling fork().
Takashi Yano [Mon, 12 Aug 2019 13:46:23 +0000 (22:46 +0900)]
Cygwin: console: Fix deadlock at calling fork().

- Calling fork() on console occasionally falls into deadlock. The reason
  is not clear, however, this patch fixes this problem anyway.

5 years agoRegenerated files from fenv.h addition
Joel Sherrill [Tue, 6 Aug 2019 19:13:18 +0000 (14:13 -0500)]
Regenerated files from fenv.h addition

5 years agoAdd default implementation of fenv.h and all methods
Joel Sherrill [Thu, 8 Aug 2019 16:27:06 +0000 (11:27 -0500)]
Add default implementation of fenv.h and all methods

The default implementation of the fenv.h methods return
-EOPNOTSUP. Some of these have implementations appropriate
        for soft-float.

The intention of the new fenv.h is that it be portable
and that architectures provide their own implementation
of sys/fenv.h.

5 years agoMiscellaneous Makefile.in regenerated
Joel Sherrill [Tue, 6 Aug 2019 19:13:16 +0000 (14:13 -0500)]
Miscellaneous Makefile.in regenerated

5 years agoCygwin: drop preliminary 3.0.8 release file
Corinna Vinschen [Fri, 9 Aug 2019 15:49:03 +0000 (17:49 +0200)]
Cygwin: drop preliminary 3.0.8 release file

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: add missing bugfix release messages for 3.1.0
Corinna Vinschen [Fri, 9 Aug 2019 15:47:32 +0000 (17:47 +0200)]
Cygwin: add missing bugfix release messages for 3.1.0

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: shmat: use mmap allocator strategy on 64 bit
Corinna Vinschen [Thu, 8 Aug 2019 08:53:58 +0000 (10:53 +0200)]
Cygwin: shmat: use mmap allocator strategy on 64 bit

This avoids collisions of shmat maps with Windows own datastructures
when allocating top-down.

This patch moves the mmap_allocator class definition into its
own files and just uses it from mmap and shmat.

5 years agoCygwin: getpriority() and top display for priority is inconsistent
Lavrentiev, Anton [Wed, 7 Aug 2019 19:27:41 +0000 (19:27 +0000)]
Cygwin: getpriority() and top display for priority is inconsistent

Fix this by aligning /proc/[PID]/stat to the values returned by getpriority().

5 years agoCygwin: build_env: fix off-by-one bug when re-adding PATH
Michael Haubenwallner [Wed, 7 Aug 2019 08:51:16 +0000 (10:51 +0200)]
Cygwin: build_env: fix off-by-one bug when re-adding PATH

Adding default winvar 'PATH=C:\cygwin64\binZ' to an environment that is
already allocated for 'SYSTEMROOT=ZWINDIR=Z', we need to count that
trailing (Z)ero as well.  Otherwise we trigger this assertion failure:

$ /bin/env -i SYSTEMROOT= WINDIR= /bin/env
assertion "(s - envblock) <= tl" failed: file "/home/corinna/src/cygwin/cygwin-3.0.7/cygwin-3.0.7-1.x86_64/src/newlib-cygwin/winsup/cygwin/environ.cc", line 1302, function: char** build_env(const char* const*, WCHAR*&, int&, bool, HANDLE)
Aborted (core dumped)

5 years agoCygwin: exec: check execute bit prior to evaluating script
Corinna Vinschen [Tue, 6 Aug 2019 08:46:31 +0000 (10:46 +0200)]
Cygwin: exec: check execute bit prior to evaluating script

When the exec family of functions is called for a script-like
file, the av::setup function handles the exec[vl]p case as
well.  The execve case for files not starting with a she-bang
is handled first by returning ENOEXEC.  Only after that, the
file's executability is checked.

This leads to the problem that ENOEXEC is returned for non-executable
files as well.  A calling shell interprets this as a file it should try
to run as script.  This is not desired for non-executable files.

Fix this problem by checking the file for executability first.  Only
after that, follow the other potential code paths.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoAlign libgloss/arm and libc/sys/arm sources: miscellaneous fixes
Alexander Fedotov [Fri, 2 Aug 2019 12:33:46 +0000 (07:33 -0500)]
Align libgloss/arm and libc/sys/arm sources: miscellaneous fixes

1. Trim trailing spaces
2. Align comments, function declarations and definitions

5 years agoAlign libgloss/arm and libc/sys/arm sources: Lite exit support
Alexander Fedotov [Fri, 2 Aug 2019 12:33:45 +0000 (07:33 -0500)]
Align libgloss/arm and libc/sys/arm sources: Lite exit support

Applied changes from commit 2404223:

* arm/crt0.S (_mainCRTStartup): Weak reference to atexit and _fini
when lite exit is enabled.

5 years agoAlign libgloss/arm and libc/sys/arm sources: HeapInfo and __heap_limit
Alexander Fedotov [Fri, 2 Aug 2019 12:33:44 +0000 (07:33 -0500)]
Align libgloss/arm and libc/sys/arm sources: HeapInfo and __heap_limit

Applied changes from commit 8d98f95:

* arm/crt0.S: Initialise __heap_limit when ARM_RDI_MONITOR is defined.
* arm/syscalls.c: define __heap_limit global symbol.
* arm/syscalls.c (_sbrk): Honour __heap_limit.

Applied changes from commit 8d98f95:
Fixed semihosting for ARM when heapinfo not provided by debugger

5 years agoAlign libgloss/arm and libc/sys/arm sources: Fix GetCmdLine semihosting directives
Alexander Fedotov [Fri, 2 Aug 2019 12:33:43 +0000 (07:33 -0500)]
Align libgloss/arm and libc/sys/arm sources: Fix GetCmdLine semihosting directives

Applied changes from the commit 9b11672:

When simulating arm code, the target program startup code (crt0) uses
semihosting invocations to get the command line from the simulator. The
simulator returns the command line and its size into the area passed in
parameter. (ARM 32-bit specifications :
http://infocenter.arm.com/help/topic/com.arm.doc.dui0058d/DUI0058.pdf
chapter "5.4.19 SYS_GET_CMDLINE").

The memory area pointed by the semihosting register argument is located
in .text section (usually not writtable (RX)).

If we run this code on a simulator that respects this rights properties
(qemu user-mode for instance), the command line will not be written to
the .text program memory, in particular the length of the string. The
program runs with an empty command line. This problem hasn't been seen
earlier probably because qemu user-mode is not so much used, but this can
happen with another simulator that refuse to write in a read-only segment.

With this modification, the command line can be correctly passed to the
target program.

Changes:
- newlib/libc/sys/arm/crt0.S : Arguments passed to the
AngelSWI_Reason_GetCmdLine semihosting invocation are placed into .data
section instead of .text

5 years agoCygwin: Implement CPU_SET(3) macros
Mark Geisert [Sun, 4 Aug 2019 22:45:46 +0000 (15:45 -0700)]
Cygwin: Implement CPU_SET(3) macros

This patch supplies an implementation of the CPU_SET(3) processor
affinity macros as documented on the relevant Linux man page.

There is a mostly superset implementation of cpusets under newlib's
libc/sys/RTEMS/include/sys that has Linux and FreeBSD compatibility
and is built on top of FreeBSD bitsets.  This Cygwin implementation
and the RTEMS one could be combined if desired at some future point.

5 years agoRISC-V: Fix header guard for sys/fenv.h
Kito Cheng [Fri, 2 Aug 2019 03:38:09 +0000 (11:38 +0800)]
RISC-V: Fix header guard for sys/fenv.h

5 years agoCygwin: fork: attach child not before success
Michael Haubenwallner [Wed, 31 Jul 2019 10:35:33 +0000 (12:35 +0200)]
Cygwin: fork: attach child not before success

Do not attach to the child before it was successfully initialized, or we
would need more sophisticated cleanup on child initialization failure,
like suppressing SIGCHILD delivery with multiple threads ("waitproc")
involved.

Improves "Cygwin: fork: Remember child not before success.",
commit f03ea8e1c57bd5cea83f6cd47fa02870bdfeb1c5, which leads to fork
problems if cygserver is running:

https://cygwin.com/ml/cygwin-patches/2019-q2/msg00155.html

5 years agoCygwin: pinfo: stop remember doing reattach
Michael Haubenwallner [Wed, 31 Jul 2019 10:35:31 +0000 (12:35 +0200)]
Cygwin: pinfo: stop remember doing reattach

During fork, the child process requires the process table to be
initialized for fixup_shms_after_fork, while still allowing subsequent
dlls.load_after_fork to fail silently (for when the "forkable" hardlinks
are not created yet).
pinfo::remember not performing reattach anymore requires explicit
pinfo::reattach now where appropriate.

Prepares to improve "Cygwin: fork: Remember child not before success."
commit f03ea8e1c57bd5cea83f6cd47fa02870bdfeb1c5, which leads to fork
problems if cygserver is running:

https://cygwin.com/ml/cygwin-patches/2019-q2/msg00155.html

5 years agoAlign _end symbol to at least 4 in all MIPS scripts
Faraz Shahbazker [Tue, 30 Jul 2019 00:00:25 +0000 (00:00 +0000)]
Align _end symbol to at least 4 in all MIPS scripts

Left-over part of commit 84b2a020daa17d8ee5c9ec979c3d56f95e69573b

The _end marker must be aligned to 4-bytes to ensure that the last
element written does not reach beyond the address of _end.  This is
also necessary as the termination condition is an equality test
instead of an ordered test so (_end - _fbss) must be a multiple of
4-bytes.  The alignment is already correct for mti*.ld files, fix
it for all remaining MIPS scripts that don't already align to at
least 4.

5 years agocommon/math_errf.c: Enable compilation of __math_oflowf
Joel Sherrill [Fri, 26 Jul 2019 19:37:23 +0000 (14:37 -0500)]
common/math_errf.c: Enable compilation of __math_oflowf

This resolved linking errors when using methods such as
expm1().

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