Commit Graph

20287 Commits

Author SHA1 Message Date
Mike Frysinger 1162f09b6c newlib: require automake-1.11.6
This is simply reflecting reality: all the subdirs in here are already
using automake-1.11.6, so making it a requirement will allow us to stop
suggesting we might support automake-1.9 or 1.10 (which I'm fairly sure
do not work today).

This is why only acinclude.m4 changes in this patch: the generated files
are exactly the same as the directives here are automake constraints,
not generated code logic.
2021-12-31 12:08:18 -05:00
Jon Turney 54b6c0e81f
Cygwin: Update CI configuration for python version change
Update the python version for python-lxml and python-ply packages.

'dblate' now depends on python39, so that will be installed and made the
default by alternatives, so make sure that these python packages are
also available for that python version.
2021-12-30 12:52:55 +00:00
Mike Frysinger e29279b011 libgloss: wince: update to automake-1.15
Drop the cygnus options and migrate to current versions of autotools.
2021-12-29 23:22:44 -05:00
Jon Turney bfcabeb876
newlib: Regenerate autotools files 2021-12-29 22:45:06 +00:00
Jon Turney a4e734fcdb
newlib: Remove automake option 'cygnus'
The 'cygnus' option was removed from automake 1.13 in 2012, so the
presence of this option prevents that or a later version of automake
being used.

A check-list of the effects of '--cygnus' from the automake 1.12
documentation, and steps taken (where possible) to preserve those
effects (See also this thread [1] for discussion on that):

[1] https://lists.gnu.org/archive/html/bug-automake/2012-03/msg00048.html

1. The foreign strictness is implied.

Already present in AM_INIT_AUTOMAKE in newlib/acinclude.m4

2. The options no-installinfo, no-dependencies and no-dist are implied.

Already present in AM_INIT_AUTOMAKE in newlib/acinclude.m4

Future work: Remove no-dependencies and any explicit header dependencies,
and use automatic dependency tracking instead.  Are there explicit rules
which are now redundant to removing no-installinfo and no-dist?

3. The macro AM_MAINTAINER_MODE is required.

Already present in newlib/acinclude.m4

Note that maintainer-mode is still disabled by default.

4. Info files are always created in the build directory, and not in the
source directory.

This appears to be an error in the automake documentation describing
'--cygnus' [2]. newlib's info files are generated in the source
directory, and no special steps are needed to keep doing that.

[2] https://lists.gnu.org/archive/html/bug-automake/2012-04/msg00028.html

5. texinfo.tex is not required if a Texinfo source file is specified.
(The assumption is that the file will be supplied, but in a place that
automake cannot find.)

This effect is overriden by an explicit setting of the TEXINFO_TEX
variable (the directory part of which is fed into texi2X via the
TEXINPUTS environment variable).

6. Certain tools will be searched for in the build tree as well as in the
user's PATH. These tools are runtest, expect, makeinfo and texi2dvi.

For obscure automake reasons, this effect of '--cygnus' is not active
for makeinfo in newlib's configury.

However, there appears to be top-level configury which selects in-tree
runtest, expect and makeinfo, if present. So, if that works as it
appears, this effect is preserved. If not, this may cause problem if
anyone is building those tools in-tree.

This effect is not preserved for texi2dvi. This may cause problems if
anyone is building texinfo in-tree.

If needed, explicit checks for those tools looking in places relative to
$(top_srcdir)/../ as well as in PATH could be added.

7. The check target doesn't depend on all.

This effect is not preseved. The check target now depends on the all
target.

This concern seems somewhat academic given the current state of the
testsuite.

Also note that this doesn't touch libgloss.
2021-12-29 22:45:04 +00:00
Jon Turney 8e166351b3
newlib: Regenerate autotools files 2021-12-29 22:45:03 +00:00
Jon Turney 320510de2c
newlib: Make effects of 'cygnus' explicit
Add all the effects of 'cygnus' for which there exists an explicit way
to request that behaviour:

* Implied foreign strictness and options no-installinfo, no-dependencies
and no-dist are added to AM_INIT_AUTOMAKE in newlib/acinclude.m4.

* macro AM_MAINTAINER_MODE is added to newlib/acinclude.m4.

* For the implied TEXINFO_TEX of '$(top_srcdir)/../texinfo/texinfo.tex',
an explicit TEXINFO_TEX is always relative to $(srcdir), so write the
same pathname in that form.

This is to prepare for the removal of the automake option '--cygnus'.
2021-12-29 22:44:49 +00:00
Ken Brown 0ce992c1e4 Cygwin: fhandler_pipe::get_query_hdl_per_process: avoid a crash
NtQueryInformationProcess(ProcessHandleInformation) can return
STATUS_SUCCESS with invalid handle data for certain processes
("minimal" processes on Windows 10).  This can cause a crash when
there's an attempt to access that data.  Fix that by setting
NumberOfHandles to zero before calling NtQueryInformationProcess.

Addresses: https://cygwin.com/pipermail/cygwin-patches/2021q4/011611.html
2021-12-26 18:29:23 -05:00
Jon Turney 3328740799
cygwin: Add cocom and patch to build prerequisites in FAQ
Add patch, and make cocom unconditional in list of build prerequisites.

Even though the products of these tools are checked in, these tools are
required when building in a fresh git checkout, presumably due to the
order in which git creates the files resulting in timestamps which
indicate that the output of rules using these tools are older than
the inputs.

Addresses: https://cygwin.com/pipermail/cygwin/2021-December/250124.html

Also drop a duplicate sentence about 'fetch sources from git'.
2021-12-20 14:00:21 +00:00
Jon Turney f4a26ececa
Cygwin: Conditionally build documentation
Add a configure option '--disable-doc' to disable building of the
documentation by the 'all' target.

Check for the required tools at configure time, and require them if
building documentation is enabled.

Even if building the documentation was diabled with '--disable-doc',
'make -C doc' at the top-level can still make the documentation, if the
documentation tools were found. If the tools were not found, 'missing'
is used to issue a warning about that.

Update instructions for building Cygwin appropriately.

(Building documentation remains the default to increase the chances of
noticing when building the documentation is broken.)
2021-12-17 22:28:16 +00:00
Takashi Yano 80f4b7d545 Cygwin: pty: Fix input switching failure.
- This patch fixes the failure of input switching between io_handle
  and io_handle_nat. This very rarely happens, however, input is
  wrongly switched to io_handle_nat even though the non-cygwin app
  is in the background.
2021-12-15 12:25:58 +09:00
Takashi Yano 0795f704f7 Cygwin: pty: Fix conditions for input transfer again. 2021-12-14 19:20:34 +09:00
Takashi Yano 720234b78a Cygwin: pty: Fix conditions for input transfer.
- The recent commit "Cygwin: pty: Add missing input transfer when
  switch_to_pcon_in state." causes regression that rlwrap cannot
  work with cmd.exe. This patch fixes the issue.
2021-12-14 12:32:36 +09:00
Jon Turney ff71c3fcdb
README: configure.in -> configure.ac
These files were renamed from that long deprecated name in commit
92061799.
2021-12-13 18:47:11 +00:00
Jon Turney 90950758eb
Cygwin: Use AS_HELP_STRING for --enable-debugging
Use AS_HELP_STRING in AC_ARG_WITH for --enable-debugging to ensure
correct formatting in 'configure --help' output.
2021-12-13 17:47:54 +00:00
Takashi Yano 8d8724ee1b Cygwin: pty: Fix Ctrl-C handling further for non-cygwin apps.
- The recent commit: "Cygwin: pty: Fix Ctrl-C handling for non-cygwin
  apps in background." causes the problem that cmd.exe is terminated
  by Ctrl-C even if it is running in pseudo console. This patch fixes
  the issue.
2021-12-13 19:43:02 +09:00
Takashi Yano 90788821b7 Cygwin: pipe: Restore blocking mode for cygwin process at startup.
- Set blocking mode properly at startup of cygwin process. This is
  needed if the cygwin process is executed from non-cygwin process.
2021-12-12 22:14:29 +09:00
Ken Brown 451bbfb9f3 Cygwin: Document that the pipe_byte option is now set by default 2021-12-12 22:14:12 +09:00
Ken Brown d9c1aeaddf Cygwin: fhandler_pipe::raw_read: minor code cleanup
Remove references to STATUS_THREAD_SIGNALED and
STATUS_THREAD_CANCELED, which can't occur any more.
2021-12-12 22:11:06 +09:00
Takashi Yano 9e4d308cd5 Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag for read pipe.
- With this patch, FILE_SYNCHRONOUS_IO_NONALERT flag is applied to
  the read pipe so that native C# programs work with cygwin pipe.
  To handle signals in reading pipe with this flag set, the read
  pipe itself is always set to nonblocking mode and simulates the
  blocking behaviour in raw_read().

- Default to byte mode rather than message mode in order to make
  C# programs work with cygwin pipe.

Addresses: https://cygwin.com/pipermail/cygwin/2021-March/247987.html
2021-12-12 22:11:05 +09:00
Takashi Yano f3d719c694 Cygwin: console: Fix console mode of non-cygwin apps in background.
- If the non-cygwin app is started in the background in console, the
  console mode is broken for the app. This patch fixes the issue.
2021-12-12 21:46:37 +09:00
Takashi Yano d593c3e17e Cygwin: pty: Fix console mode of non-cygwin apps in background.
- If the non-cygwin app is started in the background in pseudo
  console, the console mode is broken for the app. This patch fixes
  the issue.
2021-12-12 21:46:31 +09:00
Takashi Yano e91ea41ef1 Cygwin: pty: Fix Ctrl-C handling for non-cygwin apps in background.
- With pseudo console enabled, if the non-cygwin app is started in
  the background and put it into the foreground, the process cannot
  be stopped by Ctrl-C. This patch fixes the issue.
2021-12-12 21:46:24 +09:00
Takashi Yano acc44e09d1 Cygwin: pty: Add missing input transfer when switch_to_pcon_in state.
- This patch fixes the bug that input is wrongly sent to io_handle_nat
  rather than io_handle when neither read() nor select() is called
  after the cygwin app is started from non-cygwin app. This happens
  only if psuedo console is disabled.

Addresses:
  https://cygwin.com/pipermail/cygwin-patches/2021q4/011587.html
2021-12-12 21:46:05 +09:00
Takashi Yano 72175bbd28 Cygwin: clipboard: Make intent of the code clearer. 2021-12-11 23:25:16 +09:00
Takashi Yano 5aa2be8ac2 Cygwin: path: Fix path conversion of virtual drive.
- The last change in path.cc introduced a bug that causes an error
  when accessing a virtual drive which mounts UNC path such as
  "\\server\share\dir" rather than "\\server\share". This patch
  fixes the issue.
2021-12-11 22:49:52 +09:00
Jon Turney 639cb7ec1a
newlib: Regenerate all autotools files
Regenerate all aclocal.m4, configure and Makefile.in files.
2021-12-09 21:41:35 +00:00
Jon Turney 2b6f088ac3
newlib: Enable automake silent rules
Use AM_SILENT_RULES, to enable automake silent rules (by default), if we
are using a version of automake which supports it (>=1.11).

Silent rules can be disabled by configuring with '--disable-silent-rules',
or invoking 'make V=1'.

For ease of reviewing, this patch doesn't contain configure and
Makefile.in regeneration.

Future work: There are a few compilations which are not silenced by
this, as they use custom rules.
2021-12-09 21:41:05 +00:00
Jon Turney 366e43a30c
Cygwin: Update configure.ac to use AC_CONFIG_HEADERS
This avoids warning with autoconf >= 2.70:

  configure.ac:47: warning: The macro `AC_CONFIG_HEADER' is obsolete.

AC_CONFIG_HEADERS has been supported since before autconf 2.59, the
minimum version we can be using, controlled by AC_PREREQ.
2021-12-08 14:10:55 +00:00
Takashi Yano 30089b3fbd Cygwin: path: Convert UNC path prefix back to drive letter.
- When symlink_info::check() is called with the path having drive
  letter and UNC path is mounted to the drive, the path is replaced
  with UNC path. With this patch, UNC path prefix is converted back
  to drive letter.  This fixes the issue:
  https://cygwin.com/pipermail/cygwin/2021-November/250087.html
  https://cygwin.com/pipermail/cygwin/2021-December/250103.html
2021-12-08 20:20:30 +09:00
Takashi Yano 69ed8ca20c Cygwin: clipboard: Fix a bug in read().
- Fix a bug in fhandler_dev_clipboard::read() that the second read
  fails with 'Bad address'.

Addresses:
  https://cygwin.com/pipermail/cygwin/2021-December/250141.html
2021-12-07 23:38:50 +09:00
Takashi Yano a4705d387f ldtoa: Import gdtoa from OpenBSD.
- This patch uses gdtoa imported from OpenBSD if newlib configure
  option "--enable-newlib-use-gdtoa=no" is NOT specified.  gdtoa
  provides more accurate output and faster conversion than legacy
  ldtoa, while it requires more heap memory.
2021-12-03 19:20:17 +09:00
Takashi Yano 34876c05a5 frexpl: Support smaller long double of LDBL_MANT_DIG == 53.
- Currently, frexpl() supports only the following cases.
    1) LDBL_MANT_DIG == 64 or 113
    2) 'long double' is equivalent to 'double'
  This patch add support for LDBL_MANT_DIG == 53.
2021-12-03 19:14:03 +09:00
Corinna Vinschen dbc7d28ba9 Revert "ctype: use less short names in public header"
This patch fixed a problem which isn't in newlib, but in projects
incorrectly using symbols from the reserved namespace.

This reverts commit 3ba1bd0d9d.
2021-12-03 10:50:58 +01:00
Takashi Yano 8dd641f236 Cygwin: Fix typo in new-features.xml 2021-12-03 12:19:44 +09:00
Corinna Vinschen fb1fe93203 Cygwin: errno: handle ERROR_CASE_DIFFERING_NAMES_IN_DIR
Rather than special case status code 0xc00004b3, add status and matching
error code to ntdll.h and handle it as part of the standard error mapping.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-12-02 14:16:05 +01:00
Takashi Yano e1026837dd Cygwin: console: Fix OSC sequence handling.
- Currently, some OSC escape sequences, such as 'OSC 110 BEL', are
  not handled correctly. This patch fixes the issue.
2021-12-02 11:26:26 +09:00
Jeff Johnston 8fa73a9f84 Modifying patch from: marian.buschsieweke@ovgu.de
The code accessing the floating point control/status register, namely

	#define	__cfc1(__fcsr)	__asm __volatile("cfc1 %0, $31" : "=r" (__fcsr)

does not compile with mips16. This changed the makefile to pass -mno-mips16 to avoid the following
compiler error:

	mips-mti-elf fails with "Error: unrecognized opcode `cfc1 $3,$31'"
2021-11-30 11:23:39 -05:00
Corinna Vinschen 3edea7cd55 Cygwin: get/setrlimit: move RLIMIT_AS handling into static functions
To keep getrlimit/setrlimit clean, move the RLIMIT_AS code into
local static functions __set_rlimit_as and __get_rlimit_as.

Also, make adding process to the job the last step, to be able to
close and release the job resources if anything failed.  Add matching
comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-30 12:55:14 +01:00
Corinna Vinschen 670beaed02 Cygwin: setrlimit: Add a permission check
If the incoming soft limit is less restrictive than the current
hard limit, bail out with EPERM.  Given the previous sanity check,
this implies trying to raise the hard limit.  While, theoretically,
this should be allowed for privileged processes, Windows has no
matching concept in terms of job limits

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-30 12:55:14 +01:00
Corinna Vinschen d64cd470ae Cygwin: get_rlimit_stack: add a comment
...just to see what it's used for.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-30 12:54:40 +01:00
Takashi Yano 48f6c59332 stdio: Fix issue of printing "%La" format with large exp part.
- Currently, printf("%La\n", 1e1000L) crashes with segv due to lack
  of frexpl() function. With this patch, frexpl() function has been
  implemented in libm to solve this issue.

Addresses: https://sourceware.org/pipermail/newlib/2021/018718.html
2021-11-29 22:51:16 +09:00
Corinna Vinschen 3502a6ff2e Cygwin: add 3.4 release messages
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-26 17:06:00 +01:00
Corinna Vinschen 1c7384f9d1 Cygwin: get/setrlimit: implement RLIMIT_AS
Code based on the idea implemented by the oneTBB project,
see https://github.com/oneapi-src/oneTBB

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-26 17:01:28 +01:00
Takashi Yano f885632f4f ldtoa: Fix insufficient valid output digits for "%f" format.
- If the number has large integer part and small fraction part is
  specified in output format, e.g. printf("%.3f", sqrt(2)*1e60);,
  valid output digits were insufficient. This patch fixes the issue.
2021-11-26 17:29:40 +09:00
Ken Brown 4f47e64b11 Cygwin: fhandler_fifo::raw_read: handle STATUS_PENDING
NtReadFile can return STATUS_PENDING occasionally even in non-blocking
mode.  Check for this and wait for NtReadFile to complete.  To avoid
code repetition, do this in a static helper function nt_read.
2021-11-23 15:50:01 -05:00
Ken Brown 6d34b62cb8 Cygwin: fhandler_pipe::raw_read: fix handle leak
Slightly rearrange the code to avoid returning without closing the
event handle.
2021-11-23 10:19:49 -05:00
Takashi Yano e84b43ea93 Cygwin: Fix release note 3.3.3.
- Removes the bug fix entry that was accidentally added to the
  release notes 3.3.3, even though it had been already fixed in
  3.3.2.
2021-11-23 01:19:56 +09:00
Takashi Yano a496c9cdf8 Cygwin: sigproc: Fix potential race issue regarding exit_state.
- If sig_send() is called while another thread is processing exit(),
  race issue regarding exit_state may occur. This patch fixes the
  issue.
2021-11-22 23:26:06 +09:00
Corinna Vinschen 68faeef4be ldtoa: don't restrict outbuf size to ndigits
https://cygwin.com/pipermail/cygwin/2021-November/249930.html
reported a regression introduce by using a dynamically sized local
char array in favor of a statically sized array.

Fix this by reverting to a statically sized array, using a small
buffer on the stack for a reasonable number of requested digits, a
big mallocated buffer otherwise.  This should work for small targets
as well, given that malloc is used in printf anyway right now.

This is *still* hopefully just a temporary measure, unless somebody
actually provides a new ldtoa.

Fixes: 4d90e53359 ("ldtoa: fix dropping too many digits from output")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-22 13:57:16 +01:00