newlib/winsup/utils
Corinna Vinschen c1023ee353 Cygwin: path_conv: decouple path_types from mount types
- Remove another unfortunate amalgamation: Mount flags (MOUNT_xxx)
  are converted to path_types (PATH_xxx) and mixed with non-mount
  path_types flags in the same storage, leading to a tangled,
  pell-mell usage of mount flags and path flags in path_conv and
  symlink_info.

- There's also the case of PC_NONULLEMPTY.  It's used in exactly
  one place with a path_conv constructor only used in this single
  place, just to override the automatic PC_NULLEMPTY addition
  when calling the other path_conv constructors.  Crazily,
  PC_NONULLEMPTY is a define, no path_types flag, despite its
  name.

- It doesn't help that the binary flag exists as mount and path
  flag, while the text flag only exists as path flag.  This leads
  to mount code using path flags to set text/binary.  Very confusing
  is the fact that a text mount/path flag is not actually required;
  the mount code sets the text flag on non binary mounts anyway, so
  there are only two states.  However, to puzzle people a bit more,
  path_conv::binary wrongly implies there's a third, non-binary/non-text
  state.

Clean up this mess:

- Store path flags separately from mount flags in path_conv and
  symlink_info classes and change all checks and testing inline
  methods accordingly.

- Make PC_NONULLEMPTY a simple path_types flag and drop the
  redundant path_check constructor.

- Clean up the definition of pathconv_arg, path_types, and mount flags.
  Use _BIT expression, newly define in cygwin/bits.h.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-06 20:30:14 +01:00
..
COPYING.dumper * dumper.cc: Change license to plain GPLv2 + later. 2007-07-24 19:08:23 +00:00
Makefile.in Cygwin: Add lsattr and chattr tools 2018-12-26 09:24:33 +01:00
aclocal.m4 winsup/ChangeLog: 2013-11-07 00:19:52 +00:00
autogen.sh ChangeLog: 2012-11-23 13:22:47 +00:00
bloda.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
chattr.c Cygwin: Add lsattr and chattr tools 2018-12-26 09:24:33 +01:00
configure Replace AC_CANONICAL_SYSTEM with AC_CANONICAL_TARGET, fix AC_INIT usage 2016-03-30 14:09:19 +02:00
configure.ac Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
cygcheck.cc Cygwin: utils: cygcheck: fix filesystem output format 2018-08-08 10:50:13 +02:00
cygpath.cc cygutils: Fix resource leak in get_short_paths 2016-11-24 16:04:42 +01:00
cygwin-console-helper.cc * cygwin-console-helper.cc: New file. 2009-07-05 00:01:26 +00:00
dump_setup.cc winsup/utils/dump_setup.cc: Remove the function 'base' 2017-10-25 17:02:26 +02:00
dumper.cc Cygwin: fix bumptious GCC 7 warnings 2018-06-26 17:20:48 +02:00
dumper.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
gencat.c cygwin: add gencat tool 2018-01-19 13:19:21 -06:00
getconf.c cygwin: add LFS_CFLAGS etc. to confstr/getconf 2018-01-16 12:12:45 -06:00
getfacl.c getfacl: Simplify by using acl_to_any_text 2018-07-25 09:32:36 +02:00
kill.cc Fix typo in kill(1) 2016-11-24 16:00:28 +01:00
ldd.cc Make ldd stop after any non-continuable exception 2017-04-04 18:47:44 +01:00
ldh.cc * ldh.cc (WinMain): Change DONT_RESOLVE_DLL_REFERENCES to 2010-08-28 12:12:53 +00:00
loadlib.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
locale.cc Add -i/--input option to locale(1) 2016-08-17 10:58:04 +02:00
lsattr.c Cygwin: Add lsattr and chattr tools 2018-12-26 09:24:33 +01:00
minidumper.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
mkgroup.c mkgroup/mkpasswd: Fix potential buffer overwrite in corner case 2016-10-23 17:04:55 +02:00
mkpasswd.c mkgroup/mkpasswd: Fix potential buffer overwrite in corner case 2016-10-23 17:04:55 +02:00
module_info.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
mount.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
parse_pe.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
passwd.c passwd: Fix potential buffer overflow 2016-10-23 17:16:30 +02:00
path.cc Cygwin: path_conv: decouple path_types from mount types 2019-01-06 20:30:14 +01:00
path.h Cygwin: utils: change 3rd readlink param to size_t 2018-08-08 10:50:19 +02:00
pldd.c pldd: Fix resource leak and missing check if fopen failed 2016-10-23 17:22:34 +02:00
ps.cc Cygwin: utils: ps: use fputs to print fixed strings 2018-08-09 08:41:18 +02:00
regtool.cc cygwin: regtool: encode error messages correctly 2017-06-20 13:17:49 +02:00
setfacl.c setfacl: Rename the option --file to --set-file, as on Linux 2018-08-17 11:35:24 +02:00
setmetamode.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
ssp.c Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
ssp.txt Cleanup formatting on some files. Remove excessive whitespace. 2000-10-28 05:00:00 +00:00
strace.cc Cygwin: utils: strace: fix format string 2018-08-08 10:50:19 +02:00
testsuite.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
testsuite.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
tzmap-from-unicode.org Asia/Calcutta -> Asia/Kolkata (not on unicode.org) 2015-04-23 22:03:45 +02:00
tzmap.h Asia/Calcutta -> Asia/Kolkata (not on unicode.org) 2015-04-23 22:03:45 +02:00
tzset.c tzset: Fix array length given to GetGeoInfoW 2016-10-23 16:45:21 +02:00
umount.cc Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
wide_path.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00