Commit Graph

6201 Commits

Author SHA1 Message Date
Corinna Vinschen 330a2faed9 * fhandler.h (fhandler_base): Change fstat_helper prototype
to take file size and inode number as 64 bit values.
	* fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc
	(FS_IS_SAMBA_WITH_QUOTA): Ditto.
	(path_conv::hasgood_inode): Delete.
	(path_conv::is_samba): Delete.
	(path_conv::isgood_inode): Centralized function to recognize
	a good inode number.
	(fhandler_base::fstat_by_handle): Constify fvi_size and fai_size.
	Accomodate argument change in fstat_helper.
	(fhandler_base::fstat_by_name): Ditto.
	(fhandler_base::fstat_helper): Accomodate argument change.  Call
	path_conv::isgood_inode to recognize good inodes.
	(fhandler_disk_file::opendir): Explain Samba weirdness here.
	Call path_conv::fs_is_samba instead of path_conv::is_samba.
	(fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS
	as valid return code from NtQueryDirectoryFile to indicate that
	FileIdBothDirectoryInformation is not supported.
	Call path_conv::isgood_inode to recognize good inodes.
	* ntdll.h (STATUS_INVALID_INFO_CLASS): Define.
	* path.cc (fs_info::update): Rework file system recognition
	and set appropriate flags.
	* path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags.
	Constify pure read accessors.
2006-04-26 16:51:09 +00:00
Christopher Faylor a2649dc651 * environ.cc (getearly): Force correct dereference order when inspecting
environ table.
2006-04-24 16:42:07 +00:00
Corinna Vinschen b4c53a7c00 * select.cc (thread_pipe): Raise sleep time only every 8th iteration.
(thread_mailslot): Ditto.
2006-04-24 15:16:45 +00:00
Dimitri Papadopoulos 27154d380a * include/ws2tcpip.h (gai_strerror): Remove thread-safety comment.
This function cannot be made thread-safe, the API would have to be
	changed for that, just like strerror() -> strerror_r() and similar
	ISO C or POSIX functions...
2006-04-24 11:53:16 +00:00
Corinna Vinschen cfa882572a * select.cc (thread_pipe): Raise sleep time dynamically to speed up
select on pipes when copying lots of data.
	(thread_mailslot): Ditto for mailslots.
2006-04-23 08:39:07 +00:00
Christopher Faylor 3153a0ecae * signal.cc (abort): On second thought, just set incyg once. 2006-04-22 23:13:18 +00:00
Christopher Faylor bdcec0d979 * abort.cc (abort): Set incyg manually to help get a reliable gdb stack trace.
* cygwin.din (abort): Make NOSIGFE.
2006-04-22 23:09:44 +00:00
Christopher Faylor 3a83d3a849 * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead of
GetEnvironmentStrings.
(environ_init): Revert rawenv stuff.
2006-04-21 21:34:38 +00:00
Christopher Faylor 478e8b1569 format comment using GNU-style 2006-04-21 19:40:48 +00:00
Christopher Faylor 16dc3c95fb * environ.cc (rawenv): Make this variable a file-scope static.
(getearly): Rename 's' variable to 'len' since 's' is used fairly consistently
throughout cygwin as a string variable.  Remove rawenv declaration.  Perform
other minor cleanups.
(environ_init): Remove rawenv declaration.  Only set rawenv to
GetEnvironmentStrings() if it has not already been set.  Properly free rawenv
in all cases.
2006-04-21 19:19:31 +00:00
Christopher Faylor f09acf77de * tty.h (tty::hwnd): Move to tty_min.
(tty::gethwnd): Ditto.
(tty::sethwnd): Ditto.
(tty_min::hwnd): Receive variable from tty class.
(tty_min::gethwnd): Receive function from tty classs.
(tty_min::sethwnd): Ditto.
* dtable.cc (dtable::stdio_init): Only call init_console_handler when we
actually own the console.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd to
non-zero value.
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate handling of
console when pgrp is set.
2006-04-21 18:53:05 +00:00
Corinna Vinschen 33b0abd1c3 * environ.cc (getearly): New function.
(findenv_func): New function pointer, predefined to getearly.
	(getenv): Call findenv function over the findenv_func pointer.
	(environ_init): Change findenv_func pointer to my_findenv after Cygwin
	environment is initialized.
2006-04-21 17:21:41 +00:00
Corinna Vinschen 053fc4771a * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t. 2006-04-21 14:29:54 +00:00
Corinna Vinschen 00c2208858 * fhandler_socket.cc (fhandler_socket::wait): Reorder setting
WSAError to avoid spurious errors with WSAError set to 0.
2006-04-21 11:35:44 +00:00
Corinna Vinschen 387e6a35d8 * include/asm/byteorder.h: Include stdint.h. Per standard, change
datatypes in ntohX and htonX functions to uintXX_t types.
2006-04-21 09:59:07 +00:00
Dimitri Papadopoulos 6fbcec60a8 * include/winnt.h: revert to 1.102
* include/ddk/winddk.h: revert to 1.25
2006-04-20 10:47:43 +00:00
Dimitri Papadopoulos 53e906ee42 * include/edevdefs.h: New file. 2006-04-19 11:03:17 +00:00
Dimitri Papadopoulos 9d723cf55e * include/mmsystem.h (_LPCWAVEFORMATEX_DEFINED): Define.
Use as guard for the WAVEFORMATEX structure instead of
	_WAVEFORMATEX_ to avoid clashes with DirectSound. Keep
	_WAVEFORMATEX_ for compatibility.
	Thanks to:    Andrew Jones <guln at sf dot net>
2006-04-19 08:57:16 +00:00
Dimitri Papadopoulos cb784c8950 * include/winnt.h, include/ddk/winddk.h (FIELD_OFFSET):
Compile with recent C++ compiler such as gcc 3.4.
	* include/ddk/winddk.h: Ditto.
2006-04-19 08:40:53 +00:00
Dimitri Papadopoulos a2601182c0 * include/winuser.h (CharNextEx,CharNextExW,CharPrevEx,CharPrevExW):
Delete. Only CharNextExA and CharPrevExA are documented in MSDN.
	Thanks to:    David Golub <david_golub at sf dot net>
2006-04-19 08:15:19 +00:00
Christopher Faylor 4c6f65fc7c * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT when we
have actually handled the event.
2006-04-18 16:24:54 +00:00
Danny Smith 6ea56da87a 2006-04-18 Eric House <ehouse@eehouse.org>
PocketPC support.
	* include/aygshell.h: New file [_WIN32_WCE]. Declare most common
	functions for using aygshell on PocketPC:
	SHCreateMenuBar, SHFindMenuBar, SHCreateNewItem, SHFullScreen,
	SHSipInfo, SHHandleWMActivate, SHHandleWMSettingChange

	* include/commctrl.h [_WIN32_WCE] Add function prototypes for
	command bar API on PocketPC:
	CommandBar_Create, CommandBar_Show, CommandBar_AddBitmap,
	CommandBar_InsertComboBox, CommandBar_InsertMenubar,
	CommandBar_InsertMenubarEx, CommandBar_DrawMenuBar,
	CommandBar_GetMenu, CommandBar_AddAdornments, CommandBar_Height,
	CommandBar_InsertButton, CommandBar_Destroy.

	* include/winbase.h [_WIN32_WCE] (WIN32_FIND_DATA{A|W}): Remove
	 fields not present on PocketPC.
	(GetCurrentThreadId): Conditionally declare as extern function
	without dllimport attribute on PocketPC.
 	(ResetEvent): Likwise.
	(SetEvent): Likewise.

	* include/wingdi.h [_WIN32_WCE]  (GetTextExtentPoint32{A|W}):
	Conditionally declare as extern function without dllimport
	 attribute on PocketPC.
	* winuser.h  [_WIN32_WCE] (DialogBoxParam{A|W}): Conditionally
	declare as extern function without dllimport attribute on PocketPC.
2006-04-18 09:48:05 +00:00
Danny Smith 5c96db5d4f 2006-04-18 Eric House <ehouse@eehouse.org>
PocketPC support.
	* include/aygshell.h: New file [_WIN32_WCE]. Declare most common
	functions for using aygshell on PocketPC:
	SHCreateMenuBar, SHFindMenuBar, SHCreateNewItem, SHFullScreen,
	SHSipInfo, SHHandleWMActivate, SHHandleWMSettingChange

	* include/commctrl.h [_WIN32_WCE] Add function prototypes for
	command bar API on PocketPC:
	CommandBar_Create, CommandBar_Show, CommandBar_AddBitmap,
	CommandBar_InsertComboBox, CommandBar_InsertMenubar,
	CommandBar_InsertMenubarEx, CommandBar_DrawMenuBar,
	CommandBar_GetMenu, CommandBar_AddAdornments, CommandBar_Height,
	CommandBar_InsertButton, CommandBar_Destroy.

	* include/winbase.h [_WIN32_WCE] (WIN32_FIND_DATA{A|W}): Remove
	 fields not present on PocketPC.
	(GetCurrentThreadId): Conditionally declare as extern function
	without dllimport attribute on PocketPC.
 	(ResetEvent): Likwise.
	(SetEvent): Likewise.

	* include/wingdi.h [_WIN32_WCE]  (GetTextExtentPoint32{A|W}):
	Conditionally declare as extern function without dllimport
	 attribute on PocketPC.
	* winuser.h  [_WIN32_WCE] (DialogBoxParam{A|W}): Conditionally
	declare as extern function without dllimport attribute on PocketPC.
2006-04-18 09:35:29 +00:00
Danny Smith 065e8a7a02 2006-04-18 Thorsten Dahlheimer (dahlheim@users.sf.net>
* include/wingdi.h (ColorCorrectPalette): Add declaration.
	(CreateColorSpace): Add UNICODE mappings.
	* lib/gdi32.def (ColorCorrectPalette): Add stub. 
	* include/icm.h: New file.
	* lib/mscms.def: New file.
	* lib/icmui.def: New file.
2006-04-18 04:38:03 +00:00
Danny Smith edf92ad046 2006-04-18 Thorsten Dahlheimer (dahlheim@users.sf.net>
* include/winnt.h (IMAGE_FILE_MACHINE_IA64): New define.
	(IMAGE_FILE_MACHINE_AMD64): New define.
	(IMAGE_NT_OPTIONAL_HDR{32|64}_MAGIC. New. Map to IMAGE_NT_OPTIONAL_HDR_MAGIC.
	(IMAGE_SUBSYSTEM_NATIVE_WINDOWS): New define.
	(IMAGE_SUBSYSTEM_WINDOWS_CE_GUI): New define.
	(IMAGE_DLLCHARACTERISTICS_WDM_DRIVER): New define.
	(IMAGE_DIRECTORY_ENTRY_*): New defines.
	(IMAGE_SCN_TYPE_*): New defines.
	(IMAGE_SCN_ALIGN_*): New defines.
	(IMAGE_DEBUG_TYPE_BORLAND): New define.
	(IMAGE_OPTIONAL_HEADER{32|64}): New structure definitions and typedefs.  Map to
	IMAGE_OPTIONAL_HEADERS.
	(IMAGE_NT_HEADERS{32|64}): New structure definitions and typedefs.  Map to
	IMAGE_NT_HEADERS.
	(IMAGE_LOAD_CONFIG_DIRECTORY64): New structure definition and typedefs.
	(IMAGE_CE_RUNTIME_FUNCTION_ENTRY): Likewise.
	(IMAGE_FUNCTION_ENTRY64): Likewise.
2006-04-18 03:58:22 +00:00
Danny Smith bcc39a0bfe 2006-04-18 Bart Oldeman <bartoldeman@users.sf.net>
* lib/test.c: Fix typo in #inlcude.
	* include/aclui.h: INTERFACE should not remain
	defined at the end of the header.
	* include/servprov.h: Ditto.
2006-04-18 02:57:59 +00:00
Christopher Faylor d1efa4e819 * mktemp.cc (_gettemp): Open temp files in binary mode. 2006-04-17 15:09:13 +00:00
Danny Smith 1d975d67b1 * include/ws2tcpip.h (gai_strerror): Add thread-safety comment. 2006-04-16 08:26:59 +00:00
Dimitri Papadopoulos 538146072a * include/ws2tcpip.h (gai_strerror{AW}): Implement as inline function. 2006-04-14 16:40:30 +00:00
Dimitri Papadopoulos 285ae543e2 * include/wsahelp.h (system_header): Add pragma.
* include/ws2spi.h (system_header): Add pragma.
	* include/rasdlg.h (system_header): Add pragma.
	* include/rasdlg.h (_RASDLG_H): Define.
	Define instead of _RASDLG_H_, this is the w32api standard.
	* include/mlang.h (_MLANG_H): Define.
	Define instead of _MLANG_H_, this is the w32api standard.
	* include/setupapi.h (_SETUPAPI_H): Define.
	Define instead of _SETUPAPI_H_, this is the w32api standard.
2006-04-14 15:54:54 +00:00
Dimitri Papadopoulos 3253f21972 * include/rpcndr.h (boolean): Add typedef.
Thanks to:    James du Russel <ephelon at users dot sf dot net>
	* include/rpcndr.h (_RPCNDR_H): Define.
	Define in addition to __RPCNDR_H__, this is the w32api standard.
2006-04-14 15:21:21 +00:00
Corinna Vinschen b40098e6f2 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX
instead of UINT_MAX.
2006-04-14 14:34:39 +00:00
Corinna Vinschen 5b9262e797 * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
Drop remote fs handling entirely since unreliable inode numbers
	are now recognized differently.
	(path_conv::is_samba): Make inline.
	(fhandler_disk_file::opendir): Reformat comment.
	(fhandler_base::fstat_helper): Special case remote file systems
	returning (unreliable) 32 bit inode numbers.
	(fhandler_base::readdir): Ditto.
	* fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
2006-04-14 14:20:58 +00:00
Chris Sutcliffe 04cbcde8d9 2006-04-14 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.7.
        * Makefile.in: Ditto.
2006-04-14 12:52:50 +00:00
Christopher Faylor c99126ab96 trivial change 2006-04-14 01:31:14 +00:00
Chris Sutcliffe 9f8b325c45 2006-04-13 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/winbase.h (GET_MODULE_HANDLE_EX_FLAG_*): Define.
        Thanks to:      Brandon Sneed <brandon at redf dot net>
2006-04-14 00:14:19 +00:00
Christopher Faylor 853f84e53c * spawn.cc (spawn_guts): Move ch.set() call back to where it was supposed to
be.
2006-04-13 16:11:06 +00:00
Corinna Vinschen bee0f85727 Bump copyright dates. 2006-04-13 12:14:58 +00:00
Corinna Vinschen 414969016e * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,
_SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED,
	_SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
2006-04-13 12:14:05 +00:00
Christopher Faylor 2e9d484382 * spawn.cc (spawn_guts): Revert patch which treated derived cygwin programs
differently from those which are mounted with -X.  Pass extra argument to
linebuf::fromargv.
* winf.h (MAXCYGWINCMDLEN): New define.
(linebuf::finish): Add a new argument denoting when command line overflow is
ok.
(linebuf::fromargv): Ditto.
* winf.cc (linebuf::finish): Implement above change.
(linebuf::fromargv): Ditto.
2006-04-13 01:37:00 +00:00
Christopher Faylor 329a39ebea * Makefile.in (DLL_OFILES): Add winf.o.
* spawn.cc: Move command line handling stuff into winf.cc.
* winf.h: New file.
* winf.cc: New file.
2006-04-12 15:53:22 +00:00
Danny Smith be5542f716 * include/secext.h: Enclose function declarations in extern "C" for
__cplusplus.
2006-04-12 08:04:42 +00:00
Chris Sutcliffe 076887efab 2006-04-11 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/comcat.h: INTERFACE should not remain defined
    at the end of the header.
    * include/docobj.h: Ditto.
    * include/exdisp.h: Ditto.
    * include/intshcut.h: Ditto.
    * include/mlang.h: Ditto.
    * include/mshtml.h: Ditto.
    * include/oaidl.h: Ditto.
2006-04-11 22:56:08 +00:00
Dimitri Papadopoulos 84ac4d5112 * include/commdlg.h (PD_*): Rearrange. 2006-04-11 08:03:23 +00:00
Dimitri Papadopoulos 9681ad80b9 * include/commdlg.h (PD_*): Define.
Thanks to:    Wolfgang Glas <softadm at users dot sf dot net>
2006-04-11 07:53:23 +00:00
Danny Smith e5807db846 * include/iphlpapi.h (GetAdaptersAddresses): Check for winsock2
here also.
2006-04-08 03:49:28 +00:00
Dimitri Papadopoulos cf30e49114 * include/wincrypt.h (PROV_MS_EXCHANGE): Define.
We should probably remove PROV_MS_MAIL but I'm keeping it for
	now for compatibility reasons.
	Thanks to:    Marcus Agehall <agehall at users dot sf dot net>
2006-04-07 14:28:35 +00:00
Dimitri Papadopoulos c7a84ac71f * include/commdlg.h [WINVER >= 0x0500]
(PD_RESULT_*,START_PAGE_GENERAL): Define.
	Thanks to:    Wolfgang Glas <softadm at users dot sf dot net>
2006-04-07 14:17:28 +00:00
Dimitri Papadopoulos 198785c1d3 * include/wingdi.h [WINVER >= 0x0410]
(AlphaBlend,GradientFill,TransparentBlt): Windows 98 and better.
	Thanks to:    Alessandro Antonello <aleantonello at users dot sf dot net>
2006-04-07 13:41:24 +00:00
Dimitri Papadopoulos 6fca0833c6 * include/wingdi.h (CAPTUREBLT,NOMIRRORBITMAP): Define.
* include/commctrl.h (WC_LINK{AW},LIF_*,LIM_*,LM_*,
	MAX_LINKID_TEXT,L_MAX_URL_LENGTH): Define.
	(LITEM,LHITTESTINFO,NMLINK): Add structures.
	Thanks to:    Brandon Sneed <brandon at redf dot net>
2006-04-07 13:28:49 +00:00
Dimitri Papadopoulos 7d7113db13 * include/w32api.h (IE*): Define for recent versions of IE. 2006-04-06 12:26:09 +00:00
Dimitri Papadopoulos a846957047 * include/w32api.h (_W32API_H): Define.
Define in addition to _W32API_H_, this is the w32api standard.
2006-04-06 12:21:30 +00:00
Dimitri Papadopoulos 45a450621f * include/w32api.h (WindowsVista): Define. 2006-04-06 12:18:40 +00:00
Dimitri Papadopoulos e98a5b1c43 * include/iptypes.h (IP_ADAPTER_*): Define parts that depend
on SOCKET_ADDRESS only if winsock2.h has already been included.
2006-04-06 12:16:49 +00:00
Dimitri Papadopoulos 944a4fa770 * include/winuser.h (WM_IME_*): Remove. Defined in imm.h. 2006-04-06 11:53:54 +00:00
Christopher Faylor f2e6c50869 * fhandler_socket.cc: Move iptypes.h include after winsock2 since it now relies
on it.
* net.cc: Ditto.
2006-04-05 16:53:12 +00:00
Christopher Faylor 0ce97eb453 * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}
initialization here from dll_crt0_1.
(dll_crt0_1): See above.
2006-04-05 16:42:27 +00:00
Dimitri Papadopoulos 3728ca6538 * include/iphlpapi.h (GAA_FLAG_*): Define.
(GetAdaptersAddresses): Add function declaration.
	* lib/iphlpapi.def (GetAdaptersAddresses): Add function stub.
	Thanks to:    ross <rossboulet at users dot sf dot net>
2006-04-05 16:05:04 +00:00
Dimitri Papadopoulos 273243a857 * include/iptypes.h (IP_INTERFACE_NAME_INFO,
IP_ADAPTER_ANYCAST_ADDRESS,IP_ADAPTER_MULTICAST_ADDRESS,
	IP_ADAPTER_UNICAST_ADDRESS,IP_ADAPTER_DNS_SERVER_ADDRESS,
	IP_ADAPTER_PREFIX,IP_ADAPTER_ADDRESSES): Add structures.
	(IF_OPER_STATUS,IP_DAD_STATE,IP_PREFIX_ORIGIN,IP_SUFFIX_ORIGIN,
	SCOPE_LEVEL): Add enums.
	(IP_ADAPTER_*): Define.
2006-04-05 15:53:58 +00:00
Dimitri Papadopoulos be95339627 * include/winuser.h (GetWindowExtEx): Removed, belongs to wingdi.h.
Thanks to:    Sergey Philippov <phis at users dot sf dot net>
2006-04-05 15:06:56 +00:00
Dimitri Papadopoulos d5ad5abfc2 * include/objidl.h (PIDSI_*): Define.
(PRSPEC_*): Define.
	Thanks to:    Oliver Stoeneberg <kidkat at users dot sf dot net>
2006-04-05 14:16:17 +00:00
Dimitri Papadopoulos 1d509e2a22 * include/winbase.h (LOGON32_PROVIDER_WINNT40,
LOGON32_PROVIDER_WINNT50, LOGON32_LOGON_NETWORK,
	LOGON32_LOGON_UNLOCK, LOGON32_LOGON_NETWORK_CLEARTEXT,
	LOGON32_LOGON_NEW_CREDENTIALS): Define.
	Thanks to:    Oliver Stoeneberg <kidkat at users dot sf dot net>
2006-04-05 13:53:14 +00:00
Dimitri Papadopoulos 347fb1920b * include/mq.h: New file.
* lib/mqrt.def: (MQ*): Define a few missing functions.
2006-04-05 10:01:56 +00:00
Dimitri Papadopoulos 024d48dff7 * lib/mqrt.def: New file.
Needs the mq.h file to work properly, working on it.
	Thanks to:    Pascal Obry <pobry at users dot sf dot net>
2006-04-05 07:23:14 +00:00
Dimitri Papadopoulos e159a2ade2 * include/winerror.h (STG_E_*): Define.
Thanks to:    Oliver Stoeneberg <kidkat at users dot sf dot net>
	* include/winerror.h (STG_S_*): Define.
	(CO_S_MACHINENAMENOTFOUND): Define.
	(RPC_E_*): Define.
	(NTE_*): Define.
2006-04-05 07:06:06 +00:00
Joshua Daniel Franklin 6804a9d4e1 faq.using.chmod faq.programming.adjusting-heap 2006-04-05 04:09:55 +00:00
Corinna Vinschen 8ca521afe9 * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
the same values as on Linux.
2006-04-04 09:54:25 +00:00
Christopher Faylor 9dbb0bc355 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
(child_info_fork::alloc_stack): Move into this class.
(child_info_fork::alloc_stack_hard_way): Ditto.
* dcrt0.cc (child_info_fork::alloc_stack): Ditto.
(child_info_fork::alloc_stack_hard_way): Ditto.
(_dll_crt0): Reference alloc_stack via fork_info.
2006-04-03 17:33:07 +00:00
Corinna Vinschen 45bdcc689a * spawn.cc (linebuf::finish): Drop argument. Don't check command line
length.
	(spawn_guts): Remove wascygexec.  Check real_path.iscygexec instead.
	Accommodate change to linebuf::finish.
2006-04-03 17:21:42 +00:00
Christopher Faylor 1a6aafd031 * dcrt0.cc (sm): Delete.
(alloc_stack_hard_way): Figure out where the stack lives here rather than
relying on previously filled out information which has been invalid since
1.5.19.
2006-04-03 16:04:02 +00:00
Dimitri Papadopoulos 29c2d97a8c * include/commctrl.h (ListView_*): Define and correct.
(LVM_*): Define.
2006-04-03 13:01:26 +00:00
Dimitri Papadopoulos 4b0baaa5eb * include/winuser.h (WM_IME_*): Define (DWORD type).
(EM_*IMESTATUS): Define.
	(WM_*): Define.
	(XBUTTON*): Define.
	Thanks to:    Steve Folly <spfolly at users dot sf dot net>
2006-04-03 09:55:26 +00:00
Christopher Faylor 0a75feea66 * cygwinenv.sgml: Rename fork_retry to proc_retry since it has turned out to be
more general than just fork.
2006-04-03 03:37:52 +00:00
Corinna Vinschen b7b1c2d787 * fhandler_disk_file.cc (FS_IS_SAMBA_WITH_QUOTA): New define.
(path_conv::hasgood_inode): Recognize Samba with quota support
	compiled in.
	(path_conv::is_samba): Ditto.  Fix comment to include Samba version
	numbers for later reference.
2006-03-31 20:07:13 +00:00
Danny Smith ab4a589f90 * include/winnetwk.h (WNetGetResourceInformationW): Correct first param.
Thanks to: Rene Rivera  <grafik at users dot sf dot net>.
2006-03-31 09:08:47 +00:00
Corinna Vinschen bb09410538 * security.h (sec_user_nih): Make sid1 argument mandatory.
(sec_user): Ditto.
2006-03-30 16:08:50 +00:00
Christopher Faylor 8f31f3f481 * include/winspool.h: Protect use of PRINTER_ENUM_VALUESW with proper version
conditional.
2006-03-30 04:01:43 +00:00
Christopher Faylor 6f9b3203f2 * sigproc.cc (wait_for_sigthread): Use the current user sid when setting up the
signal pipe rather than relying on (eventually) the effective sid.
2006-03-30 00:57:59 +00:00
Dimitri Papadopoulos e47e7d6b02 * include/winspool.h (JOB_INFO_3): Add structure.
(PROVIDOR_INFO_*{AW}): Add structure.
	* include/winspool.h [_WIN32_WINNT >= 0x0500]
	(PRINTER_ENUM_VALUES{AW}): Add structure.
	(PRINTPROCESSOR_CAPS): Add structure.
2006-03-29 17:10:00 +00:00
Dimitri Papadopoulos d74d033ddd * include/winspool.h [_WIN32_WINNT >= 0x0500]
(PRINTER_INFO_7A): Correct definition.
2006-03-29 12:41:58 +00:00
Dimitri Papadopoulos fddb260daa * include/winspool.h [_WIN32_WINNT >= 0x0500]
(DRIVER_INFO_7A): Correct definition.
2006-03-29 12:41:10 +00:00
Dimitri Papadopoulos 69356fef69 * include/winspool.h [_WIN32_WINNT >= 0x0500]
(DRIVER_INFO_*{AW}): Add structure.
	(PRINTER_INFO_*{AW}): Add structure.
	Thanks to:   Roland Schwingel <rolandschwingel at users dot sf dot net>
2006-03-29 12:23:08 +00:00
Dimitri Papadopoulos aee7cf676e * include/winspool.h [_WIN32_WINNT >= 0x0500]
(DRIVER_*MODE): Define (DWORD type).
	Thanks to:   Roland Schwingel <rolandschwingel at users dot sf dot net>
2006-03-29 11:56:38 +00:00
Christopher Faylor 12b3371289 * dcrt0.cc (child_info_fork::handle_fork): Set uid/gid in myself so that it can
be used by subsequent startup functions.
(dll_crt0_0): Issue a warning if DuplicateTokenEx fails and DEBUGGING.
(dll_crt0_1): Move user_data->{resourcelocks,threadinterface} initialization
here from dll_crt0_0.
* fork.cc (frok::child): Tell wait_for_sigthread that this is fork.
(frok::parent): Only initialize start_time once.  Tighten time when we're
"deimpersonated".
* sigproc.cc (signal_fixup_after_exec): Rework (futiley) sa_buf stuff.  Add
debugging output.
(wait_for_sigthread): Accept an argument which illustrates whether we are
forked or not.
(wait_sig): Avoid using myself pointer.
* winsup.h ((wait_for_sigthread): Reflect change to argument.
2006-03-29 06:35:25 +00:00
Danny Smith a68a2dbab4 * include/wincon.h (GetConsoleProcessList): Declare. 2006-03-27 05:34:23 +00:00
Danny Smith 1c051b91c4 2006-03-27 Hansres Engel <engel@node.ch>
* include/mlang.h: New file.
2006-03-27 05:23:52 +00:00
Christopher Faylor 8b9fb6fffd * spawn.cc (spawn_guts): Close handles if we know that we will not be seeing a
sync event from the child.
2006-03-27 03:52:24 +00:00
Christopher Faylor ec54178c36 * sigproc.cc (wait_sig): Move myself manipulation...
(wait_for_sigthread): ...to here.
2006-03-27 01:10:48 +00:00
Chris Sutcliffe 8d6d480774 2006-03-26 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/winbase.h (SetProcessWorkingSetSize): Corrected define.
2006-03-26 01:24:03 +00:00
Danny Smith 489d553f75 2006-03-26 Hansres Engel <engel@node.ch>
Add Uniscribe API for typography and for complex scripts.
	 * include/usp10.h: New file.
         * lib/usp10.def: New file.

	* include/winver.h:  Change first argument of GetFileVersionInfo[...] to const.

        * include/imm.h (IMECHARPOSITION): Add structure.
	(RECONVERTSTRING): Likwise.

	* include/commdlg.h (OPENFILENAME_SIZE_VERSION_400): Define.

        * lib/uuid.c (CMultiLanguage): Add UUID definition.
	(IMLangFontLink2): Likewise.
	(IMultiLanguage): Likewise.
2006-03-25 21:43:55 +00:00
Corinna Vinschen 3ff1a063a1 * fhandler_floppy.cc: Include ntdef.h and ntdll.h.
(fhandler_dev_floppy::get_drive_info): Rearrange so that now
	NtQueryVolumeInformationFile is called on drives which don't support
	IOCTL_DISK_GET_DRIVE_GEOMETRY.
	* ntdll.h (struct _FILE_FS_SIZE_INFORMATION): Add.
	(enum _FSINFOCLASS): Add missing values.
2006-03-24 14:52:08 +00:00
Christopher Faylor f12c262a43 * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Make error
message more explicit.
* pinfo.cc (_pinfo::commune_request): Don't lock process unless we're looking
for fifos.
2006-03-23 23:58:52 +00:00
Christopher Faylor 3eb92a58f8 * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the console
handler here.
* dtable.cc (dtable::stdio_init): Initialize console handler here.
2006-03-23 16:52:34 +00:00
Christopher Faylor dccd2abec6 * sigproc.cc (sigalloc): Don't set SA_RESTART here.
* signal.cc (_SA_NORESTART): New flag.
(sigaction_worker): New function, derived from sigaction.  Don't set internal
flags unless called internally.
(sigaction): Use sigaction_worker.
(signal): Honor new _SA_NORESTART flag.
(siginterrupt): Set _SA_NORESTART flag appropriately.  Use sigaction_worker to
set flags.
* include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
2006-03-23 15:55:59 +00:00
Christopher Faylor 5b2daa7c97 * winsup.api/checksignal.c (main): Add test for siginterrupt. 2006-03-23 15:52:16 +00:00
Corinna Vinschen f352ebca02 * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.
(pthread_cond::is_good_initializer_or_bad_object): Delete.
	(pthread_rwlock::is_good_initializer_or_bad_object): Delete.
	(pthread_cond::init): Remove disabled code.  Guard assignment to
	object to initialize against access violation.
	(pthread_rwlock::init): Ditto.
	(pthread_mutex::init): Ditto.
2006-03-22 20:38:26 +00:00
Christopher Faylor 81010d21e6 * fhandler.cc (fcntl): Print flags in hex.
* dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved pinfo_init
and uinfo_init here.
(dll_crt0_1): Ditto.
(__dll_crt0): Ditto.  Don't call update_envptrs here.
(dll_crt0_1): Ditto.  Move wait_for_sigthread call here from dll_crt0_0.
* environ.cc (environ_init): Call it here instead.
* sigproc.cc (my_readsig): New static variable.
(wait_for_sigthread): Set up read pipe here since we are assured that we have
the proper privileges when this is called.
(talktome): Eliminate second argument since it is available as a global now.
(wait_sig): Reflect use of my_readsig.
2006-03-22 16:42:45 +00:00
Corinna Vinschen 69769b7cb5 * thread.cc (pthread_cond::init): Disable validity test of object
to initialize since test of uninitialized content is unreliable.
	(pthread_rwlock::init): Ditto.
	(pthread_mutex::init): Ditto.
2006-03-22 12:52:26 +00:00
Christopher Faylor 70fde4154f * signal.cc (signal): Don't set SA_RESTART here.
(siginterrupt): White space.
* sigproc.cc (sigalloc): Set SA_RESTART here, on initialization.
2006-03-22 04:13:55 +00:00
Christopher Faylor 76ef40d69f * child_info.h (child_status): Fix typo which made it impossible to set
iscygwin.
(child_info::isstraced): Booleanize.
(child_info::iscygwin): Ditto.
* sigproc.cc (child_info::child_info): Minor cleanup of flag setting.
* spawn.cc (spawn_guts): Only close_all_files when we know the process has
started successfully.
* exceptions.cc (init_console_handler): Fix indentation.
2006-03-22 03:20:28 +00:00
Christopher Faylor d4d63ebf22 * dcrt0.cc (dll_crt0_0): Call SetErrorMode earlier.
* pinfo.cc (_pinfo::dup_proc_pipe): Reset wr_proc_pipe on failure.  Return
previous pipe handle.
* pinfo.h (_pinfo::dup_proc_pipe): Reflect change to return value.
* spawn.cc (spawn_guts): Restore previous proc pipe on retry or if process
exits before synchronization.
2006-03-21 01:37:25 +00:00
Christopher Faylor c1494e03a2 * child_info.h (child_status): New enum.
(child_info::flag): Rename from 'straced'.
(child_info::isstraced): New function.
(child_info::iscygwin): Ditto.
(child_info_fork::handle_fork): Reparmize.
(child_info_fork::handle_failure): Ditto.
(child_info_spawn::handle_spawn): New function.
* dcrt0.cc (get_cygwin_startup_info): Use isstraced method.
(child_info_spawn::handle_spawn): Define new function from code previously in
dll_crt0_0.
(dll_crt0_0): Move spawn stuff into handle_spawn.  Only call
init_console_handler for fork case.
* sigproc.cc (child_info::child_info): Set flag appropriately.
(child_info::proc_retry): Treat exit code as "funny" if it's a cygwin process.
* spawn.cc (spawn_guts): Remove commented out flag setting.
2006-03-20 18:01:17 +00:00
Christopher Faylor 4aedb28796 revert previous debugging checkin 2006-03-20 02:01:50 +00:00
Christopher Faylor c5c3d69d8a * pinfo.cc (commune_process): Fix randomly invalid pointer which caused fifos
to work incorrectly.
2006-03-20 01:59:23 +00:00
Christopher Faylor 7d85b417f1 * dcrt0.cc (dll_crt0_0): Oops. We need to bother with setting this in the
fork/exec case.
2006-03-20 01:16:39 +00:00
Christopher Faylor cba9ecfffd * dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler here
since it will be set later when we discover if we have a ctty or not.
* exceptions.cc (init_console_handler): Properly remove NULL handler.
2006-03-20 01:11:30 +00:00
Christopher Faylor 3b69aaa932 * pinfo.h (EXITCODE_OK): Define new constant.
* sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with exit_code
== 0.
(sig_send): Don't complain if sending signals while blocked if the sender isn't
in the main thread.
2006-03-18 19:28:59 +00:00
Christopher Faylor a939686807 * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
(child_info::retry): Move here from fork subclass.
(child_info::exit_code): New field.
(child_info::retry_count): Max retry count for process start.
(child_info::proc_retry): Declare new function.
(child_info_fork::retry): Move to parent.
(child_info_fork::fork_retry): Ditto.
* dcrt0.cc (child_info::fork_retry): Rename and move.
(child_info_fork::handle_failure): Move.
(dll_crt0_0): Initialize console handler based on whether we have a controlling
tty or not.  Avoid nonsensical check for fork where it can never occur.
* environ.cc (set_proc_retry): Rename from set_fork_retry.  Set retry_count in
child_info.
(parse_thing): Reflect above change.
* exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
(ctrl_c_handler): Always return TRUE for the annoying CTRL_LOGOFF_EVENT.
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
init_console_handler.
* fhandler_tty.cc (fhandler_tty_slave::open): Just call mange_console_count
here and let it decide what to do with initializing console control handling.
* fork.cc (fork_retry): Remove definition.
(frok::parent): Define static errbuf and use in error messages (not thread safe
yet).  Close pi.hThread as soon as possible.  Protect pi.hProcess as soon as
possible.  Don't set retry_count.  That happens automatically in the
constructor now.  Accommodate name change from fork_retry to proc_retry.
* init.cc (dll_entry): Turn off ctrl-c handling early until we know how it is
supposed to be handled.
* pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value for
failure error message.  Tweak debug message slightly.
* sigproc.cc (child_info::retry_count): Define.
(child_info::child_info): Initialize retry count.
(child_info::sync): Set exit code if process dies before synchronization.
(child_info::proc_retry): Rename from child_info_fork::fork_retry.  Use
previously derived exit code.  Be more defensive about what is classified as an
error exit.
(child_info_fork::handle_failure): Move here from dcrt0.cc.
* spawn.cc (spawn_guts): Maintain error mode when starting new process to avoid
annoying pop ups.  Move deimpersonate call within new loop.  Move envblock
freeing to end.  Loop if process dies prematurely with bad exit code.
* syscalls.cc (init_console_handler): Remove hopefully unneeded call to
init_console_handler.
2006-03-18 19:17:21 +00:00
Danny Smith 61337a0f45 2006-03-18 Julien Lecomte <julienlecomte@users.sourceforge.net>
* include/wincon.h  (ENABLE_*): Add more defines.

2006-03-18  Jan Nijtmans <nijtmans@users.sourceforge.net>

	* include/winnt.h (INHERITED_ACE): Define.
	(VALID_INHERIT_FLAGS): Correct definition.

2006-03-18  Peter �strand  <astrand@cendio.se>

         * lib/wtsapi32.def: New file.
2006-03-18 04:02:54 +00:00
Christopher Faylor c94cc0f583 * include/winbase.h (STATUS_DLL_INIT_FAILED): New define.
(STATUS_DLL_INIT_FAILED_LOGOFF): Ditto.
2006-03-16 03:05:39 +00:00
Christopher Faylor 974f27a51a * cygheap.cc (init_cygheap::manage_console_count): Turn console control handler
on/off depending on whether we have allocated a console or not.
* dcrt0.cc (child_info_fork::fork_retry): Add more potential retry statuses.
(dll_crt0_0): Turn on/off console control depending on whether we have a
controlling tty or not.
* exceptions.cc (init_console_handler): Change BOOL to bool.
* fhandler_console.cc (fhandler_console::need_invisible): Cosmetic change.
* winsup.h (init_console_handler): Reflect argument type change.
* wincap.h (supports_setconsolectrlhandler_null): Remove duplicate capability
throughout.
* wincap.cc: Ditto.
2006-03-16 02:57:37 +00:00
Christopher Faylor f02400f7c9 * child_info.h (child_info_fork::fork_retry): Declare new function.
* dcrt0.cc (child_info_fork::fork_retry): Define new function.
* fork.cc (frok::parent): Move retry decision into child_info_fork::fork_retry
and honor what it tells us to do.
* sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
2006-03-15 00:29:14 +00:00
Christopher Faylor 67f85ee7b2 * fork.cc (frok::parent): Improve error message. 2006-03-14 21:01:35 +00:00
Christopher Faylor e5aa298da5 * dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
(dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
uinfo_init...
(dll_crt0_0): ...to here.
(_dll_crt0): Call update_envptrs here after setting main_environ.
* environ.cc (environ_init): Eliminate initted variable.  Don't call
update_envptrs here.
* sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to avoid a
dereference.
2006-03-14 19:07:36 +00:00
Christopher Faylor 84d3817405 * child_info.h (child_info_fork::handle_failure): Declare new function.
(child_info_fork::retry): New field.
* dcrt0.cc (__api_fatal_exit_val): Define.
(child_info_fork::handle_failure): Define new function.
(__api_fatal): Exit using __api_fatal_exit_val value.
* environ.cc (set_fork_retry): Set fork_retry based on CYGWIN environment
variable.
(parse_thing): Add "fork_retry" setting.
* fork.cc (fork_retry): Define.
(frok::parent): Reorganize to allow retry of failed child creation if child
signalled that it was ok to do so.
* heap.cc (heap_init): Signal parent via handle_failure when VirtualAlloc
fails.
* pinfo.h (EXITCODE_RETRY): Declare.
* sigproc.cc (child_info::sync): Properly exit with failure condition if called
for fork and didn't see subproc_ready.
* spawn.cc (spawn_guts): Use windows pid as first argument.
* winsup.h: Remove obsolete NEW_MACRO_VARARGS define.
(__api_fatal_exit_val): Declare.
(set_api_fatal_return): Define.
(in_dllentry): Declare.
* exceptions.cc (inside_kernel): Remove unneeded in_dllentry declaration.
2006-03-13 21:10:14 +00:00
Christopher Faylor 063fd12660 * cygwinenv.sgml: Explain about new fork_retry CYGWIN environment variable
setting.
2006-03-13 21:02:37 +00:00
Christopher Faylor bbca1e4cb9 * dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a little
later.  Add a comment.
* fork.cc (resume_child): Make void.
(frok::parent): Only zero pi when necessary.  Explicitly zero si.  Set
this_errno when child_copy fails.  Accommodate change to resume_child.
* sigproc.cc (sigalloc): Move global_sigs initialization here.
(sigproc_init): Move global_sigs.
(sig_send): Just check for flush signals once.
* wincap.h: Define supports_setconsolectrlhandler_null throughout.
* wincap.cc: Ditto.
2006-03-13 18:29:48 +00:00
Corinna Vinschen d6382e653a Fix typo. 2006-03-13 11:25:07 +00:00
Corinna Vinschen 75c7893797 * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
Use for NT native functions throughout.
	* dtable.cc (handle_to_fn): Treate return value of NtQueryObject as
	NTSTATUS value.
2006-03-13 11:22:51 +00:00
Christopher Faylor 57001a7f10 tweak last ChangeLog description 2006-03-13 05:21:05 +00:00
Christopher Faylor 9badd94adb * cygtls.cc (_cygtls::remove): Reset initialized flag right away if we were
previously initialized.
* cygtls.h (_cygtls::initialized): Move nearer the end to catch situation when
Windows 98 mysteriously changes pieces of cygtls when thread is detaching.
* gendef (__sigfe_maybe): Simplify slightly.
* tlsoffsets.h: Regenerate.
2006-03-13 04:26:57 +00:00
Christopher Faylor 51f90b2f01 * cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
(CYGTLSMAGIC): Delete.
* dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
(_dll_crt0): Don't worry about sync_startup.  Just wait for sigthread here.
* dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr if we
have a valid tls.
* fork.cc (frok::child): Remove sigproc_init initialization since it happens
much earlier now.
* gendef: Recognize SIGFE_MAYBE.
(fefunc): Generate calls to _sigfe_maybe, if appropriate.
(_sigfe_maybe): New function.
* init.cc (search_for): Always initialize search_for, even on fork.
(calibration_thread): Delete.
(calibration_id): Delete.
(prime_threads): Delete.
(munge_threadfunc): Remove calibration_thread special case.  Avoid calling
thread function if we haven't yet hit the "search_for" thread.
(dll_entry): Remove prime_threads call.  Only call munge_threadfunc when
hwait_sig is active.  Ditto.  for _my_tls.remove ();
* sigproc.cc (hwait_sig): Make global.
(sigproc_init): Don't bother with sync_startup.
(sig_send): Treat flush as a no-op when signals are held.
(wait_sig): Cause signals to be held after fork.
2006-03-12 23:57:05 +00:00
Corinna Vinschen 75fbcb4488 * syscalls.cc (rename): Move existance check for oldpath further up
to the start of the function.  Avoid another case of a name collision
	if oldpath is a shortcut and a file or directory newpath already exists.
2006-03-09 15:31:08 +00:00
Dimitri Papadopoulos 82f0f1394c * include/winspool.h (DI_MEMORYMAP_WRITE): Define (DWORD type).
(FORM_USER,FORM_PRINTER): Define (DWORD type).
	* include/winspool.h [_WIN32_WINNT >= 0x0500]
	(DSPRINT_*): Define (DWORD type).
	Thanks to:   Roland Schwingel <rolandschwingel at users dot sf dot net>
2006-03-09 13:23:24 +00:00
Corinna Vinschen e9c8cb3193 * autoload.cc (NtClose): Define.
(NtOpenDirectoryObject): Define.
	(NtQueryDirectoryObject): Define.
	* fhandler_proc.cc: Include ctype.h and wchar.h.
	(format_proc_partitions): Revamp loop over existing harddisks by
	scanning the NT native \Device object directory and looking for
	Harddisk entries.
	* ntdll.h: Rearrange system call declarations alphabetically.
	(DIRECTORY_QUERY): Define.
	(struct _DIRECTORY_BASIC_INFORMATION): Define.
	(NtOpenDirectoryObject): Declare.
	(NtQueryDirectoryObject): Declare.
2006-03-09 09:01:08 +00:00
Corinna Vinschen 4db3b4496e Remove accidentally checked in ChangeLog entry. 2006-03-09 09:00:10 +00:00
Dimitri Papadopoulos c87248b6fa * include/winspool.h (JOB_CONTROL_*,JOB_STATUS_*): Define.
Thanks to:   Roland Schwingel <rolandschwingel at users dot sf dot net>
2006-03-09 08:26:24 +00:00
Christopher Faylor 9aca6a48a5 * cygtls.h (_cygtls::retaddr): New method.
* dll_init.cc (cygwin_detach_dll): Use new tls function to find return address
since this function is now signal guarded.
(update_envptrs): Remove unneeded braces.
* syscalls.cc (statvfs): Coerce full_path to avoid a gcc warning.
2006-03-08 23:55:14 +00:00
Corinna Vinschen 6ca5318940 * syscalls.cc (statvfs): Simplify path name expression. 2006-03-08 16:10:55 +00:00
Corinna Vinschen 6022cd2ef9 * syscalls.cc: Include winioctl.h.
(statvfs): Request correct volume size using DeviceIoControl if
	quotas are enforced on the file system.
2006-03-08 16:07:28 +00:00
Dimitri Papadopoulos c4e86a3181 * include/shellapi.h [_WIN32_IE >= 0x0600]
(SEE_MASK_NOZONECHECKS,SEE_MASK_FLAG_LOG_USAGE): Define on
	Windows XP SP1 and Windows XP respectively.
2006-03-07 10:59:46 +00:00
Dimitri Papadopoulos 93e4c351c2 * include/shellapi.h (NOTIFYICONDATA_V*_SIZE): Define.
Thanks to:  Daniel Atallah <datallah at users dot sf dot net>
	* include/shellapi.h  [_WIN32_IE >= 0x0500]
	(NIS_*): Introduced in Version 5.0.
2006-03-07 10:45:35 +00:00
Corinna Vinschen 6f815bf4b0 * cygwinenv.sgml: Add missing </para> at transparent_exe. 2006-03-07 09:21:28 +00:00
Danny Smith fc03f99fd3 * include/wingdi.h (CS_*): Correct WINVER guard on
Image Color Matching colour definitions.
2006-03-06 21:13:43 +00:00
Danny Smith f511869c92 * include/shlobj.h (SFGAO_ISSLOW): Define.
(SFGAO_DISPLAYATTRMASK): Define in terms of preceding display
	attribute constants.
2006-03-06 21:02:55 +00:00
Dimitri Papadopoulos 0e3a887a75 * include/wingdi.h [WINVER >= 0x0500]
(GRADIENT_FILL_*,*_EMBEDED): Included in Windows 2000 and later.
	Thanks to: David A. Capello <dacap at users dot sf dot net>
2006-03-06 14:30:30 +00:00
Dimitri Papadopoulos d0b42db669 * include/wingdi.h [WINVER >= 0x0500]
(INTERNET_STATE_*,*_EMBEDED): Included in Windows 2000 and later.
	Thanks to: David A. Capello <dacap at users dot sf dot net>
2006-03-06 14:29:04 +00:00
Dimitri Papadopoulos 738276cb88 * include/wingdi.h [WINVER >= 0x0500]
(INTERNET_STATE_*,*_EMBEDED): Included in Windows 2000 and later.
	Thanks to: David A. Capello <dacap at users dot sf dot net>
2006-03-06 14:28:35 +00:00
Danny Smith 984b8182bf 2006-03-05 Paul J. Lucas <pauljlucas@users.sourceforge.net>
* include/wininet.h (INTERNET_CONNECTED_INFO): Define structure.
	(INTERNET_STATE_*): Define flags.
	(INTERNET_OPTION_CONNECTED_STATE): Define constant.
2006-03-05 08:31:57 +00:00
Danny Smith 41c3c8bd2c 2006-03-05 Chris Wilson <chris+mingw@qwirx.com>
* include/sddl.h: New file.
2006-03-05 07:49:45 +00:00
Corinna Vinschen ecdee6e98a * dir.cc (opendir): Fix indentation.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Move storing
	fhandler in file descriptor table to some point very late in function
	to avoid double free'ing.  Add comment to explain what happens.
	Add label free_mounts and don't forget to delete __DIR_mounts structure
	if NtOpenFile fails.
2006-03-03 20:19:26 +00:00
Corinna Vinschen 17c8ac3992 * regtool.cc (options): Add 'binary'.
(usage): Document 'load|unload|save' and '-b'.
	(find_key): Add 'options' parameter, add load/unload.
	(cmd_set): Add KT_BINARY case.
	(cmd_get): Add hex output in KT_BINARY case.
	(cmd_load): New function.
	(cmd_unload): New function.
	(set_privilege): New function.
	(cmd_save): New function.
	(commands): Add load, unload and save.
	(main): Add '-b'
	* utils.sgml (regtool): Document it.
2006-03-03 09:43:35 +00:00
Corinna Vinschen 7b8b467def * syscalls.cc (chroot): Disallow chroot into special directories.
Return EPERM instead.
2006-03-02 18:08:09 +00:00
Corinna Vinschen 471573dc77 * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
cygdrive string length for those who have cygdrive mapped to "/".
2006-03-02 09:48:42 +00:00
Corinna Vinschen 352059d4b1 * sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME
privileges.
2006-03-01 23:14:25 +00:00
Corinna Vinschen 24f0349c1e * fhandler_proc.cc (fhandler_proc::fstat): Always return fixed link
count of 1 for /proc directory instead of incorrect PROC_LINK_COUNT.
2006-03-01 22:56:12 +00:00
Corinna Vinschen c115f31ff2 * fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
dirent_saw_dev and dirent_saw_proc.
	(fhandler_cygdrive::open): Declare.
	(fhandler_cygdrive::close): Declare.
	* fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file.
	(__DIR_mounts::check_mount): New parameter to indicate if inode number
	is needed in calling function or not. Add /proc and /cygdrive handling.
	(__DIR_mounts::check_missing_mount): Ditto.
	(path_conv::ndisk_links): Use __DIR_mounts class to create correct
	hardlink count for directories with mount points in them.
	(fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive
	handling.
	(fhandler_cygdrive::open): New method.
	(fhandler_cygdrive::close): New method.
	(fhandler_cygdrive::fstat): Always return fixed inode number 2 and
	fixed link count of 1. Drop call to set_drives.
	(fhandler_cygdrive::opendir): Drop call to get_namehash.
	(fhandler_cygdrive::readdir): Handle "." entry to return fixed inode
	number 2.
2006-03-01 22:37:25 +00:00
Christopher Faylor 8d0f58ef37 * cygwin.din: Fix some erroneous SIGFE/NOSIGFE settings.
* cygthread.cc (cygthread::callfunc): Revert below change.  Make ev a manual
reset event again.  so that it will be reset by WaitFor*Object as appropriate.
(cygthread::stub): Ditto.
(cygthread::terminate_thread): Reset ev if it was found to have been set.
2006-03-01 21:31:24 +00:00
Christopher Faylor ee93375872 * analyze_sigfe: New script.
* dllfixdbg: Add copyright.
* gendef: Ditto.
* gendevices: Ditto.
* gentls_offsets: Ditto.
2006-03-01 20:20:22 +00:00
Christopher Faylor 3b1f276fca * cygthread.cc (cygthread::callfunc): Create ev as an auto-reset event so that
it will be reset by WaitFor*Object as appropriate.
(cygthread::stub): Ditto.
(cygthread::terminate_thread): Remove forced setting of thread termination.
2006-03-01 18:23:24 +00:00
Corinna Vinschen e817fd3c8b * include/sys/dirent.h (struct __DIR): Rename __d_unused to
__d_internal.
	* fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef".
	(d_dirname): Remove useless "struct".
	(d_cachepos): Ditto.
	(d_cache): Ditto.
	(class __DIR_mounts): New class, implementing mount point tracking
	for readdir.
	(d_mounts): New macro for easy access to __DIR_mounts structure.
	(fhandler_disk_file::opendir): Allocate __DIR_mounts structure and
	let __d_internal element of dir point to it.
	(fhandler_disk_file::readdir_helper): Add mount points in the current
	directory, which don't have a real directory backing them.
	Don't generate an inode number for /dev.  Add comment, why.
	(fhandler_disk_file::readdir): Move filling fname to an earlier point.
	Check if current entry is a mount point and evaluate correct inode
	number for it.
	(fhandler_disk_file::readdir_9x): Ditto.
	(fhandler_disk_file::rewinddir): Set all mount points in this directory
	to "not found" so that they are listed again after calling rewinddir().
	(fhandler_disk_file::closedir): Deallocate __DIR_mounts structure.
	* path.cc (mount_info::get_mounts_here): New method to evaluate a list
	of mount points in a given parent directory.
	* shared_info.h (class mount_info): Declare get_mounts_here.
2006-03-01 13:47:49 +00:00
Corinna Vinschen b7d7223947 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive
instead of isspecial.
	* path.h (path_conv::iscygdrive): New method.
2006-02-28 20:26:52 +00:00
Christopher Faylor d405630e71 * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check since
some cygwin functions are meant to be interrupted.
2006-02-28 20:02:16 +00:00
Corinna Vinschen 6fb7c8ae78 * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.
* include/cygwin/version.h: Bump API minor number to 155.
2006-02-28 15:32:48 +00:00
Corinna Vinschen 5d93840135 * dir.cc (readdir_worker): Use slash as path separator when evaluating
namehash for paths below /proc.
	* fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
	inode number evaluation on share names.
2006-02-28 12:20:11 +00:00
Christopher Faylor 4f1558d132 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set d_cachepos
under NT or suffer memory corruption.
(fhandler_disk_file::readdir_helper): Avoid else with a return.  Just calculate
extension location once when doing symlink checks.
(fhandler_disk_file::readdir): Make debug output more useful.
(fhandler_disk_file::readdir_9x): Ditto.  Eliminate redundant variable.
2006-02-28 04:23:17 +00:00
Christopher Faylor 6a7a2f4bbe * include/sys/termios.h (cfsetispeed): Just define as a function rather than
resorting to a macro.
(cfsetospeed): Ditto.
2006-02-28 01:31:04 +00:00
Christopher Faylor f6f3b1ee46 * sigproc.cc: Fix a comment. 2006-02-28 01:28:28 +00:00
Christopher Faylor e41ff6093e * cygthread.cc (cygthread::release): Add a comment. 2006-02-28 01:27:41 +00:00
Corinna Vinschen 47a5b664e5 * fhandler_netdrive.cc (fhandler_netdrive::fstat): Create unambiguous
inode number.
	(fhandler_netdrive::readdir): Ditto.
2006-02-27 17:46:29 +00:00
Christopher Faylor ad37df4814 * sigproc.cc (sigheld): Define new variable.
(sig_dispatch_pending): Don't check sigq since that's racy.
(sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if __SIGNOHOLD
is specified.  Ignore flush signals if we're holding signals.
2006-02-24 21:40:28 +00:00
Christopher Faylor 1b845df5ac * cygwin.din (_exit): Use signal front end.
(exit): Ditto.
2006-02-24 02:08:56 +00:00
Christopher Faylor 7fbfec2b64 * winsup.h (cygwin_hmodule): Declare.
* exceptions.cc (inside_kernel): Reverse return values to reflect function
name.  Return true if we're in cygwin1.dll or if we're executing in dll_entry.
(_cygtls::interrupt_now): Reflect reversal of inside_kernel return value.
* hookapi.cc (cygwin_hmodule): Remove declaration.
* init.cc (dll_entry): Use in_dllentry global to record that we are executing
in dllentry.
2006-02-23 19:21:21 +00:00
Corinna Vinschen 2eecb0478c * exceptions.cc (_cygtls::interrupt_now): Reorder conditional
to call inside_kernel only if this isn't locked.
2006-02-22 17:06:14 +00:00
Corinna Vinschen b65479ca2e * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES to
access flags in case of query_read_control case, add FILE_READ_DATA
	in case of query_stat_control.
2006-02-22 16:40:42 +00:00
Danny Smith f41c4c7ced * include/ddk/ntifs,h (FILE_ID_FULL_DIRECTORY_INFORMATION): Revert
last change.
	Remove file level #pragma pack(push,4)/#pragma pop.
2006-02-21 08:28:01 +00:00
Christopher Faylor 8aaf07c7a2 fix typo 2006-02-20 16:26:16 +00:00
Christopher Faylor 0a5f931a43 * spawn.cc (av::fixup): Check for .bat and friends specifically now since these
extensions are no longer automatically detected.
2006-02-20 16:15:51 +00:00
Christopher Faylor badc494165 revert erroneous checkin 2006-02-20 02:06:37 +00:00
Christopher Faylor a339c989c7 * exceptions.cc (stackdump): Avoid dumping more than once. 2006-02-20 02:04:31 +00:00
Christopher Faylor 6d61866578 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile to open
the directory.
(fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status represents
success.
2006-02-19 21:18:36 +00:00
Corinna Vinschen 84a447aa08 * include/ddk/ntifs.h (FILE_ID_FULL_DIRECTORY_INFORMATION): Add filler
value to force correct alignment.
2006-02-19 10:56:20 +00:00
Danny Smith 25109ea7f3 * include/commctrl.h (LPNMLVCACHEHINT): Correct spelling.
Thanks to: Sebastian Pipping <hartwork at users dot sf dot net>
	(PNM_CACHEHINT): Add backward compatibilty define.
	(LPNM_CACHEHINT): Likewise.
2006-02-19 09:22:00 +00:00
Corinna Vinschen d4e9248df3 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop generating
path_conv for root.
2006-02-19 08:34:25 +00:00
Corinna Vinschen 408b92dbb5 * fhandler_disk_file.cc (FS_IS_SAMBA): Move out of
path_conv::hasgood_inode.
	(path_conv::is_samba): New method.
	(fhandler_base::fstat_by_handle): Don't even try to use
	FileIdBothDirectoryInformation on Samba.
	* path.h (class path_conv): Declare is_samba method.
2006-02-18 10:46:53 +00:00
Christopher Faylor 753702223c * path.cc (conv_path_list): Eat empty paths when converting to POSIX.
(cygwin_conv_to_win32_path): Deal with Cygwin's necessity of adding a '/' to
the end of a path ending in '.'.
2006-02-17 20:12:11 +00:00
Corinna Vinschen 4fc92aa730 * cygpath.cc (get_long_name): Load GetLongPathNameA instead of incorrect
GetLongPathName.
	(doit): Create mixed filename after converting to short or long pathname
	respectively.
2006-02-17 12:17:47 +00:00
Corinna Vinschen 32410d2175 * ps.cc (main): Set aflag if -p option is given. 2006-02-17 11:16:23 +00:00
Corinna Vinschen c6e48b1cd1 * cygwin.din: Export sigignore and sigset.
* exceptions.cc (sigset): New function.
	(sigignore): New function.
	* include/cygwin/signal.h (SIG_HOLD): Define.
	(sigignore): Declare.
	(sigset): Declare.
	* include/cygwin/version.h: Bump API minor number to 154.
2006-02-16 18:21:49 +00:00
Corinna Vinschen df4f13b723 * ps.cc (longopts): Add --process option.
(opts): Add -p option.
	(usage): Mention -p/--process option.
	(main): Handle -p option.
	* utils.sgml: Describe -p/--process option.
2006-02-16 11:17:19 +00:00
Christopher Faylor 5e8b96517c minor comment restructuring 2006-02-15 22:11:13 +00:00
Corinna Vinschen 96a4362c92 * regtool.cc (usage): Clarify help for "-K". 2006-02-15 10:57:17 +00:00
Christopher Faylor 49bc9a6939 * include/mntent.h: Add missing #include. 2006-02-13 19:01:32 +00:00
Christopher Faylor 462c98e96a * gentls_offsets: Fix typo in error message. 2006-02-13 18:59:01 +00:00
Earnie Boyd 3801e59ad8 2006-02-13 Earnie Boyd <earnie@users.sf.net>
* Makefile.in (libmsvcr80.a): Add import lib.
	(libmsvcr80d.a): Ditto.
2006-02-13 13:33:07 +00:00
Christopher Faylor 472130e897 * fhandler_process.cc (format_process_stat): Use cygwin-derived start time even
on NT since it is the logical start time of the "process".
* pinfo.cc (set_myself): Don't set start time when it should have already been
set previously.
2006-02-11 04:53:14 +00:00
Christopher Faylor 5a8a5efcfd revert previously applied patch. 2006-02-11 00:07:43 +00:00
Christopher Faylor 7f8c7bff6f * times.cc (clock_getres): Use correct conversion from milliseconds to
seconds/nanoseconds.
(clock_setres): Use correct conversion to nanoseconds.
2006-02-11 00:06:50 +00:00
Christopher Faylor 9a08fd5a50 * external.cc (sync_winenv): Rename from "setup_winenv". Use same mechanism as
spawn to determine environment variables which should be converted back to
windows form.
(cygwin_internal): Reflect setup_winenv -> sync_winenv name change.
* include/sys/cygwin.h: Ditto.
2006-02-10 17:22:34 +00:00
Corinna Vinschen 30f1c8a675 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
the dirent_get_d_ino flag on filesystems having useful File IDs.
	Add comment explaining why.
2006-02-09 14:42:48 +00:00
Corinna Vinschen 9d1c0a6053 * cygcheck.cc (find_on_path): Update copyright text. 2006-02-08 14:19:40 +00:00
Corinna Vinschen e699adfce5 * cygcheck.cc (find_on_path): Create copy of rv on successful access
check, since rv can be reused in subsequent calls.
2006-02-08 14:13:28 +00:00
Corinna Vinschen 03a49a00ab * dtable.cc (handle_to_fn): Accomodate new argument order in call to
sys_wcstombs.
	* fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs
	instead of just wcstombs to accomodate OEM codepages.
	* miscfuncs.cc (sys_wcstombs): Split len argument in source and target
	length.  Always 0-terminate result in target string.
	* security.cc (lsa2wchar): Remove unused function.
	(lsa2str): Ditto.
	(get_lsa_srv_inf): Ditto.
	(get_logon_server): Accomodate new argument order in call to
	sys_wcstombs.
	(get_user_groups): Ditto.
	(get_user_local_groups): Ditto.
	(get_priv_list): Call sys_wcstombs directly instead of lsa2str.
	* uinfo.cc (cygheap_user::ontherange): Accomodate new argument order
	in call to sys_wcstombs.
	* winsup.h (sys_wcstombs): Change prototype to match new argument order.
2006-02-07 15:49:08 +00:00
Corinna Vinschen 3cb155a97f * init.cc (respawn_wow64_process): Exit with the exit code returned
by the respawned process.
2006-02-07 09:57:43 +00:00
Danny Smith 3d1172c133 2006-02-04 Ron Lee <ronl@users.sourceforge.net>
* include/winnls.h: Remove stray end ';' from preprocessor defines.
2006-02-06 22:05:09 +00:00
Chris Sutcliffe 7420667afb Fixed ChangeLog entry 2006-02-06 20:29:17 +00:00
Chris Sutcliffe f6e3104d09 2006-02-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shlobj.h (PRF_VERIFYEXISTS, PRF_TRYPROGRAMEXTENSIONS,
	PRF_FIRSTDIRDEF, PRF_DONTFINDLNK): Ditto.
	* lib/shell32.def (PathResolve): Define.
2006-02-06 20:27:01 +00:00
Christopher Faylor ede6ae5059 * include/shlobj.h (PathResolve): Fix typo. 2006-02-06 19:59:43 +00:00
Christopher Faylor 985d0e68c5 Always zero all elements of siginfo_t throughout.
* cygtls.h (_cygtls::thread_context): Declare new field.
(_cygtls::thread_id): Ditto.
(_cygtls::signal_exit): Move into this class.
(_cygtls::copy_context): Declare new function.
(_cygtls::signal_debugger): Ditto.
* cygtls.cc (_cygtls::init_thread): Fill out thread id field.
* exceptions.cc (exception): Change message when exception info is unknown.
Copy context to thread local storage.
(_cygtls::handle_exceptions): Avoid double test for fault_guarded.  Reflect
move of signal_exit to _cygtls class.
(sigpacket::process): Copy context to thread local storage.
(_cygtls::signal_exit): Move to _cygtls class.  Call signal_debugger to notify
debugger of exiting signal (WIP).  Call stackdump here (WIP).
(_cygtls::copy_context): Define new function.
(_cygtls::signal_debugger): Ditto.
* tlsoffsets.h: Regenerate.
* include/cygwin.h (_fpstate): New internal structure.
(ucontext): Declare new structure (WIP).
(__COPY_CONTEXT_SIZE): New define.
* exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field when there
is no sigwaiting thread.
(setup_handler): Move event handling into interrupt_setup.
2006-02-06 18:24:11 +00:00
Corinna Vinschen 125ff9be63 * fhandler_socket.cc (fhandler_socket::connect): Fix formatting.
(fhandler_socket::wait): Handle SA_RESTART when signal arrives.
2006-02-06 17:50:23 +00:00
Chris Sutcliffe 22ebea31c8 2006-02-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shlobj.h (PathResolve): Define.
2006-02-06 16:29:15 +00:00
Corinna Vinschen 29b3c9cc3e * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning. 2006-02-06 10:01:37 +00:00
Corinna Vinschen 6da41754a4 * include/features.h: Add comment to explain what's going to happen
here at one point.
	* include/sys/stdio.h: Guard getline and getdelim prototypes with
	_GNU_SOURCE to avoid collision with old-style declarations.
2006-02-05 20:30:24 +00:00
Corinna Vinschen 6fc6eeae96 * cygwinenv.sgml: Explain transparent_exe option. 2006-02-05 18:19:16 +00:00
Corinna Vinschen fbae2bf864 * environ.cc (struct parse_thing): Add transparent_exe option.
* fhandler_disk_file.cc (fhandler_disk_file::link): Accomodate
	transparent_exe option.  Add .exe suffix for links to executable files,
	if transparent_exe is set.
	* fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe
	suffix if transparent_exe option is set.
	* path.cc (symlink_worker): Accomodate transparent_exe option.
	(realpath): Don't tack on .exe suffix if transparent_exe is set.
	* syscalls.cc (transparent_exe): New global variable.
	(unlink): Accomodate transparent_exe option.
	(open): Ditto.
	(link): Ditto.
	(rename): Ditto. Maybe add .exe suffix when renaming executable files.
	(pathconf): Accomodate transparent_exe option.
	* winsup.h: Declare transparent_exe.
2006-02-05 18:18:02 +00:00
Corinna Vinschen 0913522dbd * fhandler_disk_file.cc (fhandler_disk_file::readdir_9x): Remove
useless code.
2006-02-05 18:11:03 +00:00
Corinna Vinschen da3374d695 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
"out".  Move test for NULL __handle ...
	(fhandler_disk_file::rewinddir_9x): ... here.
2006-02-05 11:17:03 +00:00
Corinna Vinschen a80fb27643 ... and the ChangeLog, never forget the ChangeLog... 2006-02-05 10:55:59 +00:00
Corinna Vinschen 0856c0bb2c * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags. 2006-02-05 10:55:23 +00:00
Christopher Faylor c6e665bb95 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Don't close dir handle
when we hit EOF since rewwindir may reactivate it.
(fhandler_disk_file::readdir_9x): Eliminate superfluous temporary variable.
(fhandler_disk_file::closedir): Return EBADF when trying to close unopened DIR.
Reorganize slightly.  Return actual derived error value rather than always
returning 0.
2006-02-05 07:03:24 +00:00
Danny Smith dcbaac9b8c 2006-02-04 Ron Lee <ronl@users.sourceforge.net>
* include/winnls.h: Remove stray end ';' from preprocessor defines.
2006-02-04 19:35:46 +00:00
Christopher Faylor 25bafd7b0e * dir.cc (rmdir): Reorganize check for trailing dot to return correct error
when directory does not exist.
2006-02-04 19:02:42 +00:00
Christopher Faylor 324ce34bd5 * dir.cc (mkdir): Reorganize check for trailing dot to return correct error
when directory exists.
* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Remove special test for
path ending in '.'.
2006-02-04 04:31:34 +00:00
Corinna Vinschen 1912201029 * path.cc (suffix_scan::lnk_match): Return true beginning with
SCAN_APPENDLNK.
	(suffix_scan::next): Rearrange code to make .lnk append order slightly
	more deterministic.
	* spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
	evaluation with stat_suffixes.
	(dll_suffixes): Ditto.
2006-02-03 21:33:09 +00:00
Christopher Faylor d6b2195f1c * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor 153. 2006-02-02 23:16:26 +00:00
Corinna Vinschen c0b0336f36 * cygwin.din (updwtmpx): Export.
* syscalls.cc (updwtmpx): New function.
	* include/utmpx.h (updwtmpx): Declare.
	* include/cygwin/version.h: Bump API minor number to 153.
2006-02-02 22:46:37 +00:00
Christopher Faylor 6577c186c9 * external.cc (setup_winenv): New function.
(cygwin_internal): Implement CW_SETUP_WINENV.
* sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
2006-02-02 19:55:45 +00:00
Corinna Vinschen bb6f800d18 * security.cc (is_group_member): Fix comment. 2006-02-02 11:35:52 +00:00
Corinna Vinschen 49e803c0b6 * security.cc (is_group_member): Use local group info type 1. Test
group for being a global group or a well-known SID before adding it
	to the group list.  Add comment.
2006-02-02 11:22:10 +00:00
Joshua Daniel Franklin 1f602210ea Mention new cygcheck -p option. 2006-02-02 04:45:25 +00:00
Danny Smith d3d854b759 * lib/iphlpapi.def: (NotifyAddrChange@8): Define.
Reported by: Daniel Atallah  <datallah at users dot sf dot net>
	(NotifyRouteChange@8): Define.
2006-02-02 04:26:18 +00:00
Corinna Vinschen 0ee535ccb1 * autoload.cc (GetTcpTable): Define.
* fhandler_socket.cc (address_in_use): New function to check if
	sockaddr_in address is already in use.
	(fhandler_socket::bind): Check if address is alreay in use in case of
	SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
2006-02-01 11:10:53 +00:00
Corinna Vinschen 0ca697dde1 * spawn.cc (dll_suffixes): Add .exe and "no suffix" to the list. 2006-02-01 08:44:15 +00:00
Corinna Vinschen 4b84e3dcea * dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
* path.h (enum fe_types): Add FE_DLL value.
	* spawn.cc (std_suffixes): Remove.
	(exe_suffixes): New suffix_info for executing files.
	(dll_suffixes): New suffix_info for searching shared libraries.
	(perhaps_suffix): Add opt argument.  Use dll_suffixes if FE_DLL
	option is given, exe_suffixes otherwise.
	(find_exec): Propagate opt argument to perhaps_suffix.  Drop suffix
	check when testing execute permission.
	(spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
2006-01-31 21:49:39 +00:00
Christopher Faylor fd34affe5d * spawn.cc (av::fixup): Remove unused argument.
(spawn_guts): Remove capitalization in debugging.
2006-01-31 21:23:57 +00:00
Corinna Vinschen 0ad7b0eb02 * spawn.cc (find_exec): Only return files with execute permission set
if ntsec is on.  Don't check execute permission of Windows batch files.
	(av::fixup): Handle empty files gracefully.  Drop execute permission
	test here.
	* path.cc (suffix_scan::next): Don't skip any suffix on first run.
2006-01-31 21:09:43 +00:00
Corinna Vinschen 63a149a18f * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno. 2006-01-31 16:10:29 +00:00
Corinna Vinschen 735229ff4f * path.cc (cwdstuff::set): When SetCurrentDirectory returns
ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND.  Add
	comment to explain why.
2006-01-31 14:43:37 +00:00
Corinna Vinschen 832dd7e69f * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
* include/cygwin/version.h: Bump API minor number to 152.
	(CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
2006-01-31 08:56:22 +00:00
Corinna Vinschen ca986c6bf8 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify
conditional.
2006-01-30 13:44:16 +00:00
Corinna Vinschen 5c25715276 * fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
clearly from __d_position.  Change throughout.
	(fhandler_disk_file::rewinddir): Reset readdir cache on NT.
2006-01-30 10:30:58 +00:00
Christopher Faylor 2d8319b7e1 * CYGWIN_LICENSE: Restrict to v2.
* COPYING: Add.
2006-01-29 18:06:24 +00:00
Christopher Faylor d64c96f0f5 v2 only 2006-01-29 18:05:00 +00:00
Corinna Vinschen edde4d4daf * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks. 2006-01-29 17:29:35 +00:00
Corinna Vinschen 5369605f4f * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
* fhandler_socket.cc (fhandler_socket::bind): Set socket to
	SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
	socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
	* net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
	if SO_REUSEADDR socket option has been successsfully set.
	* wincap.h (wincaps::has_exclusiveaddruse): New element.
	* wincap.cc: Implement above element throughout.
2006-01-29 12:23:44 +00:00
Danny Smith 74d3f96faa * include/winsock2.h (WINSOCK_API_LINKAGE): Define. Add to
prototypes.
2006-01-29 00:52:35 +00:00
Danny Smith 0d80558dc4 * include/winnt.h (FORCEINLINE): Define. 2006-01-29 00:33:21 +00:00
Corinna Vinschen b8670a4764 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
check for existance explicitely and set errno to EEXIST.
2006-01-28 13:59:39 +00:00
Corinna Vinschen 7ab59dee94 * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
minimum number of dir entries which fit into the readdir cache.
	(DIR_BUF_SIZE): Define globally as size of readdir cache.
	(struct __DIR_cache): New structure used for readdir caching on NT.
	(d_dirname): Accessor for struct __DIR_cache, use throughout.
	(d_pos): Ditto.
	(d_cache): Ditto.
	(fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
	cache on NT.
	(fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
	Implement readdir caching.
2006-01-28 13:41:22 +00:00
Corinna Vinschen fa3ffdd01a * include/sys/dirent.h (struct dirent): Revert misguided attempt to
rename __d_unused1 to __d_fd.
2006-01-28 10:34:11 +00:00
Joshua Daniel Franklin acfdfc9ffb Move cocom to the build requirements. 2006-01-28 02:12:32 +00:00
Corinna Vinschen 9e5f45ed6f * autoload.cc (NtQueryDirectoryFile): Define.
* dir.cc (__opendir_with_d_ino): Just call opendir.
	(opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
	(readdir_worker): Only try generating d_ino if it's 0.
	Utilize namehash of directories fhandler.  Call readdir_get_ino to
	generate d_ino for "..".
	(seekdir64): Keep dirent_set_d_ino flag.
	* fhandler.h (enum dirent_states): Add dirent_get_d_ino.
	(class fhandler_disk_file): Declare new private methods readdir_helper
	and readdir_9x.
	* fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
	evaluate if a filesystem has reliable inode numbers.
	(fhandler_base::fstat_by_handle): Accomodate structure member name
	change from IndexNumber to FileId.
	(fhandler_base::fstat_helper): Call hasgood_inode here.
	(fhandler_disk_file::opendir): Call fhaccess only for real files.
	Don't append '*' to __d_dirname here, move to readdir_9x.  On NT,
	open directory handle here.  Set dirent_get_d_ino and dirent_set_d_ino
	flags according to wincap and filesystem.
	(fhandler_disk_file::readdir_helper): New method to implement readdir
	postprocessing only once.
	(readdir_get_ino_by_handle): New static function.
	(readdir_get_ino): New function to centralize inode number evaluation
	in case inode number hasn't been returned by NtQueryDirectoryFile.
	(fhandler_disk_file::readdir): Move old functionality to readdir_9x.
	Call readdir_9x when on 9x/Me.  Implement NT specific readdir here.
	(fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
	(fhandler_disk_file::seekdir): Accomodate new NT readdir method.
	(fhandler_disk_file::closedir): Ditto.
	(fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
	(fhandler_cygdrive::opendir): Call get_namehash to prepare later
	correct evaluation of d_ino.
	(fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
	drive's d_ino by calling readdir_get_ino.
	* fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
	dirent_saw_dot_dot to avoid seeing . and .. entries twice.
	* fhandler_process.cc (fhandler_process::readdir): Ditto.
	* fhandler_registry.cc (fhandler_registry::readdir): Ditto.
	* ntdll.h (STATUS_INVALID_PARAMETER): New define.
	(STATUS_INVALID_LEVEL): New define.
	(struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
	FileId (as in Nebbitt).
	* path.h (path_conv::hasgood_inode): Now implemented in
	fhandler_disk_file.cc.
	* wincap.h (wincaps::has_fileid_dirinfo): New element.
	* wincap.cc: Implement above element throughout.
	* winsup.h (readdir_get_ino): Add declaration.
	* include/sys/dirent.h (struct dirent): Slightly rename structure
	members to accomodate changes.
	Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
	__opendir_with_d_ino.
2006-01-27 21:50:42 +00:00
Christopher Faylor e7a9c71d62 * spawn.cc (spawn_guts): Fix potential handle leak when failing exec. 2006-01-27 06:08:05 +00:00
Christopher Faylor e1bfb483ea * exceptions.cc (inside_kernel): Fix to return true if we can't get the name of
the DLL for the given memory block since we are not in kernel code.
2006-01-27 06:06:06 +00:00
Joshua Daniel Franklin 90c01ac9df Add top-level README 2006-01-27 05:37:13 +00:00
Joshua Daniel Franklin aba373611c * faq-programming.xml (faq.programming.ipc): Add new FAQ about
cygserver and its relation to the "Bad system call" error.
* faq-setup.xml (faq.setup.uninstall-all): Mention postgresql.
* overview2.sgml: Update security info on shared memory.
2006-01-27 04:52:16 +00:00
Corinna Vinschen 50a7955aa6 * fhandler.cc (fhandler_base::open): Fix bug in argument order to
InitializeObjectAttributes call.
2006-01-26 16:58:53 +00:00
Joshua Daniel Franklin 2ceb32d95a * faq-programming.xml (faq.programming.building-cygwin): Add
list of packages required for building and exact check instructions.
* faq-setup.xml (faq.setup.uninstall-service): New instructions
on uninstalling a cygwin service.
(faq.setup.uninstall-all): Reference new service uninstall FAQ.
2006-01-26 04:39:04 +00:00
Christopher Faylor 4207eed323 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
dirent_isroot to use the correct boolean operator.
2006-01-26 02:54:54 +00:00
Danny Smith c40776e5a2 * include/winnt.h (DECLSPEC_SELECTANY): Define. 2006-01-26 01:55:39 +00:00
Danny Smith a62ec6b340 2006-01-25 Filip Navara <xnavara@volny.cz>
* include/winnt.h (DECLSPEC_ALIGN): Define.
2006-01-26 01:22:07 +00:00
Corinna Vinschen 6fbc5c2a9b * faq-setup.xml (faq.setup.snapshots): Rename DLL using Windows tools. 2006-01-25 10:57:19 +00:00
Christopher Faylor 742e27bed8 * ntdll.h: (temporarily?) Add more functions for querying directory. 2006-01-25 05:57:20 +00:00
Christopher Faylor aac74926dd * dir.cc (readdir_worker): Turn off expensive inode calculation. 2006-01-24 19:03:20 +00:00
Corinna Vinschen 4aac2d2709 * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
stripping the .exe suffix from the link target in PROCESS_EXE and
	PROCESS_EXENAME case.
	* path.cc (realpath): Tack on .exe suffix if necessary.
2006-01-24 17:40:55 +00:00
Corinna Vinschen 26d27a276f * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
to determine remote file systems with reliable inode numbers.  Add
	longish comment.
2006-01-24 12:32:33 +00:00
Danny Smith 3784b87b32 * include/commctrl.h: Correct spelling of 'compatibility' in
comments.
	* include/setupapi.h: Likewise.
	* include/ws2tcpip.h: Likewise.
2006-01-24 02:19:28 +00:00
Danny Smith e5e6a33128 2006-01-24 Danny Smith <dannysmith@users.sourceforge.net>
* include/ddk/winddk.h (KeGetCurrentKPCR): Support -masm=intel.

2006-01-24  Jiri Malak  <Jiri.Malak@iol.cz>

	WATCOM compatibility changes.
	* include/ddk/ntddk.h (DECL_IMPORT): Define using __declspec,
	rather than __attribute__.
	(DECL_EXPORT): Likewise.
	* include/ddk/winddk.h (DDKAPI): Avoid using __attribute__.
	(DDKFASTAPI): Likewise.
	(DDKCDECLAPI): Likwise.
	(KeGetCurrentKPCR): Provide __WATCOMC__ syntax for inline code.
2006-01-24 01:02:31 +00:00
Corinna Vinschen 543c43d84d * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
inheritance for duplicated socket.
2006-01-23 15:10:57 +00:00
Danny Smith cfd86743ff 2006-01-23 Brandon Sneed <brandon@redf.net>
* setupapi.def: Add all CM_* functions defined in ddk/cfgmgr32.h
	to exports.
2006-01-23 08:10:32 +00:00
Christopher Faylor d96d3ec910 . 2006-01-21 04:41:57 +00:00
Christopher Faylor 868fb2ff69 * include/cygwin/version.h: Bump API minor number to 151.
* dir.cc (__opendir_with_d_ino): New function.
(opendir): Set flag if we should be calculating inodes.
(readdir_worker): Calculate d_ino by calling stat if the user has asked for it.
(seekdir64): Maintain all persistent flag settings.
* fhandler.h (dirent_states): Add dirent_set_d_ino.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes to
dirent structure.
* fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
* include/sys/dirent.h (struct dirent): Coalesce two similar structures.
Remove all threads of the apparently highly confusing references to inodes.
Add support for calculating a real inode if __USE_EXPENSIVE_CYGWIN_D_INO is
defined.
2006-01-21 02:24:17 +00:00
Christopher Faylor 90e1ee2b25 * include/sys/dirent.h: Add comments for people who are REALLY confused about
whether they should be using something called __invalid_d_ino or not.
2006-01-20 16:04:40 +00:00
Corinna Vinschen 1ef48340d5 * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
(fhandler_socket::release): Add debug output for WSAEventSelect failure.
	(fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
	to blocking mode.  Only set nonblocking flag if ioctlsocket call
	succeeded.  Only print new socket state if ioctlsocket call succeeded.
2006-01-20 10:22:38 +00:00
Christopher Faylor 3c09c0fb25 * cygcheck.cc (common_paths): Add "patch". 2006-01-19 21:16:38 +00:00
Christopher Faylor 101b3cb01a * cygcheck.cc (init_paths): Record first_nonsys_path.
(find_on_path): Start on first nonsys path when !search_sysdirs.
2006-01-19 20:17:11 +00:00
Christopher Faylor ecd4fba273 white space 2006-01-19 18:57:41 +00:00
Christopher Faylor 7b55b34c5e * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path for
root rather than windows path.
2006-01-19 18:55:07 +00:00
Christopher Faylor 9025f2aa7d * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate name
change from __ino32 to __invalid_ino32.
* include/sys/dirent.h (__invalid_ino32): Rename from __ino32.  Don't define
unused d_type macros.
2006-01-19 05:34:39 +00:00
Joshua Daniel Franklin 96f5988e31 Remove references to and files from old texinfo FAQ. 2006-01-19 02:44:17 +00:00
Chris Sutcliffe 79e60dfa66 2006-01-18 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Bump cygwin build number.
2006-01-19 00:32:21 +00:00
Christopher Faylor d0236d66d9 * heap.cc (heap_init): Remove Sleep. 2006-01-18 20:40:52 +00:00
Corinna Vinschen 339306c5ec * net.cc (rresvport): Remove extern declaration. 2006-01-18 18:37:35 +00:00
Corinna Vinschen 06a5dd435e * autoload.cc (rresvport): Remove.
* net.cc (last_used_rrecvport): New global shared variable.
	(cygwin_rresvport): Implement rresvport without using rresvport from
	wsock32.
2006-01-18 18:24:33 +00:00
Christopher Faylor 25ef7a93b6 Wasn't going to check this in but since it did get checked in, here's a ChangeLog. 2006-01-18 16:11:53 +00:00
Christopher Faylor 14a4d5989a bad_keywords 2006-01-18 15:57:56 +00:00
Corinna Vinschen 3b5d71b3a2 * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
ss_family member name.
2006-01-18 15:37:23 +00:00
Dave Korn 79f24ec37d * cygpath.cc (dowin): Remove stray debugging printf statement. 2006-01-18 12:34:59 +00:00
Chris Sutcliffe 7c9feabf98 2006-01-17 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.6.
        * Makefile.in: Ditto.
2006-01-17 18:56:12 +00:00
Christopher Faylor 4d7c0b51bf copyright 2006-01-17 15:37:13 +00:00
Corinna Vinschen 3d7e89f8a2 * Makefile.in: Replace etcdir with sysconfdir. 2006-01-17 12:33:46 +00:00
Christopher Faylor 05ee4328f2 * include/cygwin/version.h: Bump DLL minor version number to 20. 2006-01-17 03:49:04 +00:00
Christopher Faylor 6ac6bb392a fix minor typo 2006-01-16 19:52:21 +00:00
Corinna Vinschen 95dc88409d * configure.in: Add AC_PROG_INSTALL handling.
* configure: Regenerate.
	* Makefile.in (install): Install CYGWIN_LICENSE.
2006-01-16 17:48:36 +00:00
Corinna Vinschen d0f3c2dd3b * CYGWIN_LICENSE: Fix contact information. 2006-01-16 14:57:34 +00:00
Corinna Vinschen 8581551218 * Makefile.in (cygcheck.exe): Do not link against libwininet.a.
* cygcheck.cc (pInternetCloseHandle): Define global function pointer.
	(display_internet_error): Use it.
	(package_grep): Attempt to load wininet.dll at runtime.  Call WinInet
	API through function pointers throughout.
2006-01-15 09:29:02 +00:00
Corinna Vinschen 053d5eed93 * cygcheck.cc (dump_sysinfo): Convert k32 to HMODULE. 2006-01-13 15:36:29 +00:00
Corinna Vinschen 71f98c4caa * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
member to see when running under WOW64.
2006-01-13 14:00:10 +00:00
Corinna Vinschen 67066cabad * cygcheck.cc (dump_sysinfo): Convert osname to const and remove casts
in subsequent assignments.  Recognize Longhorn/Vista and report as not
	yet supported.  Recognize when running under WOW64 and report native
	CPU type.  Slightly rearrange \n printing.
2006-01-13 13:39:05 +00:00
Corinna Vinschen 494139ffe3 * net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
Windows 2000 and above. Clarify the comment about IP_TOS and move
	to the place where the magic happens.
	(get_ifconf): Remove unused code.
	* wincap.h (wincaps::has_disabled_user_tos_setting): New element.
	* wincap.cc: Implement above element throughout.
2006-01-13 10:18:31 +00:00
Joshua Daniel Franklin b22830942a * faq-setup.xml (faq.setup.setup): Correct URL typo.
(faq.setup.snapshots): Clarify.
2006-01-13 03:55:23 +00:00
Christopher Faylor 951bd8e9f1 * cygcheck.cc: Replace ` with ' throughout. 2006-01-12 17:43:53 +00:00
Corinna Vinschen f68671330f * wincap.cc: New file.
* wincap.h: New file.
	* Makefile.in: Accomodate having our own wincap implementation now.
2006-01-12 16:59:15 +00:00
Corinna Vinschen 0ae86d187c * Update copyrights. 2006-01-12 15:53:51 +00:00
Corinna Vinschen d855cf1ec8 * doctool.c (scan_directory): Ignore "CVS" directories. 2006-01-12 11:31:55 +00:00
Christopher Faylor 9287bcd534 * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize ttys >=
0.
2006-01-12 05:17:12 +00:00
Christopher Faylor 750874d33d * fhandler.h (set_console_state_for_spawn): Whackamole the argument back to a
bool.
* spawn.cc (spawn_guts): Ditto, i.e., once again call
set_console_state_for_spawn with an indication of whether we're about to start
a cygwin process.
* fhandler_console.cc (set_console_state_for_spawn): Don't set the console
state if we know we're starting a cygwin process or if we're using a "real"
tty.
2006-01-12 05:03:15 +00:00
Christopher Faylor 9156ef9120 copyright 2006-01-12 04:52:51 +00:00
Christopher Faylor 904305952b copyright 2006-01-12 04:41:06 +00:00
Danny Smith 3683edc658 * include/wincrypt.h (WINADVAPI): Add to prototypes of
advapi32.dll functions.
2006-01-11 23:19:16 +00:00
Danny Smith cf8fbc710f * include/winsock2.h (struct sockaddr_storage): Use RFC 2553
names for padding size constants.
2006-01-11 22:56:05 +00:00
Danny Smith 16442a4a8f * include/aclapi.h (WINADVAPI): Add to prototypes.
* include/winreg.h (WINADVAPI): Likewise.
	* include/winsvc.h (WINADVAPI): Likewise.
2006-01-11 22:49:06 +00:00
Corinna Vinschen b773a592d3 * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
* init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
	Call wincap.init here before doing anything else.  Use wincap.is_wow64
	to determine if we're running in a WOW64 emulator.
	* mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
	apparently not supported.
	(mmap64): Don't create mappings beyond EOF, which would need to use
	AT_ROUND_TO_PAGE, on WOW64.
	* wincap.cc (wincap): Throw into the .cygwin_dll_common section.
	(wincapc::init): Determine if running in WOW64 and set wow_64 flag.
	* wincap.h (class wincapc): Add wow64 member.
	(wincapc::is_wow64): New method.
2006-01-10 18:11:32 +00:00
Christopher Faylor 23de77b72b * fhandler_proc.cc (format_proc_cpuinfo): Avoid leading whitespace in model
name.
2006-01-10 16:49:28 +00:00
Christopher Faylor 4c8650efd8 . 2006-01-10 14:49:20 +00:00
Christopher Faylor 5da5f949d8 * spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is done prior
to check for command.com/cmd.com.  Don't bother setting CREATE_SUSPENDED flag
for a MS-DOS process since it doesn't work anyway.  Avoid calling remember()
when the child process has already exited.
(av::fixup): Explicitly set cygexec flag to falseon a 16 bit process.
2006-01-10 02:39:22 +00:00
Corinna Vinschen e3786825c0 Check FreeBSD upstream changes and apply important patches.
* sysv_sem.cc (__semctl): Check copyin return value (from 1.76).
	* sysv_shm.cc (shminit): Actually use the iterating variable in the
	for loop when trying to avoid overflow (from 1.102).
2006-01-09 15:10:14 +00:00
Corinna Vinschen 104fffd24d * include/getopt.h (getopt_long_only): Declare. 2006-01-09 12:41:54 +00:00
Corinna Vinschen 6c5da6783c * cygwin.din: Export getsubopt.
* include/cygwin/version.h: Bump API minor version.
2006-01-09 12:37:08 +00:00
Christopher Faylor 0b7094d95d * fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controlling
terminal to a process when duped.  Linux doesn't do this, so we won't either.
2006-01-08 21:34:00 +00:00
Christopher Faylor 3e45d281b3 * environ.cc (spenvs[]): windir -> WINDIR. 2006-01-08 20:10:51 +00:00
Christopher Faylor b5c8e33120 * fhandler_console.cc (fhandler_console::need_invisible): Remove duplicate
test.
2006-01-07 18:00:19 +00:00
Christopher Faylor 85c804ec4b * fhandler.h (set_console_state_for_spawn): Eliminate argument from
declaration.
* fhandler.cc (set_console_state_for_spawn): Eliminate argument from
definition.  Always check for invisible console.
(fhandler_console::need_invisible): Don't do anything if the windows station is
already not visible.
* spawn.cc (spawn_guts): Accommodate change of argument to
set_console_state_for_spawn.
2006-01-07 17:57:26 +00:00
Christopher Faylor 1b00002744 * sigproc.cc (no_signals_available): Use existence of signal thread handle to
figure out if we can actually send signals rather than relying on my_sendsig.
(hwait_sig): Make static.
(sigproc_init): Don't set my_sendsig to anything special.  Use new global
static hwait_sig.
(wait_sig): Set hwait_sig to NULL when we are exiting.
2006-01-05 22:38:51 +00:00
Christopher Faylor 2ea1dced21 * cygcheck.cc (dump_sysinfo): Report the failing drive to prevent having to
guess.
2006-01-05 18:31:26 +00:00
Christopher Faylor b39b8c14fa * include/getopt.h: Accommodate recent unfortunate newlib changes. 2006-01-05 17:35:14 +00:00
Christopher Faylor 4cf4fd4d1c (fix ChangeLog and check in remaining files)
* sigproc.cc (sigproc_init): Move clearing of sync_startup here to lessen the
likelihood of trying to deal with non-cygwin threads in dll_entry.
* fhandler_console: Fix set_console_state_for_spawn comment.
2006-01-05 16:26:22 +00:00
Christopher Faylor 32f0697595 * cygtls.cc (_cygtls::remove): Don't output debugging info if this isn't a
cygwin thread.
2006-01-05 16:23:19 +00:00
Christopher Faylor c29df6c375 * spawn.cc (spawn_guts): Invert the argument to set_console_state_for_spawn. 2006-01-05 16:21:14 +00:00
Christopher Faylor 4c3faa85ce * fhandler_console.cc (fhandler_console::need_invisible): Only try to open
"CygwinInvisible" windows station if opening of default station fails.  Use
CloseWindowStation to close window station handle.
2006-01-05 03:58:19 +00:00
Christopher Faylor faec62caaf * fhandler_console.cc (fhandler_console::need_invisible): Open up the security
of the newly created windows station.
2006-01-05 00:49:17 +00:00
Danny Smith 4b2985b50b 2006-01-05 Michael Gerdau <mgd@technosis.de>
* include/winbase.h (WINADVAPI): Define.
2006-01-04 20:59:28 +00:00
Christopher Faylor 01b7635538 * path.cc (dot_special_chars): Add ", <, >, and |. 2006-01-04 16:20:30 +00:00
Christopher Faylor d58ca0b320 * fhandler_console.cc (beep): Use MB_OK which is documented as using the
default bell rather than -1 which seems to behave differently on different
versions of Windows.
2006-01-04 04:47:19 +00:00
Christopher Faylor 4c15746236 * fhandler_process.cc (fhandler_process::readdir): Add missing argument to
syscall_printf.
* fhandler_console.cc (fhandler_console::need_invisible): Use made-up name for
windows station rather than asking Windows to create one for us.
* spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2006-01-04 03:43:55 +00:00
Christopher Faylor a4b5f2b383 * include/winuser.h (CreateWindowStation): Correctly identify first argument as
constant.
(CreateWindowStation@): Ditto.
2006-01-04 03:42:18 +00:00
Christopher Faylor adcff8d159 * dir.cc (readdir_worker): Minor code cleanup.
* fhandler_console.cc (beep): Use a more Windows-generic wav file if the beep
is missing.  Use a more foolproof way to find out whether we should be
recreating the missing key.
* registry.h (reg_key::_disposition): New field.
(reg_key::created): New function.
* registry.cc (reg_key::reg_key): Set _disposition to zero by default.
(reg_key::build_key): Fill in _disposition field.
2006-01-03 17:44:26 +00:00
Christopher Faylor 825d0b9385 * dir.cc (readdir_worker): Ensure that saw_dot flags are updated when not
handling inodes.
2006-01-03 15:42:56 +00:00
Dimitri Papadopoulos 5d09b46dc3 * include/uxtheme.h [_WIN32_WINNT >= 0x0501]
(TMT_*, BT_*): Add constants.
2006-01-03 09:04:07 +00:00
Christopher Faylor e76625eadb * fhandler_console.cc (beep): New function. Restores missing "Default Beep",
if necessary.
(fhandler_console::write_normal): Use beep().
2006-01-03 01:15:29 +00:00
Christopher Faylor 29b35f7a84 * dcrt0.cc (_dll_crt0): Move more leftover debugging stuff.
(cygwin_dll_init): Remove unneeded initializations.  Call _dll_crt0 rather than
dll_crt0_1.
* dcrt0.cc (_dll_crt0): Move more leftover debugging stuff.
(cygwin_dll_init): Remove unneeded initializations.  Call _dll_crt0 rather than
dll_crt0_1.
2006-01-02 15:48:29 +00:00
Corinna Vinschen 8584a9df5f * syslog.cc: Include sys/un.h instead of sys/socket.h.
(syslogd_inited): Convert to enum type noting the exact result of
	trying to connect to syslog daemon.  Use this way throughout.
	(connect_syslogd): New static function taking over the task to
	connect to syslog socket.  Use correct struct sockaddr_un instead of
	struct sockaddr.
	(try_connect_syslogd): Call connect_syslogd.  If write fails on
	connection oriented socket, try to reconnect to syslog socket and
	try to write again.
2006-01-02 13:05:57 +00:00
Corinna Vinschen d05c10aecd Bump copyright dates. 2006-01-02 13:01:42 +00:00
Christopher Faylor 7f9832e774 * cygload/README: Delete.
* cygload/cygload.cc: Move to winsup.api.  Add comments from README.
* cygload/cygload.h: Move to winsup.api.
* cygload/cygload.exp: Move to winsup.api.
* Makefile.in: Remove cygload.
* winsup.api/winsup.exp: If a .exp file is detected, run it rather than using
standard compile.
* winsup.api/resethand.c (main): Use printf to print status or expect thinks
something is wrong.
2006-01-02 06:15:58 +00:00
Christopher Faylor b0b9ccf618 * winsup.api/resethand.c (main): Remove core dump flag from exit status. 2006-01-02 04:01:22 +00:00
Christopher Faylor 590129475b * winsup.api/resethand.c (main): Coerce argument to pointer to stop gcc
complaint.
2006-01-02 03:45:32 +00:00
Christopher Faylor 3bfd1c5e8c * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not started
from a cygwin process - just like the good-old-days of B20.
2006-01-02 03:14:56 +00:00
Christopher Faylor 68f62c98f9 add copyright 2006-01-02 02:57:54 +00:00
Christopher Faylor d0d1b89700 add missing ChangeLog entry 2006-01-02 02:55:50 +00:00
Christopher Faylor 7a32aefe79 * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which caused
this function to always return prematurely.
2006-01-02 02:55:14 +00:00
Christopher Faylor 74c29a5e9a * winsup.api/resethand.c: Use SIGSEGV for the signal to test. 2006-01-01 18:02:54 +00:00
Christopher Faylor 031d1aa40f * winsup.api/resethand.c: New file. 2006-01-01 17:26:52 +00:00
Christopher Faylor 4eab146fc7 * exceptions.cc (sigpacket::process): Pass actual reference to signal's
sigaction structure to setup_handler.
2006-01-01 17:15:01 +00:00
Christopher Faylor a14d65557a * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
* include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
* dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
2006-01-01 16:51:29 +00:00
Corinna Vinschen a89b700926 * syslog.cc (vklog): Never log kernel messages using the vsyslog
interface.
2006-01-01 16:17:55 +00:00
Corinna Vinschen cceba5593d * syslog.cc (vsyslog): Decrement len if trailing \n has been removed.
Add \n when writing to stderr if LOG_PERROR option is set.
2005-12-31 14:16:49 +00:00
Corinna Vinschen 1b68dd91cf * include/cygwin/in.h: Drop including stdint.h. Move definition
of in_port_t and in_addr_t to top of file and use throughout. Use
	sa_family_t type where appropriate.
	(struct in6_addr): Change `unsigned char' to `uint8_t'.
	(struct sockaddr_in6): Add sin6_scope_id member. Add comments.
	* include/cygwin/socket.h: Include stdint.h.  Move definition of
	socklen_t to top of file.  Define sa_family_t.  Define struct
	sockaddr_storage as per SUSv3.
	* include/sys/un.h: Include cygwin/socket.h.  Use sa_family_t type.
2005-12-31 13:07:43 +00:00
Corinna Vinschen cf2af34b70 * include/winsock2.h: Don't define struct sockaddr_storage when
building Cygwin.
2005-12-31 13:07:22 +00:00
Christopher Faylor b88d641c62 * relnotes.texinfo: Remove entry about hyperthreaded processor. 2005-12-30 19:28:26 +00:00
Christopher Faylor 2e99d150d4 * faq-problems.html: Remove entry about hyperthreaded processor. 2005-12-30 19:26:07 +00:00