Commit Graph

5900 Commits

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