newlib-cygwin/winsup/cygwin/local_includes
Johannes Schindelin 27376c60a9 Allow deriving the current user's home directory via the HOME variable
This patch hails from Git for Windows (where the Cygwin runtime is used
in the form of a slightly modified MSYS2 runtime), where it is a
well-established technique to let the `$HOME` variable define where the
current user's home directory is, falling back to `$HOMEDRIVE$HOMEPATH`
and `$USERPROFILE`.

The idea is that we want to share user-specific settings between
programs, whether they be Cygwin, MSYS2 or not.  Unfortunately, we
cannot blindly activate the "db_home: windows" setting because in some
setups, the user's home directory is set to a hidden directory via an
UNC path (\\share\some\hidden\folder$) -- something many programs
cannot handle correctly, e.g. `cmd.exe` and other native Windows
applications that users want to employ as Git helpers.

The established technique is to allow setting the user's home directory
via the environment variables mentioned above: `$HOMEDRIVE$HOMEPATH` or
`$USERPROFILE`.  This has the additional advantage that it is much
faster than querying the Windows user database.

Of course this scheme needs to be opt-in.  For that reason, it needs
to be activated explicitly via `db_home: env` in `/etc/nsswitch.conf`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-03-28 12:18:14 +02:00
..
machine Cygwin: add local machine/asm.h header 2022-12-20 10:13:59 +01:00
child_info.h
clock.h
collate.h Cygwin: glob: implement collating symbol support 2023-02-20 22:50:17 +01:00
cpuid.h
create_posix_thread.h Cygwin: rename CygwinCreateThread to create_posix_thread 2022-08-10 18:06:28 +02:00
cygerrno.h
cygheap.h Allow deriving the current user's home directory via the HOME variable 2023-03-28 12:18:14 +02:00
cygheap_malloc.h
cygmalloc.h Cygwin: fork: fix a potential hang in fork 2022-08-29 12:25:24 +02:00
cygserver.h
cygserver_ipc.h
cygserver_msg.h
cygserver_pwdgrp.h
cygserver_sem.h
cygserver_setpwd.h
cygserver_shm.h
cygthread.h
cygtls.h Cygwin: cygtls: drop useless alignment directives 2022-09-05 19:52:28 +02:00
cygwait.h
cygwin-cxx.h
cygwin_version.h
cygxdr.h
debug.h Cygwin: push missing change to debug.h 2022-08-22 14:53:30 +02:00
devices.h
dll_init.h
dtable.h
environ.h
errmap.h
exception.h
fhandler.h Cygwin: ctty: Replace ctty constant with more descriptive macros. 2023-03-07 10:51:29 +09:00
fhandler_virtual.h
gcc_seh.h
gmon.h
heap.h
lc_collelem.h Cygwin: nlsfuncs.cc: introduce collating elements and helper functions 2023-02-20 22:38:52 +01:00
lc_def_codesets.h Cygwin: locale: fix devanagari modifier 2023-02-26 17:17:33 +01:00
lc_era.h
lc_msg.h
ldap.h
loadavg.h
math.h
memory_layout.h Cygwin: fix two comments in heap.cc and memory_layout.h 2023-01-18 20:13:38 +01:00
miscfuncs.h Cygwin: miscfuncs.h: fix comment 2022-08-19 15:51:49 +02:00
mmap_alloc.h Cygwin: add memory_layout.h 2022-10-28 16:26:53 +02:00
mmap_helper.h
mount.h
mqueue_types.h
mtinfo.h
nfs.h
ntdll.h Cygwin: fix a few comments mentioning Windows 7 or 8 2022-12-04 14:01:41 +01:00
path.h
pathfinder.h
perprocess.h
pinfo.h
posix_timer.h
profil.h
pwdgrp.h
registry.h
sec_posixacl.h
security.h Cygwin: get_posix_access: Make mode_t parameter mandatory 2023-02-09 21:58:44 +01:00
select.h
shared_info.h Cygwin: open_shared: don't reuse shared_locations parameter as output 2023-01-17 16:32:14 +01:00
sigproc.h
spinlock.h
string.h
sync.h
thread.h
timerfd.h
tls_pbuf.h
tty.h Cygwin: ctty: Replace ctty constant with more descriptive macros. 2023-03-07 10:51:29 +09:00
userinfo.h
vstrlist.h
wchar.h Cygwin: mbsnrtowci: like mbsnrtowcs, just for wint_t 2023-03-01 10:54:52 +01:00
wincap.h Cygwin: wincap: make capability flags readonly 2023-01-12 10:34:32 +01:00
winf.h
wininfo.h
winlean.h Cygwin: fs_info: update filesystem flags and check Windows 7 flags 2023-03-20 12:55:30 +01:00
winsup.h Cygwin: wincap.h: clarify NO_COPY_RO usage 2023-01-12 10:51:39 +01:00