(handle_exceptions): Be more assertive in finding ebp for use under W2K.
Create a dummy stack frame for cases where program is dying and a stack dump is
being output.
(sig_handle): Fill out a GetThreadContext for use with a user-generated "core
dump".
* fork.cc (fork): Use above defines instead of numerical constants.
* shared.cc (sec_user): Ditto.
* shared.h (class pinfo): Ditto.
* syscall.cc (seteuid): Ditto.
* spawn.cc (_spawnve): Ditto. Eliminate conditional.
(spawn_guts): Set child->uid = USHRT_MAX when user context will be
changed in child process.
* uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid
to avoid reloading of /etc/passwd on process startup if ntsec is off.
Use above defines instead of numerical constants.
* security.cc: Move define for MAX_SID_LEN to winsup.h.
appropriate.
(LIBCOS): Find additional stub library stuff in their own subdirectory.
* dcrt0.cc: Convert user_data pointer to static __cygwin_user_data area.
(do_global_ctors): Check magic_bisquit for initialization.
(dll_crt0_1): First group of premain functions prior to fd initialization. Run
second group before calling main.
(dll_crt0 ()): New function, called from new initialization code.
(dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on
initialization.
* debug.cc (thread_stub): Initialize bottom of stack with per-thread info.
* environ.cc (parse_thing): Use binmode global to control CYGWIN=binmode
behavior.
* fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode to
O_BINARY or O_TEXT to override disk mount settings.
* libcmain.cc: Move to lib subdirectory.
* libccrt0.cc: Ditto.
* dll_main.cc: Ditto.
* dll_entry.cc: Ditto.
* getopt.c: Ditto.
* thread.cc (thread_init_wrapper): Call ExitThread explicitly rather than
returning, as a preliminary step towards placing per thread info at the bottom
of the stack.
* winsup.h: Move per_process class to include/sys/cygwin.h. Declare new
dll_crt0().
* include/cygwin/version.h: Bump API minor version.
* binmode.c: New file.
* textmode.c: Ditto.
* lib/_cygwin_crt0_common.cc: Ditto.
* lib/crt0.h: Ditto.
* lib/cygwin_attach_dll.c: Ditto.
* lib/cygwin_crt0.c: Ditto.
* lib/dll_entry.cc: Ditto.
* lib/dll_main.cc: Ditto.
* lib/getopt.c: Ditto.
* lib/libcmain.c: Ditto.
* lib/premain0.c: Ditto.
* lib/premain1.c: Ditto.
* lib/premain2.c: Ditto.
* lib/premain3.c: Ditto.
internal_getlogin().
* uinfo.cc (internal_getlogin): Use impersonation token instead
of process token in case of active impersonation. Add some comments.
(uinfo_init): Initializing myself->token and myself->impersonated
before calling internal_getlogin(). Add some comments.
BACKUP_REPARSE_DATA and BACKUP_SPARSE_BLOCK.
Add file open flags FILE_FLAG_OPEN_REPARSE_POINT and
FILE_FLAG_OPEN_NO_RECALL.
* winioctl.h: Add device io control codes FSCTL_GET_REPARSE_POINT,
FSCTL_SET_REPARSE_POINT and FSCTL_DELETE_REPARSE_POINT.
* winnt.h: Add typedef for GUID.
Add file attributes FILE_ATTRIBUTE_ENCRYPTED,
FILE_ATTRIBUTE_SPARSE_FILE, FILE_ATTRIBUTE_REPARSE_POINT and
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED.
Add volume attributes FILE_VOLUME_QUOTAS, FILE_SUPPORTS_SPARSE_FILES,
FILE_SUPPORTS_REPARSE_POINTS, FILE_SUPPORTS_REMOTE_STORAGE,
FILE_SUPPORTS_OBJECT_IDS and FILE_SUPPORTS_ENCRYPTION.
Add several reparse point defines and typedefs for REPARSE_DATA_BUFFER,
REPARSE_GUID_DATA_BUFFER and REPARSE_POINT_INFORMATION.
* lib/psapi.def: New file.
* spawn.cc (_spawnve): Ditto.
* passwd.cc: Remove static from `passwd_in_memory_p'.
(read_etc_passwd): Remove static.
* uinfo.cc: Move global declaration of `read_etc_group' and
`group_in_memory_p' into `uinfo_init'.
(internal_getlogin): Try to get SID from current process first.
(uinfo_init): Don't set uid and gid if `myself' has a valid SID.
Only load /etc/passwd and /etc/group in that case.
for existing user hive.
Use MAX_PATH instead of numerical constant for array size.
Use return code of RegLoadKeyA instead of GetLastError for error output.
* libc/include/sys/reent.h (_rand_next): Added __extension__
qualifier as long long type is not strict ANSI.
* libc/stdlib/rand.c (rand): Added __extension__ qualifier
to long long constant.