Skip to content
  1. Dec 14, 2015
  2. Dec 09, 2015
    • Corinna Vinschen's avatar
      Fetch and store FileAllInformation rather than FileNetworkOpenInformation · eed35efb
      Corinna Vinschen authored
      
      
              * path.h (class path_conv_handle): Use FILE_ALL_INFORMATION instead of
              FILE_NETWORK_OPEN_INFORMATION.  Use definitions from ntdll.h since it's
              included anyway.
              (path_conv_handle::fai): Change name from fnoi.
              (path_conv::fai): Ditto.
              (file_get_fai): Change name from file_get_fnoi.  Drop second parameter.
              * path.cc (file_get_fai): Ditto.  Fetch FileAllInformation rather than
              FileNetworkOpenInformation.  Convert STATUS_BUFFER_OVERFLOW to
              STATUS_SUCCESS.  Remove workaround to fetch FileBasicInformation and
              FileStandardInformation on filesystems with broken
              FileNetworkOpenInformation handling.
              (symlink_info::check): Accommodate above changes.  In case of using
              the NtQueryDirectoryFile fallback, fetch FileIdBothDirectoryInformation
              to get inode number as well.
              * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop outdated
              comment.  Accommodate change to using FileAllInformation.  Drop
              extra function calls to fetch NumberOfLinks and IndexNumber.  Set ino
              directly from IndexNumber stored in pc.fai().  Drop second argument
              from call to fstat_helper.
              (fhandler_base::fstat_by_name): Drop second argument from call to
              fstat_helper.
              (fhandler_base::fstat_helper): Drop second parameter.  Accommodate
              the fact that we access a FILE_ALL_INFORMATION structure now.
              (fhandler_base::open_fs): Set ino directly from IndexNumber stored in
              pc.fai().
              * fhandler.h (fhandler_base::fstat_helper): Fix declaration accrdingly.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      eed35efb
    • Corinna Vinschen's avatar
      Drop unused path_conv::ndisk_links method · a0e7563e
      Corinna Vinschen authored
      
      
              * fhandler_disk_file.cc (path_conv::ndisk_links): Drop unused method.
              (fhandler_base::fstat_helper): Drop unused call to ndisk_links.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      a0e7563e
    • Corinna Vinschen's avatar
      Use fii instead of fai for FILE_INTERNAL_INFORMATION vars · ab73edc0
      Corinna Vinschen authored
      
      
              * fhandler_disk_file.cc (path_conv::get_ino_by_handle): Rename fai to
              fii for clearness.
              (fhandler_disk_file::readdir): Ditto.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      ab73edc0
    • Corinna Vinschen's avatar
      In FILE_ID_BOTH_DIR_INFORMATION it's actually FileId, not IndexNumber · 3da81956
      Corinna Vinschen authored
      
      
              * ntdll.h (FILE_ID_BOTH_DIR_INFORMATION): Revert IndexNumber to FileId
              since it's actually right here.
              * fhandler_disk_file.cc: Accommodate above change.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      3da81956
    • Thomas Preud'homme's avatar
      Check for 64 FP instructions availability in libm before using them · 5b9873fa
      Thomas Preud'homme authored
      Currently, double precision math functions in newlib/libm/machine/arm detect whether neon instructions can be used for double precision computation by checking the architecture version (>= 8) and the availability of floating-point instructions. However, these instructions would not be available if targeting fpv5-sp-d16 as the FPU, which by definition does not have 64bit float instructions. This patch adds a check that __ARM_FP advertises 64bit float instructions.
      
              * libm/machine/arm/s_ceil.c: Also check that 64bit FP instructions are
              available in the guard.
              * libm/machine/arm/s_floor.c: Likewise.
              * libm/machine/arm/s_nearbyint.c: Likewise.
              * libm/machine/arm/s_rint.c: Likewise.
              * libm/machine/arm/s_round.c: Likewise.
              * libm/machine/arm/s_trunc.c: Likewise.
      5b9873fa
  3. Dec 08, 2015
  4. Dec 07, 2015
    • Corinna Vinschen's avatar
      Fix minor style issue in _dll_crt0. · 87db9e06
      Corinna Vinschen authored
      
      
      	Fix missing space.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      87db9e06
    • Johannes Schindelin's avatar
      Introduce the 'usertemp' filesystem type · fb71716d
      Johannes Schindelin authored
      
      
      	* 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: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      fb71716d
    • Nick Withers's avatar
      Add definitions for NBBY to arm and rtems targets · 5644f714
      Nick Withers authored
      
      
      	* libc/sys/arm/sys/param.h (NBBY): Define if not already defined.
      	* libc/sys/rtems/include/sys/param.h (NBBY): Define.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      5644f714
    • Corinna Vinschen's avatar
      Move fd_stuff from sys/types.h to sys/select.h · 08184b36
      Corinna Vinschen authored
      
      
      	* libc/include/sys/types.h: Move definitions of NBBY and howmany to
      	sys/param.h.  Move definitions of select(2) macros to sys/select.h.
      	* libc/include/sys/param.h: See above.
      	* libc/include/sys/select.h: Move Cygwin's sys/select.h here.
      
      	* include/sys/select.h: Move select(2) macros from newlib's sys/types.h
      	here.  Rename howmany to _howmany to unclutter namespace. Move file to
      	newlib.
      	* libc/rexex.cc: Add declaration for cygwin_gethostname.
      	* poll.cc: Include sys/param.h and locale select.h.
      	* select.h (cygwin_select): Declare.
      	* uname.cc: Declare cygwin_gethostname.
      	* winsup.h: Drop declarations of cygwin_select and cygwin_gethostname.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      08184b36
    • Corinna Vinschen's avatar
      Always allocate main thread stack from pthread stack area on x86_64. · e753e412
      Corinna Vinschen authored
              * dcrt0.cc: Semi-revert commit 12743c2d.
              (dll_crt0_0): Drop setting wow64_needs_stack_adjustment on 64 bit.
              (_dll_crt0): Split out 64 bit code again and always create new main
              thread stack, unless forked off from the non main thread in the parent.
              Call create_new_main_thread_stack with parent stack commitsize if
              started from the parent's main thread.
              Only call child_info_fork::alloc_stack for the latter case on 64 bit.
              Slightly rearrange moving rsp and rbp to new stack and document how.
              Revert 32 bit wow64 handling to its former self.
              * miscfunc.cc (create_new_main_thread_stack): Take a commitsize
              parameter and use it if it's not 0.  Don't set _main_tls here, it's
              done in the caller _dll_crt0 anyway.  Return stackbase - 16 bytes,
              rather than stacklimit (which was very wrong anyway).
              * miscfuncs.h (create_new_main_thread_stack): Accommodate declaration
              to aforementioned change.
              * wincap.h (wincaps::has_3264_stack_broken): Remove element.
              * wincap.cc: Ditto, throughout.
              * wow64.cc: Semi-revert to pre-12743c2d
              but keep architecture-agnostic type changes intact.  Fix formatting.
              * wow64.h: Revert to pre-12743c2d
      
      .
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      e753e412
  5. Dec 06, 2015
    • Corinna Vinschen's avatar
      Allow cygwin_conv_path(3) and cygpath(1) to emit /proc/cygdrive prefixed path · 5aa8817e
      Corinna Vinschen authored
      
      
              * 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: default avatarCorinna Vinschen <corinna@vinschen.de>
      5aa8817e
  6. Dec 04, 2015
  7. Dec 03, 2015
  8. Dec 02, 2015
  9. Nov 29, 2015
  10. Nov 28, 2015
  11. Nov 27, 2015
    • Corinna Vinschen's avatar
    • Corinna Vinschen's avatar
      Fix race condition when waiting for a signal · c43e9340
      Corinna Vinschen authored
      
      
              * cygtls.h (_cygtls::wait_signal_arrived): Renamed from
              set_signal_arrived.
              (_cygtls::set_signal_arrived): New function signalling signal_arrived.
              (_cygtls::reset_signal_arrived): Don't reset will_wait_for_signal.
              (_cygtls::unwait_signal_arrived): New function only resetting
              will_wait_for_signal.
              (class wait_signal_arrived): Rename from set_signal_arrived.
              Accommodate name change throughout Cygwin.
              (wait_signal_arrived::~wait_signal_arrived): Call
              _cygtls::unwait_signal_arrived.  Add comment.
              * cygserver_ipc.h (ipc_set_proc_info): Fetch signal_arrived handle
              via call to _cygtls::get_signal_arrived.
              * exceptions.cc (_cygtls::interrupt_setup): Signal signal_arrived via
              call to _cygtls::set_signal_arrived.
              (_cygtls::handle_SIGCONT): Ditto.
              * fhandler_socket.cc (fhandler_socket::wait_for_events): Generate
              WSAEVENT array prior to entering wait loop.  Add cancel event object
              if available.  Remove calls to pthread_testcancel and just call
              pthread::static_cancel_self if the cancel event object is signalled.
      
      Signed-off-by: default avatarCorinna Vinschen <corinna@vinschen.de>
      c43e9340
  12. Nov 26, 2015