Commit Graph

5941 Commits

Author SHA1 Message Date
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