9119d13db8* autoload.cc (CreateEnvironmentBlock): Import. (DestroyEnvironmentBlock): Import. * environ.cc (env_compare): New static bsearch comparison function. (build_env): Add parameter taking a user token. If token is non-NULL, fetch user's default Windows environment and merge it into the resulting environment. Explain what we do in preceeding comment. * environ,h (build_env): Align prototype to above change. * external.cc (create_winenv): Call build_env with NULL token. * spawn.cc (child_info_spawn::worker): When spawning new process under another user account, call build_env with new token to allow merging user's default Windows environment. * winlean.h (_USERENV_): Define to override dllimport.
Corinna Vinschen
2014-12-02 10:16:03 +0000
9e9d7a8ce1* wincap.cc (wincap_minimal): Remove. (wincaps): Drop has_physical_mem_access. (wincap_10): New global wincaps to support Windows 10. (wincapc::init): Use wincap_10 for version >= 6.4 and as default. * wincap.h (wincaps::has_physical_mem_access): remove.
Corinna Vinschen
2014-12-01 14:02:55 +0000
26158dc3e9* cygheap.cc (init_cygheap::init_tls_list): Accommodate threadlist having a new type threadlist_t *. Convert commented out code into an #if 0. Create thread mutex. Explain why. (init_cygheap::remove_tls): Drop timeout value. Always wait infinitely for tls_sentry. Return mutex HANDLE of just deleted threadlist entry. (init_cygheap::find_tls): New implementation taking tls pointer as search parameter. Return threadlist_t *. (init_cygheap::find_tls): Return threadlist_t *. Define ix as auto variable. Drop exception handling since crash must be made impossible due to correct synchronization. Return with locked mutex. * cygheap.h (struct threadlist_t): Define. (struct init_cygheap): Convert threadlist to threadlist_t type. (init_cygheap::remove_tls): Align declaration to above change. (init_cygheap::find_tls): Ditto. (init_cygheap::unlock_tls): Define. * cygtls.cc (_cygtls::remove): Unlock and close mutex when finishing. * exceptions.cc (sigpacket::process): Lock _cygtls area of thread before accessing it. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * sigproc.cc (sig_send): Ditto. * thread.cc (pthread::exit): Ditto. Add comment. (pthread::cancel): Ditto.
Corinna Vinschen
2014-11-28 20:46:13 +0000
9d2eff6684* cygheap.cc (init_cygheap::find_tls): Add comment. * cygtls.cc (well_known_dlls): Rephrase comment. (bloda_detect): New function. (_cygtls::call2): Call init_thread and bloda_detect for non-pthread threads only. (_cygtls::remove): Move remove_tls and remove_wq calls up to run first. * miscfuncs.cc (struct pthread_wrapper_arg): Rename from struct thread_wrapper_arg. (pthread_wrapper): Rename from thread_wrapper and drop "static". Fix comment. Drop call to _cygtls::remove. Call api_fatal rather than ExitThread. Explain why. * miscfuncs.h (pthread_wrapper): Declare pthread_wrapper. * thread.cc (pthread::exit): Add a FIXME comment. Call _cygtls::remove before calling ExitThread.
Corinna Vinschen
2014-11-28 12:10:12 +0000
b3281dd194* mips/crt0.S: Configure processor based on .MIPS.abiflags. Remove FPU availability check, just use the pre-processor flags to indicicate what the user wanted. * mips/abiflags.S: New file. * mips/regs.S (SR_MSA): Define macro. * mips/mti32.ld: Place .MIPS.abiflags and wrap in marker symbols. * mips/mti64.ld: Likewise. * mips/mti64_64.ld: Likewise. * mips/mti64_n32.ld: Likewise.
Corinna Vinschen
2014-11-28 08:51:03 +0000
d37bfe1da2* libc/include/machine/setjmp.h [__mips__]: Remove __mips_fpr == 64 from the 64-bit _JBTYPE definition. * libc/machine/mips/setjmp.S: Re-work the o32 FP64 support to match the now one-and-only supported o32 FP64 ABI extension. Also support o32 FPXX.
Corinna Vinschen
2014-11-28 08:47:39 +0000
3bde24b892* mkgroup.c (main): Call enum_local_groups with offset 0x30000 for local machine, too.
Corinna Vinschen
2014-11-28 08:44:39 +0000
f3939c059c* mkgroup.c (main): Call enum_groups with offset 0x30000 for local machine, same as from DB. * mkpasswd.c (enum_unix_users): Set pw_passwd field to '*'. (enum_users): Ditto. (main): Call enum_users with offset of 0x30000 for local machine, same as from DB.
Corinna Vinschen
2014-11-27 19:55:37 +0000
e7d7418270* mount.cc (mount_info::init): Take bool argument and allow to initialize mount table in two steps, system and user, depending on bool value. * mount.h (class mount_info): Align declaration of init function to above change. * shared.cc (user_info::initialize): Initialize mount table in two steps to allow internal_getpwsid to create valid POSIX paths from DOS paths given in AD. Add comments. * uinfo.cc (cygheap_pwdgrp::get_home): Allow DOS paths in NSS_SCHEME_FREEATTR attributes. (cygheap_pwdgrp::get_shell): Ditto.
Corinna Vinschen
2014-11-27 16:49:41 +0000
db880b5642* cygheap.cc (init_cygheap::find_tls): Allow to keep loop going after access to threadlist[ix] faulted. In case of an exception, remove threadlist[ix] from threadlist only. Add comment.
Corinna Vinschen
2014-11-27 16:20:14 +0000
84b2a020da2014-11-26 Matthew Fortune <Matthew.Fortune@imgtec.com>
Jeff Johnston
2014-11-27 00:28:09 +0000
93d15b36ef* Makefile.in (install): Add install-ldif target. (install-ldif): New target to install cygwin.ldif. * cygheap.h (class cygheap_pwdgrp): Rename pfx_t to nss_pfx_t. Add PFX to enum value. Add nss_scheme_method enum and nss_scheme_t structure. Add home_scheme, shell_scheme and gecos_scheme members. (NSS_SCHEME_MAX): Define. (cygheap_pwdgrp::get_home): Declare. (cygheap_pwdgrp::get_shell): Declare. (cygheap_pwdgrp::get_gecos): Declare. * cygwin.ldif: New file. * ldap.cc (std_user_attr): New array, just defining the standard attributes. (group_attr): Add cygwinUnixGid. (user_attr): Convert to macro pointing to cygheap->pg.ldap_user_attr. (cygheap_pwdgrp::init_ldap_user_attr): New method. (cyg_ldap::fetch_ad_account): Call cygheap_pwdgrp::init_ldap_user_attr if user_attr initialization is required. Fix comment. (cyg_ldap::get_string_attribute): Implement taking attribute name as argument. * ldap.h: Drop unused macros. (cyg_ldap::get_gecos): Remove. (cyg_ldap::get_home): Remove. (cyg_ldap::get_shell): Remove. (cyg_ldap::get_string_attribute): Declare name argument variant public. * uinfo.cc (cygheap_user::ontherange): Fix indentation. (cygheap_pwdgrp::init): Initialize new home_scheme, shell_scheme and gecos_scheme members. Align comment. (NSS_NCMP): Define comparison macro. (NSS_CMP): Ditto. (cygheap_pwdgrp::nss_init_line): Use aforementioned macros throughout. Fix comment handling. Add db_home, db_shell and db_gecos handling. (fetch_from_description): New function to fetch XML-style attributes from (description) string. (fetch_from_path): New function to evaluate path string with wildcards. (cygheap_pwdgrp::get_home): New methods to fetch pw_dir value. (cygheap_pwdgrp::get_shell): Ditto for pw_shell. (cygheap_pwdgrp::get_gecos): Ditto for pw_gecos. (colon_to_semicolon): Move up. (pwdgrp::fetch_account_from_windows): Convert home, shell, gecos variables to char*. Drop statement breaking extended group info. Fetch home, shell and gecos values using new methods. Use fetch_from_description calls to fetch UNIX id and primary groups from SAM comment field. Accommodate uxid being a char* now. Accommodate the fact that extended info is malloc'ed, rather then alloca'ed. Create linebuf content as multibyte string. Create line buffer by just calling cstrdup.
Corinna Vinschen
2014-11-26 19:46:59 +0000
75e2565a57* libc/include/sys/_default_fcntl.h: Move all Cygwin-specific open flags from Cygwin's fcntl.h here. Remove check for WIN32. Remove Windows-specific macros.
Corinna Vinschen
2014-11-25 11:53:00 +0000
cda7e6ca20* include/fcntl.h: Move all open flags (except O_NDELAY) to newlib's sys/_default_fcntl.h.
Corinna Vinschen
2014-11-25 11:42:20 +0000
d8ba3ea1db* binmode.c (cygwin_premain0): Don't use underscore'd variants of the open flags. * textmode.c (cygwin_premain0): Ditto.
Corinna Vinschen
2014-11-25 11:27:12 +0000
2eda5822dbmerge from gcc
DJ Delorie
2014-11-24 20:35:44 +0000
63d53b92552014-11-23 Joel Sherrill <joel.sherrill@oarcorp.com>
Joel Sherrill
2014-11-24 14:12:32 +0000
cfd6979c39* passwd.c (GetPW): If server is NULL, and the user is not a local user, try to fetch the DC to use as server. (ChangePW): Get Windows username via extra parameter. (usage): Reduce -d help text to reflect above change. (main): Fix typo in comment. Call GetPW and ChangePW as per the changes above.
Corinna Vinschen
2014-11-24 11:07:32 +0000
764d261276* init.cc (dll_entry): Revert previous patch. This requires another solution. * miscfuncs.cc (thread_wrapper): Ditto. * sigproc.cc (exit_thread): Disable sending a signal for synchronization with process exit. Explain why. Keep code in for later inspection, should the problem show up again. (sig_send): Use "tls", rather than "tid" as name for _cygtls arg.
Corinna Vinschen
2014-11-21 21:41:37 +0000
d5692c713fPR target/63901 * configure.host (msp430): Add -mhwmult=none to newlib_cflags.
Nick Clifton
2014-11-21 11:55:39 +0000
f2a0724fca* init.cc (dll_entry): Call _my_tls.remove with INFINITE wait period to avoid SEGVs and subsequent hangs in _cygtls::find_tls. * miscfuncs.cc (thread_wrapper): Ditto.
Corinna Vinschen
2014-11-20 16:23:14 +0000
556b13a0c2* libc/stdio/nano-vfprintf_i.c (_printf_i): Use LONGINT when void* is larger than an int.
Corinna Vinschen
2014-11-20 14:05:28 +0000
308186a134* libc/sys/rtems/sys/syslimits.h (NGROUPS_MAX): Adjust value so that NGROUPS is even.
Corinna Vinschen
2014-11-20 14:03:17 +0000
f70b9c32d5* net.cc (fdsock): Change default values for socket buffers on 32 bit to fix performance on 10Gb networks.
Corinna Vinschen
2014-11-20 08:29:31 +0000
5c6a0f3117* uinfo.cc (pwdgrp::fetch_account_from_windows): Allow fetching of NT SERVICE accounts by name. Always prepend domain to NT SERVICE accounts. Add U-domain\username string to pw_gecos for predefined builtin accounts as well.
Corinna Vinschen
2014-11-17 10:09:01 +0000
73742508fc* fhandler.h (fhandler_termios::line_edit): Add parameter to return written bytes. * fhandler_termios.cc (fhandler_termios::tcinit): Fix formatting. (fhandler_termios::line_edit): Return bytes actually written. Write in 32 byte chunks in non-canonical mode to reduce number of WriteFile calls. Don't just eat unwritten bytes in case of an error condition. Especially, don't report them back to the caller as written. * fhandler_tty.cc (fhandler_pty_slave::read): Disable code reducing the number of bytes read from the pipe to vmin. Add comment. (fhandler_pty_master::write): Convert ret to ssize_t type. Just call line_edit once, not in a loop once for each byte. Return bytes written as returned by line_edit.
Corinna Vinschen
2014-11-13 18:37:15 +0000
8e0b17fb49* configure.ac: Convert to new AC_INIT style. * configure: Regenerate.
Corinna Vinschen
2014-11-13 12:12:56 +0000
b7d6a7c805* msp430/Makefile.in (CRT_OBJS): Add crt_high_bss.o. * msp430/crt0.S (high_bss): Add. * msp430/msp430-sim.ld: Add error message if .upper sections are detected. * msp430/msp430xl-sim.ld (MEMORY): Adjust to better mimic real life MCUs. Add support for upper and lower sections.
Nick Clifton
2014-11-13 10:18:57 +0000
4acb3408e9* mkgroup.c (enum_unix_groups): Always print groupname with machine prefix. (usage): Extend help output for -l option. (main): Drop superfluous goto and label. Make machine prefixing for local machine when using -l option dependend on options in /etc/nsswitch.conf. * mkpasswd.c: Ditto.
Corinna Vinschen
2014-11-12 14:13:56 +0000
54f79f8650* cygheap.h (cygheap_pwdgrp): Remove constants NSS_FILES and NSS_DB. Use NSS_SRC_FILES and NSS_SRC_DB throughout instead. (cygheap_pwdgrp::nss_pwd_src): New inline method. (cygheap_pwdgrp::nss_grp_src): Ditto. * external.cc (cygwin_internal): Add CW_GETNSS_PWD_SRC and CW_GETNSS_GRP_SRC cases. * uinfo.cc: Use NSS_SRC_FILES and NSS_SRC_DB throughout. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GETNSS_PWD_SRC and CW_GETNSS_GRP_SRC. (NSS_SRC_FILES): Define. (NSS_SRC_DB): Define.
Corinna Vinschen
2014-11-12 11:19:08 +0000
3dce84ad07* libc/stdlib/strtod.c (sulp): Cast to int32_t to avoid overflow. * libc/time/gmtime_r.c (DAYS_PER_*_YEARS): Convert to long constants to avoid overflow.
Corinna Vinschen
2014-11-12 09:10:22 +0000
3daf2dc4f1* dcrt0.cc (cygwin__cxa_atexit): Fetch correct DSO handle value by searching dll list. Explain why.
Corinna Vinschen
2014-11-07 08:33:22 +0000
85907fe0822014-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
Jeff Johnston
2014-11-06 17:45:14 +0000
0f3cacfaa5* cygserver-config: Add -N option to allow different service name.
Corinna Vinschen
2014-11-06 16:36:42 +0000
dfc361dad4* dcrt0.cc (cygwin_atexit): Change preceeding comment to reflect API version numbers. * external.cc (cygwin_internal): disable setting cxx_malloc on 64 bit. Add CW_FIXED_ATEXIT case. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_FIXED_ATEXIT. * lib/atexit.c (atexit): Test running Cygwin version by checking return value of cygwin_internal (CW_FIXED_ATEXIT).
Corinna Vinschen
2014-11-06 15:32:21 +0000
97e2f27aa1* libc/stdio/nano-vfprintf_i.c (_printf_i): Use Newlib approach to handle string that might be not nul-terminated. * testsuite/newlib.stdio/nulprintf.c: New test.
Corinna Vinschen
2014-11-06 11:08:14 +0000
3a4fcef804merge from gcc
DJ Delorie
2014-11-05 18:23:19 +0000
e5e6b6c49f* lib/atexit.c (atexit): Check for being linked into the executable. If so, call __cxa_atexit with NULL DSO handle. Explain why. * lib/dso_handle.c: New file providing fallback __dso_handle.
Corinna Vinschen
2014-11-05 16:26:18 +0000
4d67bb4936* Makefile.in (NEW_FUNCTIONS): Add atexit to be not exported. * lib/atexit.c (atexit): New, statically linkable version of atexit. * dcrt0.cc (cygwin_atexit): Add comment to mark this function as old entry point. Indiscriminately check for DSO of function pointer for all functions, if checking for DSO of return address fails on x86_64. Change comment accordingly.
Corinna Vinschen
2014-11-05 09:48:00 +0000
a2ba36a67d* Makefile.in (NEW_FUNCTIONS): Define target-independent. Add target dependent stuff afterwards. Globally define timezone and all xdr symbols as non-exported from libcygwin.a.
Corinna Vinschen
2014-11-05 09:28:01 +0000
1a6fa5618a* ntsec.xml (ntsec-mapping-caching): Describe service dependencies in terms of cygserver.
Corinna Vinschen
2014-10-29 10:09:41 +0000
6bb19351d9* common.din (__cxa_atexit): Define as cygwin__cxa_atexit. * dcrt0.cc (cygwin__cxa_atexit): New function. Explain what we do.
Corinna Vinschen
2014-10-29 09:56:18 +0000
6eca6c43bemerge from gcc
DJ Delorie
2014-10-28 23:25:21 +0000
9b41c90ead* xidepend: Make PDF file dependent on the same input files as the HTML file of the same name to trigger automatic rebuild of PDFs on source file changes as well.
Corinna Vinschen
2014-10-28 11:01:32 +0000
e6a4318d78* globals.cc (dos_file_warning): Set to false by default. * path.cc (warn_msdos): Make static. Drop test for dos_file_warning. (path_conv::check): Check for dos_file_warning here to avoid a function call in the default case.
Corinna Vinschen
2014-10-28 10:44:49 +0000
3c8e918c38* ntsec.xml: Try to make an expression less ambiguous.
Corinna Vinschen
2014-10-28 09:03:50 +0000
158f8b34a1merge from gcc
DJ Delorie
2014-10-28 00:02:00 +0000
b7749822ed* dcrt0.cc (cygwin_atexit): Add workaround for broken atexit calls in __gcc_register_frame of DLLs built with gcc-4.8.3-3.
Corinna Vinschen
2014-10-27 21:19:40 +0000
f7cb52eec7* cygheap.cc (cygheap_fixup_in_child): Drop call to set_dll_dir. (init_cygheap::init_installation_root): Set installation_dir_len. (setup_cygheap): Drop call to set_dll_dir. * cygheap.h (struct init_cygheap): Add installation_dir_len member. (init_cygheap::set_dll_dir): Remove. * environ.cc (win_env::add_cache): Use stpcpy for speed. (posify_maybe): Use tmp_pathbuf buffer instead of stack. (raise_envblock): New function to resize Windows environment block. (build_env): Fix indentation. Call raise_envblock function. Check if $PATH exists and is non-empty. If not, add PATH variable with Cygwin installation directory as content to Windows environment. Explain why.
Corinna Vinschen
2014-10-27 11:33:53 +0000
fc58f46dd6* setfacl.c (action_t): Add DeleteAll value. (delacl): New function to remove all ACL entries not representing POSIX permissions. (setfacl): Rearrange conditional expression into switch statement. Add DeleteAll case. (usage): Add and describe -b option. (longopts): Add --remove-all option. (opts): Add -b option. (main): Handle -b option.
Corinna Vinschen
2014-10-27 10:25:02 +0000
b701da7f14* fhandler_socket.cc (fhandler_socket::af_local_connect): Drop setting connect_state to connect_credxchg. (fhandler_socket::af_local_accept): Ditto. (fhandler_socket::recv_internal): Drop ill-advised connect_state check. Add comment so as not to repeat the exercise. * fhandler.h (enum conn_state): Drop now unneeded connect_credxchg state.
Corinna Vinschen
2014-10-26 18:47:24 +0000
de7358ca6b* gendef (sigdelayed): 64 bit only: Fix seh_pushreg statements in prologue.
Corinna Vinschen
2014-10-24 15:04:10 +0000
d3779269ca* gendef (sigdelayed): 64 bit only: Push CPU flags before aligning stack to avoid changing flag values.
Corinna Vinschen
2014-10-24 13:40:02 +0000
63a2c2c204* ntsec.xml: More language and typo fixes.
Corinna Vinschen
2014-10-24 10:35:31 +0000