4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-28 12:05:47 +08:00

1119 Commits

Author SHA1 Message Date
Corinna Vinschen
2164981d26 Cygwin: document posix_close
Reported-by: Christian Franke <Christian.Franke@t-online.de>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-26 09:45:04 +01:00
Christian Franke
78ff40d78e Cygwin: FAQ: Add section about sparse files
Signed-off-by: Christian Franke <christian.franke@t-online.de>
2025-02-24 18:12:00 +01:00
Corinna Vinschen
5f9cc2a6ab Cygwin: winsup/doc/posix.xml: add posix_close doc
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-24 12:27:55 +01:00
Corinna Vinschen
004e95cf35 Cygwin: winsup/doc/posix.xml: add missing POSIX.1e functions to docs
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-24 11:49:00 +01:00
Brian Inglis
117feceea9 Cygwin: winsup/doc/posix.xml: SUS V5 POSIX 2024 combine multiple notes
Combine multiple notes after an entry separated by hyphen ") (" -> " - "

Signed-off-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
2025-02-24 11:42:11 +01:00
Brian Inglis
8fd4966195 Cygwin: winsup/doc/posix.xml: move wrongly sorted entries
Fix some entries not in sorting order.

Signed-off-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
2025-02-24 11:41:17 +01:00
Brian Inglis
32b39f2b02 Cygwin: winsup/doc/posix.xml: SUS V5 POSIX 2024 move or remove dropped entries
Move entries no longer in POSIX from the SUS/POSIX section to
Deprecated Interfaces section and mark with (SUSv4).
Remove entries no longer in POSIX from the NOT Implemented section.

Signed-off-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
2025-02-24 11:39:40 +01:00
Brian Inglis
1e58e7d5d5 Cygwin: winsup/doc/posix.xml: SUS V5 POSIX 2024 not implemented new additions
Add unavailable POSIX additions to Not Implemented section.

Signed-off-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
2025-02-24 11:34:37 +01:00
Brian Inglis
3dc2707bf9 Cygwin: winsup/doc/posix.xml: SUS V5 POSIX 2024 new additions available
Add POSIX new additions available as header macros and inline functions,
or exported by Cygwin distro DLL or library packages

Signed-off-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
2025-02-24 11:28:49 +01:00
Brian Inglis
b1eb09167a Cygwin: winsup/doc/posix.xml: SUS V5 POSIX 2024 TOG Issue 8 ISO 9945 move new POSIX
Update anchor id and description to current version, year, issue, etc.
Move new POSIX entries in other sections to the SUS/POSIX section.

Signed-off-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
2025-02-24 10:12:08 +01:00
Corinna Vinschen
8cebbb2b42 Cygwin: fhandler_netdrive::exists: handle WebDAV URLs
WebDAV URLs may contain an at-sign followed by a port number or SSL.
This will throw GetAddrInfoW, so remove the at-sign prior to calling
GetAddrInfoW.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-21 21:56:03 +01:00
Corinna Vinschen
5790c180d1 Cygwin: pathnames.xml: sparse mount option is always set on SSDs
Reported by: Christian Franke <Christian.Franke@t-online.de>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-17 11:16:42 +01:00
Corinna Vinschen
6363caef2d Cygwin: pathnames.xml: explain dir mounts since 3.6.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-14 12:24:03 +01:00
Corinna Vinschen
701cec0aa1 Cygwin: pathnames.xml: improve chapters mount-table and cygdrive
Fix case in example output of mount and a bunch of clumsy expressions
and descriptions in the cygdrive section.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-14 12:23:16 +01:00
Corinna Vinschen
9bcb273f41 Cygwin: new-features.xml: transfer 3.6.0 release message to docs
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-14 11:57:52 +01:00
Corinna Vinschen
b50c195218 Cygwin: new-features.xml: drop two dashes remaining from copy/paste
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-02-14 11:57:52 +01:00
Takashi Yano
0eef1b6c96 Cygwin: Add new APIs tc[gs]etwinsize()
New APIs tcgetwinsize/tcsetwinsize are added, which is added in
POSIX.1-2024.

Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2025-01-24 03:22:44 +09:00
Corinna Vinschen
0813644661 Cygwin: doc: the library is called libcrypt, not crypt
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-01-17 13:19:32 +01:00
Corinna Vinschen
4adb6c3806 Cygwin: doc: Remove executable name setup.exe from user guide
Use "Cygwin Setup program" and add a link to the homepage in some
cases.

Reported-by: David Dyck <david.dyck@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-01-17 12:20:08 +01:00
Corinna Vinschen
d21eb90bbc Cygwin: doc: clarify usage of sshd vs. cygsshd
When Microsoft started to claim the "sshd" service name, we had
to rename our service to "cygsshd" but we never updated the docs.

Make sure the docs reflect the changed service name and fix a
few bumpy expression.

Reported-by: Mario Emmenlauer <mario@emmenlauer.de>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-01-17 11:44:03 +01:00
Corinna Vinschen
37ed066c5f Cygwin: doc: remove "faq.using.sshd-in-domain"
This FAQ entry has been commented out for quite some time.
Drop it.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2025-01-17 11:44:03 +01:00
Christian Franke
14dda1f598 Cygwin: doc: add SCHED_BATCH, SCHED_IDLE and SCHED_RESET_ON_FORK
Signed-off-by: Christian Franke <christian.franke@t-online.de>
2024-12-16 12:26:28 +01:00
Corinna Vinschen
a0527e3786 Cygwin: utils: cygpath: add -r option to emit paths with root-local prefix
cygpath automatically adds the root-local prefix \\?\ automatically
for paths exceeding 260 bytes.  However, it does not add the root-local
prefix if the path contains path components invalid in DOS paths, for
instance path components with trailing dots or spaces.

Add the -r option to always add the root-local prefix to the path.

Add the option to the documentation and improve the help text.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-12-11 00:24:44 +01:00
Christian Franke
757424f744 Cygwin: doc: document sched_setpolicy(2) and priority mapping
Document the long standing mapping from nice or sched_priority
values to Windows priority classes and the new behavior of
sched_setpolicy(8).

Signed-off-by: Christian Franke <christian.franke@t-online.de>
2024-12-04 19:06:48 +01:00
Corinna Vinschen
06aa5a7516 Cygwin: FS_IOC_[GS]ETFLAGS: handle pinned and unpinned attributes
Add FS_PINNED_FL and FS_UNPINNED_FL flags and handle them with
mode bits 'p' and 'u' in chattr(1) and lsattr(1).

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-03-08 21:54:58 +01:00
Corinna Vinschen
0e3bb302de Cygwin: newgrp: only allow group from supplementary group list
Windows only allows to set the primary group to a group already
present in the TOKEN_GROUP list.  Cygwin OTOH fakes success at
setgid() time, to allow a subsequent call to setuid() to do
the actual account switching.  To have a sane behaviour in the
command line tool, check group membership and disallow to switch
to groups other than those already present in the user token.

Fixes: 8bd56ec873453 ("Cygwin: newgrp: first full version")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-02-24 13:08:34 +01:00
Corinna Vinschen
35b10bb8c6 Cygwin: fix typo in winjitdebug description
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-02-03 20:28:46 +01:00
Corinna Vinschen
918c3eda41 Cygwin: document new winjitdebug option
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-02-03 20:03:12 +01:00
Corinna Vinschen
76760707ec Cygwin: document showing command line on ps -f
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-02-01 12:44:28 +01:00
Jon Turney
15140d6df6
Cygwin: Don't terminate via dumper
A process which is exiting due to a core dumping signal doesn't
propagate the correct exist status after dumping core, because 'dumper'
itself forcibly terminates the process.

Use 'dumper -n' to avoid killing the dumped process, so we continue to
the end of signal_exit(), to exit with the 128+signal exit status.

Busy-wait in exec_prepared_command() in an attempt to reliably notice
the dumper attaching, so we don't get stuck there.

Also: document these important facts for custom uses of error_start.
2024-01-23 16:07:50 +00:00
Corinna Vinschen
d45261f62a Cygwin: replace all fgrep' with grep -F'
Unfortunately fgrep is now deprecated in a very pushy way.
Make sure to use grep -F instead all around, even in docs
and comments/

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-01-18 10:53:25 +01:00
Jon Turney
07cccc74a5
Cygwin: Update documentation for cygwin_stackdump 2024-01-16 14:07:08 +00:00
Jon Turney
b7868e7410
Cygwin: Disable writing core dumps by default.
Change the default core limit from unlimited to 0 (disabled)
2024-01-16 14:07:05 +00:00
Jon Turney
91457377d6
Cygwin: Make 'ulimit -c' control writing a coredump
Pre-format a command to be executed on a fatal error to run 'dumper'
(using an absolute path).

Factor out executing a pre-formatted command, so we can use that for
invoking the JIT debugger in try_to_debug() (if error_start is present
in the CYGWIN env var) and to invoke dumper when a fatal error occurs.

On a fatal error, if the core file size limit is greater than 1MB,
invoke dumper to write a core dump. Otherwise, if that limit is greater
than 0, write a .stackdump file, as previously.

Adjust and clarify the associated documentation.

Also: Fix so that the error_start JIT debugger is now invoked, even when
ulimit -c is zero.

Also: Fix uses of console_printf() inside exec_prepared_command(). It's
output is written via the Windows console device, so needs to use
Windows-style line endings.

Also: consistently return non-zero from try_to_debug() if we debugged.

Future work: Truncate or remove the file written, if it exceeds the
maximum size set by the ulimit.

Future work: Using the words "fatal error" could probably be improved
on. This means exiting on one of the "certain signals whose default
action is to cause the process to terminate and produce a core dump
file".
2024-01-16 14:07:03 +00:00
Christian Franke
d8c0fb090c Cygwin: introduce close_range(2)
This function closes or sets the close-on-exec flag for a specified
range of file descriptors.  It is available on FreeBSD and Linux.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
2024-01-15 12:52:56 +01:00
Corinna Vinschen
4ecfb5b729 Cygwin: api docs: add missing fallocate
Also add notes in terms of fallocate quirks.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-01-15 11:04:29 +01:00
Jon Turney
241b50a7ab
Cygwin: Clarifications in 3.5 changes doc 2024-01-12 13:40:28 +00:00
Jon Turney
d11629ddb3
Cygwin: Fix a stray '\n' in cygcheck manpage
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2024-01-10 16:43:13 +00:00
Corinna Vinschen
cb21f8bc56 Cygwin: doc: add missing change to posix_spawnp
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-11-30 22:38:59 +01:00
Corinna Vinschen
832e91422c Cygwin: sparse support: enable automatic sparsifying of files on SSDs
Given that SSDs don't have a seek penalty, we can enable
automatic sparsifying of files on SSDs, even if the "sparse"
mount option is not set.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-11-30 22:37:35 +01:00
Jon Turney
127166f707
Cygwin: Add '--names-only' flag to cygcheck
Add '--names-only' flag to cygcheck, to output just the bare package
names.
2023-11-29 14:34:10 +00:00
Corinna Vinschen
e01c50c7b0 Cygwin: introduce fallocate(2)
First cut of the new, Linux-specific fallocate(2) function.
Do not add any functionality yet, except of basic handling
of FALLOC_FL_KEEP_SIZE.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-11-28 10:52:05 +01:00
Christian Franke
643275ed18 Cygwin: Document /dev/disk/by-* subdirectories
Signed-off-by: Christian Franke <christian.franke@t-online.de>
2023-11-17 20:37:29 +01:00
Christian Franke
7236f22f71 Cygwin: Document /dev/disk/by-id and /dev/disk/by-partuuid
Signed-off-by: Christian Franke <christian.franke@t-online.de>
2023-11-07 16:15:12 +01:00
Corinna Vinschen
2ab2e73c2c Cygwin: document FIFO over NFS change
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-04 10:41:06 +02:00
Corinna Vinschen
6407da947d Cygwin: doc: add new API calls in 3.5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-25 11:11:32 +02:00
Corinna Vinschen
9939aa7d09 Cygwin: add SEEK_DATA/SEEK_HOLE addition to release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09 17:21:54 +02:00
Corinna Vinschen
c49bc478b4 Cygwin: Add ISO C2X functions c8rtomb, mbrtoc8
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-02 16:56:24 +02:00
Corinna Vinschen
4f258c55e8 Cygwin: Add ISO C11 functions c16rtomb, c32rtomb, mbrtoc16, mbrtoc32.
Add uchar.h accordingly.

For the c32 functions, use the internal functions wirtomb and mbrtowi
as base, and convert wirtomb and mbrtowi to inline functions calling
the c32 functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-31 22:39:09 +02:00
Jon Turney
a1ee8a0f05
Cygwin: testsuite: Drop using DejaGnu to run tests
A more sophisticated (and modern) test harness would probably be useful,
but switching to Automake's built-in test harness gets us parallel test
execution, colourization of failures, simplifies matters, seems adequate
for the current testuite, and means we don't need to write any icky Tcl.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-22 17:16:37 +01:00