summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/uname.cc
Commit message (Collapse)AuthorAgeFilesLines
* Report as CYGNAL in uname syscall.Kaz Kylheku2016-07-011-1/+1
| | | | | | | | This allows applications to distinguish whether they are running on the stock Cygwin or Cygnal. * winsup/cygwin/uname.cc (uname): sysname is now filled in with CYGNAL_ prefix rather than CYGWIN_.
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-3/+0
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Move fd_stuff from sys/types.h to sys/select.hCorinna Vinschen2015-12-071-0/+2
| | | | | | | | | | | | | | | | | | * 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: Corinna Vinschen <corinna@vinschen.de>
* * uname.cc (uname): Shorten "WOW64" to "WOW" to account for the newCorinna Vinschen2015-01-241-2/+2
| | | | Windows 10 OS version "10.0" starting with preview build 9926.
* * Throughout, use __try/__except/__endtry blocks, rather than myfaultCorinna Vinschen2014-08-221-61/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handler. * cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs has been moved from _local_storage to _cygtls. * cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage of counters. Change type of counters to uint32_t for clarity. Remove _cygtls as friend class. (struct _local_storage): Move pathbufs from here... (struct _cygtls): ...to here, allowing to access it from _sigbe. (class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt members. (san::setup): Drop parameter. Don't initialize removed members. (san::leave): Don't set removed members. (class myfault): Only define on 32 bit. (myfault::faulted): Only keep implementation not taking any parameter. Drop argument in call to sebastian.setup. (__try/__leave/__except/__endtry): Implement to support real SEH. For now stick to SJLJ on 32 bit. * dcrt0.cc (dll_crt0_0): Drop 64 bit call to exception::install_myfault_handler. * exception.h (exception_handler): Define with EXCEPTION_DISPOSITION as return type. (PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer to _DISPATCHER_CONTEXT on 64 bit. (class exception): Define separately for 32 and 64 bit. (exception::myfault): Add handler for myfault SEH handling on 64 bit. (exception::exception): Fix mangled method name to account for change in type of last parameter. (exception::install_myfault_handler): Remove. * exceptions.cc (exception::myfault_handle): Remove. (exception::myfault): New SEH handler for 64 bit. * gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when returning to the caller. * ntdll.h: Move a comment to a better place. (struct _SCOPE_TABLE): Define on 64 bit. * thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround. * tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs. (tls_pathbuf::destroy): Change type of loop variables to uint32_t. * tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to uint32_t. Accommodate new place of pathbufs. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Regenerate.
* * uname.cc (uname): Drop unused code.Corinna Vinschen2013-07-111-14/+5
|
* Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor2013-01-211-2/+2
| | | | checkins. Regularize copyright format.
* Remove unneeded header files from source files throughout.Christopher Faylor2008-04-071-1/+0
|
* * exceptions.cc (dummy_ctrl_c_handler): Remove.Corinna Vinschen2007-02-231-17/+7
| | | | | | | | | | | | | | | | (init_console_handler): Drop has_null_console_handler_routine checks. * fhandler_raw.cc (fhandler_dev_raw::open): Drop has_raw_devices check. * fhandler_serial.cc (fhandler_serial::open): Drop .supports_reading_modem_output_lines check. * miscfuncs.cc (low_priority_sleep): Drop has_switch_to_thread check. * shared.cc (open_shared): Drop needs_memory_protection checks. * spawn.cc (spawn_guts): Drop start_proc_suspended check. * uname.cc (uname): Drop has_valid_processorlevel check. * wincap.cc: Remove has_raw_devices, has_valid_processorlevel, supports_reading_modem_output_lines, needs_memory_protection, has_switch_to_thread, start_proc_suspended and has_null_console_handler_routine throughout. * wincap.h: Ditto.
* * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysnameCorinna Vinschen2006-01-131-2/+7
| | | | member to see when running under WOW64.
* * uname.cc (uname): Disable use of GetNativeSystemInfo.Corinna Vinschen2005-10-031-0/+6
|
* Replace valid memory checks with new myfault class "exception handling", almostChristopher Faylor2005-07-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | everywhere. Leave some thread.cc stuff alone for now. * cygtls.h: Kludge some definitions to avoid including a problematic windows header. (_cygtls::_myfault): New entry. (_cygtls::_myfault_errno): Ditto. (_cygtls::fault_guarded): New function. (_cygtls::setup_fault): Ditto. (_cygtls::return_from_fault): Ditto. (_cygtls::clear_fault): Ditto. (myfault): New class. * exceptions.cc (handle_exceptions): Handle case of guarded fault in system routine. * gendef: Add another entry point for setjmp that the compiler doesn't know about and won't complain about. * gentls_offsets: Just include windows.h rather than kludging a HANDLE def. * miscfuncs.cc (check_null_str): Delete. (check_null_empty_str): Ditto. (check_null_empty_str_errno): Ditto. (check_null_str_errno): Ditto. (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr): Ditto. (__check_invalid_read_ptr_errno): Ditto. (dummytest): New function. (check_iovec_for_read): Delete. (chec_iovec): Rename from check_iovec_for_write. Take a read/write parameter. * tlsoffsets.h: Regenerate. * winsup.h: Remove check_* declarations. (check_iovec_for_read): Delete declaration. Turn into a define instead. (check_iovec_for_write): Ditto. (check_iovec): New declaration. * thread.h: Use ifdef guard name consistent with other header files.
* * uname.cc (uname): Change "amd64" to "x86_64" as on Linux.Corinna Vinschen2005-06-061-1/+1
|
* * uname.cc (uname): Add missing break.Corinna Vinschen2005-06-061-0/+1
|
* * exceptions.cc: (ctrl_c_handler): Do nothing while a Cygwin subprocess isChristopher Faylor2004-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | starting. * child_info.h (init_child_info): Remove pid argument from declaration. * cygheap.h (init_cygheap::pid): New element. * dcrt0.cc (dll_crt0_0): Eliminate handling of now-noexistent cygpid parameter in child_info struct. Set forkee to 'true' rather than cygpid since the pid value was never used. (dll_crt0_1): Ditto. (_dll_crt0): Ditto. * fork.cc (fork_child): Don't wait for sigthread. This is handled in the fork call now. (fork_parent): Remove obsolete pid argument from init_child_info call. Don't do anything special with cygpid when DEBUGGING. (fork): Delay all signals during fork. (fork_init): Don't do anything special when DEBUGGING. * pinfo.cc (set_myself): Remove pid parameter. Use new pid field in cygheap. (pinfo_init): Don't pass pid argument to set_myself. * sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as sendsig. (init_child_info): Eliminate handling of pid. (wait_sig): Implement method to temporarily hold off sending signals. * sigproc.h (__SIGHOLD): New enum. (__SIGNOHOLD): Ditto. * spawn.cc (spawn_guts): Remove obsolete pid argument from init_child_info call.
* * autoload.cc (GetNativeSystemInfo): Add.Corinna Vinschen2004-07-241-1/+13
| | | | | | | | | (IsWow64Process): Add. * init.cc (respawn_wow64_process): New function. (dll_entry): If process has been started from a 64 bit process, call respawn_wow64_process. * uname.cc (uname): On 64 bit systems, use GetNativeSystemInfo. Show actual CPU type.
* * autoload.cc: Fix copyright date.Corinna Vinschen2003-01-151-1/+1
| | | | | | | | | | | * fhandler_dsp.cc: Ditto. * mmap.cc: Ditto. * net.cc: Ditto. * ntdll.h: Ditto. * signal.cc: Ditto. * syscalls.cc: Ditto. * uname.cc: Ditto. * wait.cc: Ditto.
* * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.Corinna Vinschen2003-01-121-3/+1
|
* * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote shares.Christopher Faylor2002-06-051-1/+1
| | | | | | * path.cc (mount_info::conv_to_win32_path): Set flags to binary when mount entry is not found. (mount_info::set_flags_from_win32_path): Ditto.
* * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.Christopher Faylor2002-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return value for nonexistent function. (NtQueryObject): Declare. (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if not available. * debug.h (being_debugged): Just rely on IsDebuggerPresent return value. * dtable.cc (handle_to_fn): New function. (dtable::init_std_file_from_handle): Attempt to derive std handle's name via handle_to_fn. (dtable::build_fhandler_from_name): Fill in what we can in path_conv structure when given a handle and path doesn't exist. * fhandler.cc (fhandler_base::open): Don't set the file pointer here. Use pc->exists () to determine if file exists rather than calling GetFileAttributes again. * fhandler.h (fhandler_base::exec_state_isknown): New method. (fhandler_base::fstat_helper): Add extra arguments to declaration. (fhandler_base::fstat_by_handle): Declare new method. (fhandler_base::fstat_by_name): Declare new method. * fhandler_disk_file (num_entries): Make __stdcall. (fhandler_base::fstat_by_handle): Define new method. (fhandler_base::fstat_by_name): Define new method. (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate. (fhandler_disk_file::fstat_helper): Accept extra arguments for filling out stat structure. Move handle or name specific stuff to new methods above. (fhandler_disk_file::open): Use real_path->exists rather than calling GetFileAttributes again. * ntdll.h (FILE_NAME_INFORMATION): Define new structure. (OBJECT_INFORMATION_CLASS): Partially define new enum. (OBJECT_NAME_INFORMATION): Define new structure. (NtQueryInformationFile): New declaration. (NtQueryObject): New declaration. * path.cc (path_conv::fillin): Define new method. * path.h (path_conv::fillin): Declare new method. (path_conv::drive_thpe): Rename from 'get_drive_type'. (path_conv::volser): Declare new method. (path_conv::volname): Declare new method. (path_conv::root_dir): Declare new method. * syscalls.cc (fstat64): Send real path_conv to fstat as second argument.
* Eliminate excess whitespace.Christopher Faylor2001-11-051-1/+1
|
* * uname.cc (uname): Use `wProcessorLevel' unless OS sets it wrong.Corinna Vinschen2001-10-151-6/+16
| | | | | | Use `dwProcessorType' then instead. * wincap.cc: Set flag has_valid_processorlevel appropriately. * wincap.h: Add flag has_valid_processorlevel.
* * path.cc (symlink): Check arguments for validity.Egor Duda2001-09-161-0/+4
| | | | | | | (getcwd): Ditto. * syscalls.cc (ftruncate): Ditto. * times.cc (times): Ditto. * uname.cc (uname): Ditto.
* * Makefile.in: Build wincap.o.Corinna Vinschen2001-09-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * wincap.cc: New file. * wincap.h: Ditto. * autoload.cc: Add dynamic load statement for `CreateHardLinkA'. * dcrt0.cc (os_being_run): Eliminated. (osname): Ditto. (iswinnt): Ditto. (set_os_type): Ditto. (dll_crt0_1): Call wincap.init() instead of set_os_type(). (_dll_crt0): Ditto. * environ.cc (set_chunksize): New function. (parse_thing): `forkchunk' setting now invokes function `set_chunksize'. * fork.cc (chunksize): Eliminated. Moved to be member of wincap. * host_dependent.h: Removed. * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available. * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc, environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc, fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h, security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc, times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap capability check throughout. * winsup.h: Include wincap.h. Eliminate extern declarations of `os_being_run' and `iswinnt'. Eliminate `os_type" definition. * include/cygwin/version.h: Bump version to 1.3.4.
* Update copyrights.Christopher Faylor2001-09-111-1/+1
|
* * cygheap.h (init_cygheap): Move heap pointers here.Christopher Faylor2001-09-071-1/+1
| | | | | | | | | | | | | | | | | | | * include/sys/cygwin.h (perprocess): Remove heap pointers. * dcrt0.cc (__cygwin_user_data): Reflect obsolete perprocess stuff. (_dll_crt0): Don't initialize heap pointers. (cygwin_dll_init): Ditto. (release_upto): Use heap pointers from cygheap. * heap.h: Ditto. * fork.cc (fork_parent): Ditto. Don't set heap pointers in ch. (fork_child): Remove obsolete sigproc_fixup_after_fork. * shared.cc (memory_init): Reorganize so that cygheap initialization is called prior to regular heap since regular heap uses cygheap now. * sigproc.cc (proc_subproc): Eliminate zombies allocation. (sigproc_init): Move zombies alloation here. Don't free up array on fork, just reuse it. (sigproc_fixup_after_fork): Eliminate. * sigproc.h: Ditto. * include/cygwin/version.h: Reflect change to perprocess structure.
* * uname.cc (uname): Eliminate os specific retrieving of x86Corinna Vinschen2001-09-041-25/+9
| | | | processor type.
* * uname.c (uname): Default n in in86 to 6 if Windows returns > 6.Christopher Faylor2001-04-151-1/+3
|
* * winsup.h: Add `winME' to os_type symbols.Corinna Vinschen2000-09-301-0/+1
| | | | | | * dcrt0.cc (set_os_type): Identify Windows ME systems. * (host_dependent_constants::init): Care for winME. * uname.cc (uname): Ditto.
* Break out more header info into separate files. Use appropriate header filesChristopher Faylor2000-09-081-0/+1
| | | | | | | | | | | | throughout. * shared.h: Remove. * cygwin_version.h: New file. * delqueue.h: New file. * environ.h: New file. * host_dependent.h: New file. * perprocess.h: New file. * registry.h: New file. * security.h: New file.
* * winsup.h: take out protections of environ, errno, allow C useDJ Delorie2000-08-021-1/+1
| | | | | | | | | | * *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__); use cur_environ() instead of just environ * times.cc: remove import protections * glob.c: add winsup.h * localtime.c: ditto * smallprint.c: ditto * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
* * uname.cc (uname): Use a "s" to denote a snapshot to avoid confusion with theChristopher Faylor2000-05-231-1/+1
| | | | number "5".
* * mkvers.sh: Use snapshot date as build date since it is more interesting.Christopher Faylor2000-05-231-1/+5
| | | | | * uname.cc (uname): Detect if this is a snapshot build and add an "S" to the version number. Report the snapshot date as the release date.
* Fix sysname.Christopher Faylor2000-02-281-1/+1
|
* * dcrt0.cc (set_os_type): Record OS name string.Christopher Faylor2000-02-281-27/+3
| | | | | | | | | | | | | | | | | | (getprogname): Eliminate obsolete function. (dll_crt0_1): Move initial strace initialization output to set_myself. * exceptions.cc (interruptible): Add debugging output. (interrupt_setup): New function. (interrupt_now): Use interrupt_setup to set up common interrupt handler stuff. (interrupt_on_return): Ditto. (call_handler): Move signal_arrived arm and clear threads to region where signalled thread is suspended or suffer races. * pinfo.cc (set_myself): Output interesting information when strace is first initialized. Initialize progname here. * sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal are sent synchronously. * strace.cc (strace_vsprintf): Move code into strace program. * uname.cc (uname): Use 'osname' global to construct cygwin name + Windows type + version.
* import winsup-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+110