Commit Graph

860 Commits

Author SHA1 Message Date
Ken Brown 8ad852ac12 Clarify Cygwin's support for Win32 paths
See https://www.cygwin.com/ml/cygwin/2016-08/msg00431.html.
2016-08-23 20:29:20 +02:00
Corinna Vinschen 2ea3993619 Export and document strerror_l, strptime_l, wcsftime_l from Cygwin
Bump Cygwin API minor number.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-23 17:51:14 +02:00
Jon Turney fdb7df230d Add pthread_getname_np and pthread_setname_np
This patch adds pthread_getname_np and pthread_setname_np.

These were added to glibc in 2.12[1] and are also present in some form on
NetBSD and several UNIXes.

The code is based on NetBSD's implementation with changes to better match
Linux behaviour.

Implementation quirks:

* pthread_setname_np with a NULL pointer segfaults (as linux)

* pthread_setname_np returns ERANGE for names longer than 16 characters (as
linux)

* pthread_getname_np with a NULL pointer returns EFAULT (as linux)

* pthread_getname_np with a buffer length of less than 16 returns ERANGE (as
linux)

* pthread_getname_np truncates the thread name to fit the buffer length.
This guarantees success even when the default thread name is longer than 16
characters, but means there is no way to discover the actual length of the
thread name. (Linux always truncates the thread name to 16 characters)

* Changing program_invocation_short_name changes the default thread name (on
linux, it has no effect on the default thread name)

I'll leave it up to you to decide if any of these matter.

This is implemented via class pthread_attr to make it easier to add
pthread_attr_[gs]etname_np (present in NetBSD and some UNIXes) should it
ever be added to Linux (or we decide we want it anyway).

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS
2016-08-23 15:07:42 +01:00
Corinna Vinschen 0df76cbd63 Document nl_langinfo_l and separate POSIX from GNU extensions in release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-20 17:24:16 +02:00
Corinna Vinschen 5e9b414e1c Add release message for commit eb61113
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-19 17:25:31 +02:00
Corinna Vinschen 8443fcd625 Add release message for commit c02ac89
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-17 11:17:26 +02:00
Corinna Vinschen c02ac89f28 Add -i/--input option to locale(1)
The default UI language returned by GetUserDefaultUILanguage does not
necessarily reflect what the user really wants.  E. g., the system could
be en_US, but the desired language is en_CA, without having a CA langpack
installed.

Changing the settings under "Languages" and changing the keyboard layout
is only affecting the so-called  "Input language", while what's returned
by GetUserDefaultUILanguage is the "Display language".  Changing the
latter requires installing MUI langpacks.

Thus, we introduce a way to fetch the "Input language" using the -i or
--input option.

Also clean up documentation of locale(1).

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-17 10:58:04 +02:00
Corinna Vinschen 5dc306cf97 Add release text for Cygwin 2.6.0
Move release/2.5.3 to release/2.6.0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-15 21:26:01 +02:00
Corinna Vinschen 238455adfa Implement strto[dflu]_l/wcsto[dflu]_l
Implement GNU extensions strtod_l, strtof_l, strtol_l, strtold_l, strtoll_l,
strtoul_l, strtoull_l, wcstod_l, wcstof_l, wcstol_l, wcstold_l, wcstoll_l,
wcstoul_l, wcstoull_l.

Export from Cygwin, fix posix.xml.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-08-15 17:35:21 +02:00
Corinna Vinschen 765d2c0bac Implement strfmon_l
Use latest code from FreeBSD

Signed-off by: Corinna Vinschen <corinna@vinschen.de>
2016-08-15 10:56:58 +02:00
Corinna Vinschen c1b7d9d93d Implement per-locale string functions
strcasecmp_l, strcoll_l, strncasecmp_l, strxfrm_l,
wcscasecmp_l, wcscoll_l, wcstrncasecmp_l, wcstrxfrm_l,
strftime_l.

Add missing CHEWOUT_FILES from previous patch.

TODO: strfmon_l.

Signed-off by: Corinna Vinschen <corinna@vinschen.de>
2016-08-15 10:56:58 +02:00
Corinna Vinschen 8493c16316 Implement all per-locale ctype functions
Signed-off by: Corinna Vinschen <corinna@vinschen.de>
2016-08-15 10:56:57 +02:00
Corinna Vinschen c402f0388f posix.xml: Note duplocale, freelocale, newlocale, uselocale as implemented
Signed-off by: Corinna Vinschen <corinna@vinschen.de>
2016-08-15 10:56:57 +02:00
Corinna Vinschen 886f89ac39 posix.xml: Add missing unimplemented functions from POSIX-1.2013
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-07-23 13:56:52 +02:00
Jon Turney 53a831f063 Improve description of Cygwin ldd utility
Improve the description of Cygwin ldd utility to give a bit more detail
about how it does what it does

Also add a security warning (modelled after the one in the Linux manpage)
that it may end up executing the file it is applied to.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-07-07 14:48:09 +01:00
Jon Turney 5ff2fcf9bd Use <filename> tag, not <pathname> tag
Fix an instance of the invalid <pathname> tag in Cygwin utils documentation,
by using the valid <filename> tag instead.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-07-07 14:48:09 +01:00
Jon Turney d4bed7c3af Use <example> tag at same level as <para>, not inside it
In Cygwin utils documentation, use the <example> tag at same level as
<para>, not inside it.

This improves the generated manpages.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-07-07 14:48:09 +01:00
Jon Turney e27cfa4631 Restore mingw64-x86_64-gcc-core in FAQ listing required packages
Restore mingw64-x86_64-gcc-core to requirements for 32-bit builds in FAQ
listing required packages, and give reason.
2016-06-29 15:08:33 +01:00
Jon Turney 24b1c90116 Update FAQ listing required packages for building Cygwin
docbook2X is now required for building documentation
libiconv differences between x86_64 and x86 no longer exist
2016-06-28 20:11:12 +01:00
Corinna Vinschen cb34fffe07 Remove CYGWIN=detect_bloda option 2016-06-25 00:43:01 +02:00
Corinna Vinschen 54c284caf2 Remove XP and Server 2003 from documentation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-24 23:21:10 +02:00
Corinna Vinschen 6e623e9320 Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.

Everything else stays under GPLv3+.

New Linking Exception exempts resulting executables from LGPLv3 section 4.

Add CONTRIBUTORS file to keep track of licensing.

Remove 'Copyright Red Hat Inc' comments.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23 10:09:17 +02:00
Adam Dinwoodie 3b66731698 Git is Git, not GIT
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-05-24 12:09:10 +02:00
Corinna Vinschen 8d67708a08 Add latest changes to release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-04-05 10:35:05 +02:00
Peter Foley 44b72b43d6 Update autoconf for doc/lsaauth/utils
Don't use obsolete LIB_AC_PROG_CC.
Run autoupdate.

winsup/ChangeLog:
doc/aclocal.m4: delete
lsaauth/aclocal.m4: ditto
doc/configure.ac: refactor and update
lsaauth/configure.ac: ditto
utils/configure.ac: ditto
doc/configure: regenerate
lsaauth/configure: regenerate
utils/configure: regenerate

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-04-01 14:04:41 +02:00
Corinna Vinschen 6436024c4c Replace AC_CANONICAL_SYSTEM with AC_CANONICAL_TARGET, fix AC_INIT usage
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-30 14:09:19 +02:00
Corinna Vinschen 3d90769979 Document implemented functions
* posix.xml (std-susv4): Add newly implemented math SUSv4 math
	functions.  Add missing functions strtold and tcgetsid.  Re-sort.
	(std-gnu): Add clog10l, exp10l, pow10l, sincos{f,l}.
	(std-notimpl): Drop now implemented functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29 17:45:01 +02:00
Corinna Vinschen 63e4f1291c Add release message for 792e51b
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-29 14:59:18 +02:00
Corinna Vinschen 445036bb98 Remove Mingw.org from FAQ, or replace with Mingw-w64.
* faq-api.xml: Change MingW to Mingw-w64.
	* faq-programming.xml: Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-21 21:09:23 +01:00
Corinna Vinschen 3df400dc83 winsup: Move all old CVS Changelogs into CVSChangeLogs.old dir 2016-03-19 13:59:52 +01:00
Corinna Vinschen e42f66d00f Remove ill-advised cygwin_props
Cygwin_props have been invented to allow switching off the unique
installation keys in the first place, supposedly for debugging.
This never really was a good idea, after all we *want* the installations
to be independent and there's no good reason to break that, not even
for debugging purposes.

Other than that, cygwin_props were meant to be used for some other global
settings which never took place.  There's just no good reason to tweak
the DLL binary invisibly where a setting could be done in a file or the
environment.

This patch removes the cygwin_props entirely, including the related
settings in cygcheck.

cygwin:
	* cygprops.h: Remove file.
	* globals.cc (cygwin_props): Remove.
	* cygheap.cc (init_cygheap::init_installation_root): Drop removing
	installation key.

utils:
	* cygcheck.cc: Drop including cygprops.h.  Remove now unused option
	values.
	(unique_object_name_opt): Remove.
	(handle_unique_object_name): Remove function.
	(usage): Remove text for unique-object-names options.
	(longopts): Remove unique-object-names options.
	(main): Drop handling unique-object-names options.

doc:
	* utils.xml (cygcheck): Remove text for unique-object-names options.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-19 13:21:18 +01:00
Corinna Vinschen 83029bb69e Remove references to older Cygwin releases from documentation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-18 22:52:04 +01:00
Thomas Wolff aa2d448093 Add release message for commit 7346568 2016-03-17 08:59:17 +01:00
Mark Geisert d0cf3b7c02 Documentation covering profiling Cygwin programs. 2016-03-11 11:08:01 +01:00
Corinna Vinschen 2b174636e5 Add commit 5807ba83e release message to documentation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-10 20:47:33 +01:00
Corinna Vinschen c09e96fda0 Cygwin: Document new POSIX ACL API
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-08 17:33:08 +01:00
Jon Turney 930474058e faq: Sort BLODA list and update advice on fixing fork failures
* faq-using.xml (bloda): Alphabetically sort BLODA list for ease
	of finding things in it.
	(fixing-fork-failures): Update to suggest rebase-trigger rather
	than running rebaseall via dash yourself.  Mention detect_bloda
	CYGWIN token.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-03-08 14:39:41 +00:00
Alexey Sokolov bf45e12fb6 Mention 64-bit Cygwin as another remedy for fork() failures. 2016-03-04 22:02:35 +01:00
Yaakov Selkowitz 8b1ede3ce1 cygwin: Export clog10, clog10f
winsup/cygwin/
	* common.din: Add clog10, clog10f.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

	winsup/doc/
	* new-features.xml (ov-new2.5): Mention clog10, clog10f.
	* posix.xml (std-gnu): Add clog10, clog10f.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-02-22 14:45:37 -06:00
Corinna Vinschen 609feee9e5 Update Cygwin release notes.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-18 15:56:51 +01:00
Yaakov Selkowitz 7503575f1d cygwin: accept SIGIOT as alias of SIGABRT
winsup/cygwin/
	* include/cygwin/signal.h (SIGIOT): Define SIGIOT in terms of SIGABRT.
	* strsig.cc (struct sigdesc): Ditto.

	winsup/doc/
	* utils.xml (kill): Document SIGIOT.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-02-18 08:20:03 -06:00
Corinna Vinschen 10e0db58e4 Document pthread_barrier* functions as implemented
posix.xml (std-susv4): Add pthread_barrier* functions.
	(std-notimpl): Remove here.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-13 17:03:36 +01:00
Corinna Vinschen 9a25a76e7b Bump Cygwin version to 2.5.0
Add a release file.  Add release text to documentation.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-13 16:55:00 +01:00
Corinna Vinschen 11a37290c6 Fix missing 'user' in usertemp docs
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-01-27 15:37:46 +01:00
Jon Turney 9c8a6e5646 faq: Update FAQ question and answer about gdb and signals
* faq-programming.xml: Update question and answer about gdb and signals.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-01-15 14:59:07 +00:00
Corinna Vinschen 9ee2624240 Deprecate all winsup ChangeLog files
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-01-07 21:16:01 +01:00
Corinna Vinschen 80a800978b Convert utmp{x}name to int, return useful value. Define _PATH_UTMPX
* syscalls.cc (utmpname): Convert to int.  Return 0 if strdup
	worked, -1 otherwise.
	* include/utmpx.h (_PATH_UTMPX): Define as _PATH_UTMP.
	(utmpxname): Declare as int function.
	* include/sys/utmp.h (utmpname): Ditto.
	* include/cygwin/version.h: Bump API minor version.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-01-07 15:40:40 +01:00
Corinna Vinschen ddb7e770dd setfacl(1): Rewrite support for mask recomputation
* setfacl.cc (modacl): Move recomputing mask into new function.
        (check_got_mask): New function checking if mask is in input.
        (recompute_mask): New function to recompute mask.
        (addmissing): Align mask computation to Linux setfacl.
        (setfacl): Call check_got_mask and recompute_mask on Set, Delete and
        Modify actions.
        (usage): Rename --substitute to --set.
        (longopts): Add --set option.

        * utils.xml (setfacl): Rename --substitute to --set.
        * new-features.xml (ov-new2.4): Rephrase setfacl changes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-12-21 13:05:41 +01:00
Johannes Schindelin fb71716d2c Introduce the 'usertemp' filesystem type
* mount.cc (mount_info::from_fstab_line): Support mounting the current
	user's temp folder as /tmp/.  This is particularly useful a feature
	when Cygwin's own files are write-protected.

	* pathnames.xml: document the new usertemp file system type

Detailed explanation:

In the context of Windows, there is a per-user directory for temporary
files, by default specified via the environment variable %TEMP%. Let's
allow to use that directory for our /tmp/ directory.

With this patch, we introduce the special filesystem type "usertemp":
By specifying

	none /tmp usertemp binary,posix=0 0 0

in /etc/fstab, the /tmp/ directory gets auto-mounted to the directory
specified by the %TEMP% variable.

This feature comes handy in particularly in scenarios where the
administrator might want to write-protect the entire Cygwin directory
yet still needs to allow users to write into the /tmp/ directory.
This is the case in the context of Git for Windows, where the
Cygwin (MSys2) root directory lives inside C:\Program Files and hence
/tmp/ would not be writable otherwise.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-12-07 17:37:44 +01:00
Corinna Vinschen 5aa8817e3a Allow cygwin_conv_path(3) and cygpath(1) to emit /proc/cygdrive prefixed path
* include/sys/cygwin.h (CCP_PROC_CYGDRIVE): New flag.
        * mount.cc (mount_info::cygdrive_posix_path): Take flag values rather
        than just a trailing_slash_p bool.  Emit /proc/cygdrive path if
        CCP_PROC_CYGDRIVE flag is given.
        (mount_info::conv_to_posix_path): Take flag values rather than just
        a keep_rel_p bool.  Rename _p variables.  Print flag value as hex in
        debug_printf.  Call cygdrive_posix_path with flag values.
        * mount.h (mount_info::cygdrive_posix_path): Accommodate above change
        in declaration.
        (mount_info::conv_to_posix_path): Ditto.
        * fhandler_process.cc (format_process_exename): Accommodate change to
        mount_info::conv_to_posix_path.
        * path.cc (cygwin_conv_path): Ditto.

        * cygpath.cc (absolute_flag): Initialize to CCP_RELATIVE to simplify
        expressions.
        (cygdrive_flag): New global flag.
        (long_options): Add --proc-cygdrive option.
        (options): Add -U option.
        (usage): Add description for -U option.
        (do_sysfolders): Or cygdrive_flag to cygwin_conv_path call.
        (do_pathconv): Simply or absolute_flag to conv_func.  Or
        cygdrive_flag to conv_func.
        (do_options): Initalize absolute_flag to CCP_RELATIVE.  Initialize new
        cygdrive_flag.  Set absolute_flag to CCP_ABSOLUTE on -a.  Set
        cygdrive_flag to CCP_PROC_CYGDRIVE on -U.

        * new-features.xml (ov-new2.4): Document cygpath -U option.
        * utils.xml (cygpath): Ditto.
        * path.xml (func-cygwin-path): Add CCP_PROC_CYGDRIVE description.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-12-06 17:25:48 +01:00