Commit Graph

6416 Commits

Author SHA1 Message Date
Corinna Vinschen 26631d2144 * include/stdint.h (WINT_MIN, WINT_MAX): Fix definition. 2007-04-04 07:37:53 +00:00
Chris Sutcliffe 27f9e91155 2007-03-30 Brian Dessent <brian@dessent.net>
* lib/kernel32.def (CreateMemoryResourceNotification@4): Define.
2007-04-01 12:44:04 +00:00
Christopher Faylor c99e136f3d * utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned by
FindFirstFile.
2007-03-31 00:03:25 +00:00
Christopher Faylor e7fd6e5738 * cygwin/external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.
* cygwin/include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING.
* utils/mount.cc (main): Turn dos file warnings off since we know what we're
doing.
2007-03-30 13:36:06 +00:00
Corinna Vinschen e6fbf13e48 * cygheap.cc (cygheap_init): Fix formatting. Remove comment. Set
shared_prefix depending only on terminal service capability.
	* dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges here.
	* fhandler_fifo.cc (fhandler_fifo::open): Create the mutex as global
	object.
	* posix_ipc.cc (ipc_mutex_init): Use cygheap->shared_prefix.
	(ipc_cond_init): Ditto.
	* sec_helper.cc (privilege_name): Make static.  Use LookupPrivilegeName
	directly to be independent of the state of cygheap.
	(set_privilege): Take a LUID as parameter instead of an index value.
	Only print debug output in case of failure.
	(set_cygwin_privileges): Add comment.  Use LookupPrivilegeValue to
	get privilege LUIDs.
	(init_global_security): Call set_cygwin_privileges here.
	* security.h (privilege_name): Drop declaration.
	(set_privilege): Declare according to above change.
	(set_process_privilege): Call privilege_luid to get LUID.
	(_push_thread_privilege): Ditto.
	* shared.cc (open_shared): Add comment.  On systems supporting the
	SeCreateGlobalPrivilege, try to create/open global shared memory first.
	Fall back to local shared memory if that fails.
	* thread.cc (semaphore::semaphore): Use cygheap->shared_prefix.
	* wincap.h (wincapc::has_create_global_privilege): New element.
	* wincap.cc: Implement above element throughout.
2007-03-29 16:37:36 +00:00
Christopher Faylor 2319775273 * spawn.cc (spawn_guts): Start pure-windows processes in a suspended state to
avoid potential DuplicateHandle problems.
2007-03-28 14:34:24 +00:00
Chris Sutcliffe a37bc48dca 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Include/_mingw.h: Increment version to 3.12.
2007-03-26 02:11:07 +00:00
Chris Sutcliffe b86d10017a 2007-03-25 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.9.
        * Makefile.in: Ditto.
2007-03-26 01:35:24 +00:00
Corinna Vinschen e5e4cdeda7 * include/psapi.h (GetMappedFileName): Fix messed up checkin. 2007-03-23 12:42:50 +00:00
Corinna Vinschen 57ba95d8cf * include/psapi.h (GetMappedFileName): Rename from GetMappedFilenameEx. 2007-03-23 09:17:26 +00:00
Danny Smith 3246efd513 2007-03-22 Brian Ripley <ripleybd@users.sourceforge.net>
* include/_mingw.h (__CRT_INLINE): Make conditional on __GNUC_STDC_INLINE__
2007-03-22 09:43:48 +00:00
Chris Sutcliffe f7ddb59088 2003-03-20 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Tweak srcdist to fix build issue.
2007-03-21 00:24:25 +00:00
Keith Marshall a88c650cd4 Add --enable-mingw-manpage-transform configure option. 2007-03-20 23:19:34 +00:00
Danny Smith a4ad579228 * include/_mingw.h (__CRT_INLINE): Ue __gnu_inline__ for gcc 4.2.x too. 2007-03-18 00:23:44 +00:00
Corinna Vinschen bfb968cefd Fix typo. 2007-03-13 13:39:27 +00:00
Corinna Vinschen 15823b9d62 * include/cygwin/stat.h (S_TYPEISSHM, S_TYPEISSEM, S_TYPEISSHM):
Avoid compiler warnings.
2007-03-13 13:22:00 +00:00
Keith Marshall 31e07d86d2 Add manpages for dirname and basename functions. 2007-03-11 00:15:00 +00:00
Keith Marshall af8e63023a Make basename and dirname functions work with path names
containing multibyte character strings.
2007-03-08 23:15:58 +00:00
Chris Sutcliffe 8ca56e23af 2007-03-06 Brandon Sneed <brandon@oqo.com>
* include/setupapi.h: Added SetupConfigureWmiFromInfSectionA
        Added SetupConfigureWmiFromInfSectionW
        Added SetupConfigureWmiFromInfSection define to unicode and non-unicode sections

        * lib/setupapi.def: Added exports for SetupConfigureWmiFromInfSectionA and W

        * include/winuser.h: Added PBT_APMQUERYSUSPEND
        Added PBT_APMQUERYSTANDBY
        Added PBT_APMQUERYSUSPENDFAILED
        Added PBT_APMQUERYSTANDBYFAILED
        Added PBT_APMSUSPEND
        Added PBT_APMSTANDBY
        Added PBT_APMRESUMECRITICAL
        Added PBT_APMRESUMESUSPEND
        Added PBT_APMRESUMESTANDBY
        Added PBT_APMBATTERYLOW
        Added PBT_APMPOWERSTATUSCHANGE
        Added PBT_APMOEMEVENT
        Added PBT_APMRESUMEAUTOMATIC

        * include/wtsapi32.h: New file

        * include/wingdi.h: Added DM_DISPLAYORIENTATION define for use with DMDO_* defines
2007-03-07 23:18:35 +00:00
Christopher Faylor b8804b1ecd * signal.cc (handle_sigprocmask): Remove extraneous sig_dispatch_pending. 2007-03-07 21:51:27 +00:00
Corinna Vinschen fcdca88165 * fhandler_proc.cc: Fix formatting. Drop setting errno when creating
proc file content.
	(format_proc_uptime): Simplify.
	(format_proc_cpuinfo): Align more closely to output of Linux 2.6 kernel.
	Evaluate more data, especially for AMD CPUs.
2007-03-07 14:03:29 +00:00
Corinna Vinschen 2213ad419b Fix log entry. 2007-03-06 16:35:45 +00:00
Corinna Vinschen 7113f5da75 Add accidentally missing checkins.
* fhandler.h (fhandler_base::fstat_helper): Add creation time parameter.
	* glob.cc (stat32_to_stat64): Set st_birthtim to st_mtim.
2007-03-06 16:29:40 +00:00
Corinna Vinschen 74652ce13e * include/cygwin/stat.h (S_TYPEISMQ): Define.
(S_TYPEISSEM): Dttio.
	(S_TYPEISSHM): Ditto.
2007-03-06 14:56:44 +00:00
Corinna Vinschen 70de8290c8 * fhandler_mailslot.cc (fhandler_mailslot::fstat): Set new stat member
st_birthtim to useful value.
	* fhandler_process.cc (fhandler_process::fstat): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take
	additional parameter for creation time.  Fill st_birthtim with it.
	Accomodate additional creation time parameter throughout.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member
	st_birthtim to useful value.
	* fhandler.cc (fhandler_base::fstat): Ditto.
	* fhandler_registry.cc (fhandler_registry::fstat): Ditto.
	* include/cygwin/version.h: Bump API minor number.
	* include/cygwin/stat.h (struct __stat64): Replace st_spare4 with
	timestruc_t st_birthtim.
	(struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined.
	(st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.
2007-03-06 14:48:25 +00:00
Chris Sutcliffe aefbb81cc4 2007-03-05 Jan Nijtmans <nijtmans@users.sourceforge.net>
* include/ddeml.h (DdeCreateStringHandleA, DdeCreateStringHandleW): Switch
        argument to constant.
2007-03-06 01:53:36 +00:00
Danny Smith 3315e811a4 * include/io.h (__mingw_access): New static inline wrapper to restore
pre-Vista 'access (fname, X_OK)'  behaviour.
	(__USE_MINGW_ACCESS): Use to map access() to __mingw_access().
2007-03-05 08:25:32 +00:00
Danny Smith 5643b1ee86 * mingwex/fesetround.c (fesetround): Use unsigned int as operand
to  stmxcsr.
	Thanks to Alexey Kuznetsov <ring0_mipt at users dot sf dot net>
2007-03-05 07:42:36 +00:00
Corinna Vinschen 788e7da136 * ntdll.h (struct _OBJECT_NAME_INFORMATION): Define.
* syscalls.cc (unlink_nt): Check shared directory for being empty
	before trying to move and mark for deletion.
2007-03-02 20:04:26 +00:00
Corinna Vinschen 3532877889 * security.cc (get_file_attribute): Avoid compiler warning. 2007-03-02 19:54:20 +00:00
Christopher Faylor e943a1a37e * fork.cc (fork): Reset child to true after fork since it may have been reset
by fork memory copies.
2007-03-01 18:43:38 +00:00
Christopher Faylor 6e070c257c * Makefile (DLL_OFILES): Remove ntea.o
* environ.cc (set_ntea): Delete.
(parse_thing): Delete "ntea" setting.
* fhandler.cc (fhandler_base::open): Remove allow_ntea considerations.
(check_posix_perm): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Ditto.
(fhandler_base::open_fs): Ditto.
(fhandler_disk_file::mkdir): Ditto.
* path.cc (symlink_worker): Ditto.
* security.cc (get_file_attribute): Ditto.
(set_file_attribute): Ditto.
* security.h: Remove allow_ntea declaration.
2007-03-01 15:13:47 +00:00
Corinna Vinschen 40303ac9de * path.cc (close_user_proc_parms_cwd_handle): Remove.
(cwdstuff::init): Don't call close_user_proc_parms_cwd_handle.
	Call set to set cwd with all-sharing handle.
	(cwdstuff::set): Fix comment.  Don't close cwd handle.  Set in
	user parameter block instead and close old cwd handle.
	* syscalls.cc (rename): Call unlink_nt instead of RemoveDirectory or
	DeleteFile to allow deleting shared files/directories.
2007-02-27 18:38:22 +00:00
Corinna Vinschen 3323df7e0e * fhandler.cc(fhandler_base::open): Open with READ_CONTROL only in
case of query_open flag set to query_read_control.  Add case for
	new query_read_attributes flag.
	(fhandler_base::fstatvfs): New method.
	* fhandler.h (enum query_state): Add query_read_attributes flag.
	(class fhandler_base): Declare new virtual fstatvfs method.
	(class fhandler_socket): Ditto.
	(class fhandler_pipe): Ditto.
	(class fhandler_fifo): Ditto.
	(class fhandler_disk_file): Ditto.
	(class fhandler_virtual): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_fs): Open with
	query_read_attributes instead of query_read_control.
	(fhandler_disk_file::fstatvfs): New method.
	(fhandler_disk_file::facl): Open with query_read_attributes instead of
	query_read_control.
	* fhandler_fifo.cc (fhandler_fifo::fstatvfs): New method.
	* fhandler_socket.cc (fhandler_socket::fstatvfs): New method.
	(fhandler_socket::fchmod): Return with EBADF in the default case.
	(fhandler_socket::fchown): Ditto.
	(fhandler_socket::facl): Ditto.
	* fhandler_virtual.cc (fhandler_virtual::fstatvfs): Ditto.
	* ntdll.h (struct _FILE_FS_ATTRIBUTE_INFORMATION): Define.
	(struct _FILE_FS_FULL_SIZE_INFORMATION): Define.
	* pipe.cc (fhandler_pipe::fstatvfs): New method.
	* syscalls.cc (fstatvfs): Just call the fhandler's fstatvfs.
	(statvfs): Ditto.
	(fstatfs): Call fstatvfs.
	(statfs): Drop EFAULT handling.
2007-02-27 12:58:56 +00:00
Danny Smith cbf4bfcd5b 2007-02-27 Thorsten Dahlheimer <tdahlheim@gmx.net>
* include/stdio.h (_unlink, unlink): Add prototypes.
2007-02-27 07:40:12 +00:00
Corinna Vinschen 139654836c * fhandler.cc (fhandler_base::fstat): Set all file times to arbitrary
fixed value.
2007-02-26 14:19:00 +00:00
Corinna Vinschen 14e06cca26 * fhandler_registry.cc (registry_listing): Drop name of HKEY_DYN_DATA.
(registry_keys): Drop HKEY_DYN_DATA.
	* net.cc: Fix comment.
	* syslog.cc: Ditto.
2007-02-26 12:39:25 +00:00
Corinna Vinschen 457c7938f0 * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop comment.
* mmap.cc (gen_access): Remove.
	(mmap_record::gen_access): Remove.
	(mmap64): Don't mention 9x any longer.
	* syscalls.cc (statvfs): Drop status code consideration for 9x.
	* libc/minires-os-if.c (get_registry_dns_items): Don't mention 9x any
	longer.
	(get_registry_dns): Drop getting registry key on 9x.  Drop is9x
	variable.
2007-02-26 12:22:41 +00:00
Corinna Vinschen a76877e977 Throughout remove all usage of wincap.has_security.
* environ.cc (environ_init): Drop setting allow_ntsec here.
	* grp.cc (initgroups32): Drop usage of label "out".
	* security.cc (allow_ntsec): Set to true by default.
	* syscalls.cc (seteuid32): Remove label success_9x.
	* wincap.cc: Remove has_security throughout.
	* wincap.h: Ditto.
2007-02-23 15:15:50 +00:00
Corinna Vinschen 9fa43ff6c6 * fhandler.h (class fhandler_pipe): Remove members writepipe_exists,
orig_pid and id.  Make hit_eof inline.
	* fhandler_fifo.cc (fhandler_fifo::open): Drop handling of
	writepipe_exists, orig_pid and id.
	* pipe.cc: Ditto throughout.
	(pipecount): Remove.
	(pipeid_fmt): Remove.
	(fhandler_pipe::hit_eof): Simplify.  Move to fhandler.h.
	(fhandler_pipe::dup): Drop leave label.
	(fhandler_pipe::create): Drop has_unreliable_pipes case.
	* wincap.cc: Remove has_unreliable_pipes throughout.
	* wincap.h: Ditto.
2007-02-23 14:47:45 +00:00
Corinna Vinschen 296a8a6369 * devices.in: Change native device name to native NT device name for
/dev/null, /dev/comX and /dev/ttySx.
	* devices.cc: Regenerate.
	* fhandler.cc (fhandler_base::open_9x): Remove.
	(fhandler_base::open): Don't test for DOS device name, don't call
	open_9x.
	(fhandler_dev_null::open): Remove.
	* fhandler.h (class fhandler_base): Drop open_9x declaration.
	(class fhandler_dev_null): Drop open declaration.
2007-02-23 14:20:28 +00:00
Corinna Vinschen b5cb5c9e64 * fhandler_console.cc (fhandler_console::need_invisible): Drop
pty_needs_alloc_console check.
	* spawn.cc (spawn_guts): Ditto.
	(av::fixup): Remove setting iscui.
	* syscalls.cc (rename): Drop has_move_file_ex checks.  Remove 9x
	specific code.
	* wincap.cc: Remove has_move_file_ex and pty_needs_alloc_console
	throughout.
	* wincap.h: Ditto.
2007-02-23 12:01:52 +00:00
Corinna Vinschen 7131554a69 Throughout remove using wincap.
* Makefile.in (OBJS): Remove wincap.o.
	* README: Don't mention 9x.
	* bsd_mutex.cc (_mtx_unlock): Drop checking for 9x error codes.
	* cygserver.cc (server_submission_loop::request_loop): Add FIXME
	comment.
	* wincap.cc: Remove.
	* wincap.h: Remove.
	* woutsup.h: Don't include wincap.h.
2007-02-23 11:43:48 +00:00
Corinna Vinschen aaee2ffaed * exceptions.cc (dummy_ctrl_c_handler): Remove.
(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.
2007-02-23 10:51:59 +00:00
Corinna Vinschen 0ed760d75e * fhandler.cc (fhandler_base::lseek): Drop 9x considerations.
* fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto.
	* wincap.cc: Remove lock_file_highword and has_64bit_file_access
	throughout.
	* wincap.h: Ditto.
2007-02-23 09:49:49 +00:00
Corinna Vinschen 8e17bd8685 * cygheap.h (struct cwdstuff): Remove sync member and keep_in_sync
accessors.
	* external.cc (cygwin_internal): Drop call to cygheap->cwd.keep_in_sync.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Always presume
	ability to create hard links.
	* path.cc (cwdstuff::init): Drop 9x considerations.
	(cwdstuff::keep_in_sync): Remove.
	(cwdstuff::set): Take NT for granted.
	* pinfo.h (cygwin_pid): Just return pid.
	* wincap.cc: Remove has_hard_links, can_open_directories,
	has_negative_pids, has_named_pipes, has_try_enter_critical_section,
	cant_debug_dll_entry and detect_win16_exe throughout.
	* wincap.h: Ditto.
2007-02-22 18:01:13 +00:00
Corinna Vinschen 3af640487f * fhandler_console.cc (fhandler_console::read): Drop 9x specific
handling of AltGr key.
	* mmap.cc: Take NT for granted throughout.
	* wincap.cc: Remove map_view_of_file_ex_sucks, altgr_is_ctrl_alt,
	has_working_copy_on_write, share_mmaps_only_by_name,
	virtual_protect_works_on_shared_pages, has_mmap_alignment_bug and
	has_working_virtual_lock throughout.
	* wincap.h: Ditto.
2007-02-22 17:35:14 +00:00
Corinna Vinschen eef57fe1e3 * fhandler.cc (fhandler_base::set_no_inheritance): Always use
SetHandleInformation.
	* fhandler_disk_file.cc (fhandler_disk_file::lock): Always use
	UnlockFileEx/LockFileEx functions.
	* net.cc (fdsock): Don't bother to duplicate socket for inheritance.
	* sysconf.cc (get_nproc_values): Take NT for granted.
	(get_avphys): Ditto.
	* syslog.cc (WIN95_EVENT_LOG_PATH): Remove define.
	(get_win95_event_log_path): Remove.
	(vsyslog): Fix formatting.  Take NT for granted.
	* wincap.cc: Remove has_lock_file_ex, has_signal_object_and_wait,
	has_eventlog, has_set_handle_information,
	has_set_handle_information_on_console_handles and supports_smp
	throughout.
	* wincap.h: Ditto.
2007-02-22 17:09:46 +00:00
Corinna Vinschen 64f211c87c Fix typo. 2007-02-22 16:33:44 +00:00
Corinna Vinschen 03d5ce6d08 * dir.cc (rmdir): Move existance check in front of
has_dot_last_component check.  Simply setting errno in latter case.
2007-02-22 16:32:39 +00:00