Commit Graph

2933 Commits

Author SHA1 Message Date
Christopher Faylor d5de4b3f30 remove from trunk 2002-12-28 07:33:14 +00:00
Christopher Faylor d3bffb5b94 * Makefile.in: Add devices.gperf.
* devices.h: New file.
* devices.gperf: Ditto.
2002-12-28 07:15:13 +00:00
Christopher Faylor caf27c0155 * fhandler_termios.cc (fhandler_termios::line_edit): Perform echo before input
is accepted or suffer a "race".
2002-12-28 06:30:47 +00:00
Nathanael Nerode 92ed67dd7e Move ChangeLog entry from toplevel, where it didn't belong. 2002-12-27 23:27:00 +00:00
Christopher Faylor 66dcfc4498 * fhandler.h (fhandler_tty_master::set_winsize): Declare new function.
* fhandler_console.cc (fhandler_console::send_winch_maybe): If appropriate,
call tty master function to handle screen size change.
* fhandler_tty.cc (fhandler_tty_master::set_winsize): New function.
(fhandler_tty_master::init): Call set_winsize to set initial screen size.
2002-12-27 05:31:30 +00:00
Christopher Faylor 3bfed277d6 * fhandler_tty.cc (fhandler_tty_master::init): Set initial size of tty to that
of console in which tty is operating.
(process_input): Semi-revert previous change.  Need to just use current
terminfo settings since this function is running in a thread, blocked when the
terminfo changes.
2002-12-27 03:54:59 +00:00
Christopher Faylor 740c81ed4e correct typo 2002-12-27 03:50:57 +00:00
Christopher Faylor 46b73ef192 * fhandler.h (fhandler_termios::line_edit): Replace third argument with
passed-in termios struct.
* fhandler_console.cc (fhandler_console::read): Prior to loop, make a copy of
current termios for passing to line_edit prior so that all characters are
processed consistently.
* fhandler_tty.cc (fhandler_pty_master::write): Ditto.
(process_input): Make a copy of curent termios prior to read for use in
subsequent line_edit.
* fhandler_termios.cc (fhandler_termios::line_edit): Replace third parameter
with passed-in termios struct and use it throughout rather than the data from
the current fhandler_termios class.
2002-12-27 03:50:29 +00:00
Danny Smith 4a5c645e62 2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
* include/wingdi.h (DOCINFOA): Replace LPCTSTR with LPCSTR.
2002-12-26 10:51:13 +00:00
Danny Smith dfc7f86821 2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
* include/wingdi.h (BALTIC_CHARSET, JOHAB_CHARSET,
	VIETNAMESE_CHARSET): Remove duplicate defines.
	* lib/comctl32.def (ImageList_SetImageCount): Add stub.
2002-12-26 10:40:58 +00:00
Danny Smith 6e29a31e99 * include/dbt.h (DEV_BROADCAST_PORT): Add UNICODE version.
Thanks to: Dimitri Papadopoulos  <dimitri_at@sourceforge.users.net>
2002-12-26 05:21:43 +00:00
Danny Smith 177a7cda75 2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
* include/dde.h (PackDDElParam, UnpackDDElParam,FreeDDElParam,
	ReuseDDElParam): Use __WIN64 compatible typedefs.
2002-12-26 05:08:32 +00:00
Danny Smith aa6ad99be8 * include/unknwn.h: Include windows.h and ole2.h before header
guard to avoid circular inclusion of COM headers.
2002-12-26 05:05:46 +00:00
Danny Smith 832a8b19cd 2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
* include/accctrl.h (ACTRL_ACCESS_ENTRY[AW]): Make
	lpInheritProperty member const.
	(ACTRL_PROPERTY_ENTRY[AW]): Make lpProperty member
	const.
2002-12-26 04:34:47 +00:00
Danny Smith bdcc7be2bb * include/commcat.h: Don't include windows.h or ole2.h ifdef
COM_NO_WINDOWS_H.
	* include/unknwn.h: Ditto.
2002-12-26 04:23:57 +00:00
Danny Smith ebe02e1884 * include/imm.h (ImmGetCompositionFont[AW],
ImmSetCompositionFont[AW]): Add NOGDI guard.
2002-12-26 03:57:17 +00:00
Christopher Faylor c6c890e21a minor reformatting 2002-12-25 23:49:40 +00:00
Christopher Faylor 1091853afc * include/cygwin/version.h: Bump DLL minor number. 2002-12-25 23:39:04 +00:00
Christopher Faylor 088f471c75 * exceptions.cc (events_init): Initialize critical section to control exiting
via signal.
(signal_exit): Enter critical section early to avoid exit races with main
thread.
* dcrt0.cc (do_exit): Use exit_lock critical section to avoid races.
2002-12-25 20:33:21 +00:00
Christopher Faylor a8eb76e3e1 * cygthread.cc (cygthread::detach): Set errno with set_sig_errno so that EINTR
is properly restored after signal.
2002-12-25 17:43:37 +00:00
Christopher Faylor eb9d294f95 * Makefile.in: Default fhandler objects to -fomit-frame-pointer. Eliminate
redundant CFLAGS settings.
2002-12-21 05:06:37 +00:00
Christopher Faylor 4631168afc * Makefile.common: Don't attempt to pretty-print c++ errors. 2002-12-21 05:06:24 +00:00
Christopher Faylor b18962e228 * fhandler.h (line_edit_status): Reorganize so that tests for error condition
can be < or >.
* fhandler_tty.cc (fhandler_pty_master::write): Don't return after sending a
signal.
* fhandler_termios.cc (fhandler_termios::line_edit): Trivial change to use
built-in bool types.
2002-12-21 04:38:12 +00:00
Earnie Boyd 992b4c1edc * include/_mingw.h: Increment version to 2.4.
Makefile.in: Ditto.
2002-12-20 15:40:10 +00:00
Pierre Humblet 63f5d32954 2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
* localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname
        in the Cygwin specific part of the routine.
2002-12-20 03:40:00 +00:00
Pierre Humblet 3ace1da676 2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler.cc (fhandler_base::open): Use "flags" rather than "mode"
	in Win9X directory code.
2002-12-20 01:48:22 +00:00
Christopher Faylor 388aa9941b * fhandler.h (line_edit_status): Add a new element.
* fhandler_termios.cc (fhandler_termios::line_edit): After accept_input, handle
both potential error condition and pipe full conditions.
* fhandler_tty.cc (fhandler_pty_master::accept_input): Return -1 on error.
(fhandler_pty_master::write): Handle pipe full condition.
2002-12-20 01:38:55 +00:00
Christopher Faylor c3405ba93e * overview2.sgml: Remove CTRL-Z discussion.
* cygwinenv.sgml: Expand on CYGWIN=binmode.
2002-12-19 02:14:06 +00:00
Danny Smith 037c11e868 * include/ddk/hidusage.h: Remove unneccessary #pragma pack's.
* include/ddk/miniport.h (EMULATOR_PORT_ACCESS_TYPE): Define
	before using.
	(VIDEO_ACCESS_RANGE): Guard against prior definition.
	* include/ddk/minitape.h (INQUIRYDATA): Guard against prior
	definition.
	* include/ddk/ndis.h (DECLARE_UNKNOWN_PROTOTYPE): Correct macro.
	* include/ddk/ndisguid.h: Remove unneccessary #pragma pack's.
	* include/ddk/scsi.h (INQUIRYDATA): Guard against prior
	definition.
	* include/ddk/scsiwmi.h (GUID): Define if not already done.
	(LPCGUID): Likewise.
	* include/ddk/tdi.h: Close "Listen flags" comment.
	* include/ddk/tdistat.h: Remove unneccessary #pragma pack's.
	* include/ddk/video.h:	Add #pragma pack(push,4) to balance.
	(VIDEO_ACCESS_RANGE): Guard against prior definition.
	* include/ddk/videoagp.h:Add #pragma pack(push,4) to balance.
	* include/ddk/win2k.h: Likewise.
	* include/ddk/winddi.h: Likewise.
	* include/ddk/winddk.h: Likewise.
	* include/ddk/winnt4.h: Likewise.
	* include/ddk/ws2san.h: Likewise.
	* include/ddk/xfilter.h: Remove unbalanced #pragma pack(pop).
	* include/ddk/video.h: Don't process rest of file ifdef
	__WINDDI_H.
	* include/ddk/winddi.h: Don't process rest of file ifdef
	__VIDEO_H.
	* include/ddk/usb.h: Don't process rest of file ifdef
	__USBDI_H.
	* include/ddk/usbdi.h: Don't process rest of file ifdef
	__USB_H.
	* include/ddk/usbcamdi.h: Don't process rest of file if
	!defined(__USB_H) && !defined(__USBDI_H)
2002-12-19 01:34:26 +00:00
Danny Smith b0ae479f36 2002-12-18 James E. Lucas <xelloss@users.sourceforge.net>
* include/winnetwk.h (WNetResourceInformation[AW]): Correct
	prototypes.
	* include/winuser.h (GetAncestor) Add prototype.
	(GA_PARENT, GA_ROOT, GA_ROOTOWNER): Add defines.
	(EWX_FORCEIFHUNG): Add define for _WIN32_WINNT >= 0x0500.
	(SPI_GETACTIVEWINDOWTRACKING, SPI_GETACTIVEWNDTRKZORDER,
	SPI_GETACTIVEWNDTRKTIMEOUT, SPI_SETACTIVEWINDOWTRACKING
	SPI_SETACTIVEWNDTRKZORDER, SPI_SETACTIVEWNDTRKTIMEOUT): Add
	defines.
	* lib/user32.def (GetAncestor@8): Add stub.
2002-12-18 00:25:58 +00:00
Christopher Faylor b2be3149b4 * fhandler_termios.cc (fhandler_termios::line_edit): Return line_edit_error and
remove last char from readahead buffer if accept_input() fails.
* fhandler_tty.cc (fhandler_pty_master::accept_input): Return 0 and restore
readahead buffer when tty slave pipe is full.
2002-12-17 03:49:34 +00:00
Christopher Faylor 9ec7b58c62 * pinfo.cc (_pinfo::cmdline): Allocate sufficient space for myself command line
args.
2002-12-16 18:56:33 +00:00
Danny Smith ba1ff7c9b8 * include/windows.h: Guard inclusion of wingdi.h,
commdlg.h, winspool.h, ole2.h with NOGDI.
 	* include/winuser.h (ICONMETRICS, NONCLIENTMETRICS,
	ChangeDisplaySettings, CreateDesktop, EnumDisplaySettings):
	Guard with NOGDI.
2002-12-15 20:55:36 +00:00
Corinna Vinschen 2b3ddfcd26 * setfacl.c (main): Place a single : after other and mask.
* getfacl.c (getaclentry): Allow both : and :: for other and mask.
	(main): Remove extraneous break.
2002-12-15 10:09:35 +00:00
Christopher Faylor bd2001aec0 * fhandler_termios.cc (fhandler_termios::line_edit): Call accept_input() in
character processing loop.  Set return value independently of input_done.
2002-12-14 19:40:41 +00:00
Christopher Faylor 373c3857c2 * fhandler.cc (fhandler_base::read): Signal event, if necessary, and raw_read
hasn't done so.
2002-12-14 19:11:42 +00:00
Christopher Faylor 3627f682fe * fhandler.cc (fhandler_base::raw_read): Reset priorities to minimize window
where thread termination may cause data loss.
(fhandler_base::read): Always return at end of function.  Just set len to
copied_chars when len is zero.  Return immediately after raw_read if len <= 0.
Remove in_len setting and just check end instead.  Fix CRLF handling at end of
buffer.
2002-12-14 18:01:08 +00:00
Corinna Vinschen 85ecb9be00 2002-12-14 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (dll_crt0_1): Call well known SID initializer function.
	* security.h (cygsid::init): Declare new static method.
	* sec_helper.cc (cygsid::init): New method for initializing well
	known SIDs.

2002-12-14  Pierre Humblet  <pierre.humblet@ieee.org>

	* security.h: Declare well_known_creator_group_sid.
	* sec_helper.cc: Define and initialize well_known_creator_group_sid.
2002-12-14 17:23:42 +00:00
Corinna Vinschen b60e545bb6 * netdb.cc: Remove strtok_r comment. 2002-12-14 16:59:59 +00:00
Corinna Vinschen 6e8a0232df * security.cc (get_user_local_groups): Use LookupAccountSid to find the
local equivalent of BUILTIN.
2002-12-14 16:57:25 +00:00
Christopher Faylor 41dd227c2b * pipe.cc (make_pipe): Set fork fixup flag for read pipe. 2002-12-14 05:44:06 +00:00
Christopher Faylor ae31932c4f add FIXME 2002-12-14 05:10:18 +00:00
Christopher Faylor ba88622498 * winbase.h: Turn on inline versions of Interlocked* by default.
* winbase.h: Fixup inline asm functions.  Add ilockcmpexch.
2002-12-14 05:06:59 +00:00
Christopher Faylor 8bce0d723c Throughout, change fhandler_*::read and fhandler_*::raw_read to void functions
whose second arguments are both the lenght and the return value.
* fhandler.cc (fhandler_base::read): Rework slightly to use second argument as
input/output.  Tweak CRLF stuff.
(fhandler_base::readv): Accommodate fhandler_*::read changes.
* cygthread.h (cygthread::detach): Declare as taking optional handle argument.
(cygthread::detach): When given a handle argument, wait for the handle to be
signalled before waiting for thread to detach.  Return true when signal
detected.
2002-12-14 04:01:32 +00:00
Danny Smith 4adcb8724d 2002-12-12 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
* include/oleacc.h (SELFLAG_*): Change to enum.
2002-12-13 01:18:54 +00:00
Earnie Boyd 51e1a2f296 * include/malloc.h (_alloca): Add definition.
(alloca): Ditto.
2002-12-12 21:00:57 +00:00
Corinna Vinschen 24f7d30fa9 * Makefile.common: Define MINGW_LDFLAGS.
* configure.in: Reorder SUBDIRS to have mingw before cygwin.
	* configure: Regenerate from configure.in.
	* cygwin/Makefile.in: Add MINGW_LDFLAGS when linking cygrun.exe.
2002-12-12 10:34:12 +00:00
Danny Smith a6af7dbdc3 * include/shlobj.h (IShellLinkW::GetPath): Correct prototype. 2002-12-12 09:51:38 +00:00
Christopher Faylor 6d14741177 whitespace 2002-12-12 03:09:38 +00:00
Christopher Faylor 1d380f593a * cygthread.h (cygthread::stack_ptr): New element.
(cygthread::detach): Accept a "wait_for_signal" argument.
(cygthread::terminate_thread): New function.
* cygthread.cc (cygthread::stub): Set stack pointer argument.
(cygthread::terminate_thread): New function.  Forcibly terminate thread.
(cygthread::detach): Optionally wait for signals and kill thread when signal
arrives.
* exceptions.cc (signal_exit): Set signal_arrived prior to exiting to wake up
anything blocking on signals.
* fhandler.h (fhandler_base::set_r_no_interrupt): Change to accept bool
argument.
(fhandler_pipe::ready_for_read): Declare.
* pipe.cc (pipeargs): New structure.
(read_pipe): New thread stub wrapper for normal pipe read.
(fhandler_pipe::read): Modify to call reader in a cygthread, terminating on
signal, as appropriate.
* select.cc (fhandler_pipe::ready_for_read): Define new function.
2002-12-11 04:00:04 +00:00
Corinna Vinschen 231a60c73a * net.cc (free_protoent_ptr): Add missing free() for base structure.
(free_servent_pt): Ditto.
	(free_hostent_pt): Ditto.
2002-12-10 16:36:36 +00:00
Corinna Vinschen bb241345b1 * netdb.cc (parse_alias_list, parse_services_line)
(parse_protocol_line): Change strtok calls to strtok_r.
2002-12-10 13:27:15 +00:00
Corinna Vinschen d6ffc07588 2002-12-10 Pierre Humblet <pierre.humblet@ieee.org>
* pwdgrp.h (pwdgrp_check::pwdgrp_state): Replace by
	pwdgrp_check::isinitializing ().
	(pwdgrp_check::isinitializing): Create.
	* passwd.cc (grab_int): Change type to unsigned, use strtoul and
	set the pointer content to 0 if the field is invalid.
	(parse_pwd): Move validity test after getting pw_gid.
	(read_etc_passwd): Replace "passwd_state <= " by
	passwd_state::isinitializing ().
	(internal_getpwuid): Ditto.
	(internal_getpwnam): Ditto.
	(getpwent): Ditto.
	(getpass): Ditto.
	* grp.cc (parse_grp): Use strtoul for gr_gid and verify the validity.
	(read_etc_group): Replace "group_state <= " by
	group_state::isinitializing ().
	(internal_getgrgid): Ditto.
	(getgrent32): Ditto.
	(internal_getgrent): Ditto.

2002-12-10  Pierre Humblet <pierre.humblet@ieee.org>

	* security.h: Move declarations of internal_getgrent,
	internal_getpwsid and internal_getgrsid to pwdgrp.h.
	* pwdgrp.h: Declare internal_getpwsid, internal_getpwnam,
	internal_getpwuid, internal_getgrsid, internal_getgrgid,
	internal_getgrnam, internal_getgrent and internal_getgroups.
	Delete "emulated" from enum pwdgrp_state.
	(pwdgrp_check::isuninitialized): Create.
	(pwdgrp_check::pwdgrp_state): Change state to initializing
	rather than to uninitialized.
	(pwdgrp_read::gets): Remove trailing CRs.
	* passwd.cc (grab_string): Don't look for NLs.
	(grab_int): Ditto.
	(parse_pwd): Don't look for CRs. Return 0 if entry is too short.
	(search_for): Delete.
	(read_etc_passwd): Simplify tests to actually read the file.
	Set state to loaded before making internal_getpwXX calls.
	Replace search_for calls by equivalent internal_pwgetXX calls.
	(internal_getpwsid): Use passwd_state.isuninitialized to decide
	to call read_etc_passwd.
	(internal_getpwuid): Create.
	(internal_getpwnam): Create.
	(getpwuid32): Simply call internal_getpwuid.
	(getpwuid_r32): Call internal_getpwuid.
	(getpwnam): Simply call internal_getpwnam.
	(getpwnam_r): Call internal_getpwnam.
	* grp.cc (parse_grp): Don't look for CRs. Adjust blank space.
	(add_grp_line): Adjust blank space.
	(class group_lock): Ditto.
	(read_etc_group): Simplify tests to actually read the file.
	Set state to loaded before making internal_getgrXX calls.
	Replace getgrXX calls by equivalent internal calls.
	(internal_getgrsid): Use group_state.isuninitialized to decide
	to call read_etc_group.
	(internal_getgrgid): Create.
	(internal_getgrnam): Create.
	(getgroups32): Simply call internal_getgrgid.
	(getgrnam32): Simply call internal_getgrnam.
	(internal_getgrent): Call group_state.isuninitialized.
	(internal_getgroups): Create from the former getgroups32, using
	two of the four arguments. Set gid to myself->gid and username
	to cygheap->user.name ().
	(getgroups32): Simply call internal_getgroup.
	(getgroups): Call internal_getgroup instead of getgroups32.
	(setgroups32): Call internal versions of get{pw,gr}XX.
	* sec_helper.cc: Include pwdgrp.h.
	(is_grp_member): Call internal versions of get{pw,gr}XX.
	* security.cc: Include pwdgrp.h.
	(alloc_sd): Call internal versions of get{pw,gr}XX.
	* syscalls.cc: Include pwdgrp.h.
	(seteuid32): Call internal versions of get{pw,gr}XX.
	(setegid32): Ditto.
	* uinfo.cc: Include pwdgrp.h.
	(internal_getlogin): Call internal versions of get{pw,gr}XX.
	(cygheap_user::ontherange): Ditto.
	* sec_acl.cc: Include pwdgrp.h.
	(setacl): Call internal versions of get{pw,gr}XX.
	(acl_access): Ditto and simplify logic.
	(aclfromtext): Ditto.
2002-12-10 12:43:49 +00:00
Christopher Faylor 4b47fb2c3f correct date 2002-12-09 23:08:59 +00:00
Christopher Faylor b862c42198 * lib/pseudo-reloc.c: New file.
* lib/_cygwin_crt0_common.cc: Perform pseudo-relocs during initialization of
cygwin binary (.exe or .dll).
2002-12-09 22:49:12 +00:00
Danny Smith 97cc22ad06 * include/shellapi.h (ExtractIconEx[AW]): Correct return type
to UINT.
2002-12-09 01:51:27 +00:00
Danny Smith 009bcda6f9 * mingwex/math/s_erf.c: New file.
* mingwex/math/sf_erf.c: New file.
	* mingwex/Makefile.in (MATH_DISTFILES): Add new files.
	(MATH_OBJS): Add new objects.
	* include/math.h (erf[f]): Add prototypes.
	(erfc[f]): Add prototypes.
2002-12-08 01:46:42 +00:00
Danny Smith 4c49b9a2a5 * include/math.h: Add traditional/XOPEN math constants.
Add missing ChangeLog entry for 2002-11-27
2002-12-07 08:58:49 +00:00
Danny Smith e57ba5d3cd * include/winuser.h (AllowSetForegroundWindow,
LockSetForegroundWindow) Add prototypes.
	(ASFW_ANY, LSFW_LOCK, LSFW_UNLOCK) Add defines.
	Thanks to:  Pat Thoyts  <patthoyts@users.sourceforge.net>
	* lib/winuser.def (AllowSetForegroundWindow,
	LockSetForegroundWindow): Add stubs.
2002-12-07 07:23:41 +00:00
Christopher Faylor 2cc2e4e5ea fix date 2002-12-07 04:49:59 +00:00
Christopher Faylor 11b087d571 * cygwin.din: Reflect name change from strtodf to strtof. Export strtof.
* include/cygwin/version.h: Bump API minor number.
2002-12-06 19:48:03 +00:00
Danny Smith e25e377eb3 2002-12-06 Ken Fitlike <kenfitlike@users.sourceforge.net>
* include/commctrl.h (TN_GETDISPINFO[AW]): Add defines and
	UNICODE mappings.
	(tagNMTTDISPINFO[AW]): Replace obsolete struct names
	tagTOOLTIPTEXT[AW] and typedefs. Add defines for backward
	compatability. Add lParam field. Add UNICODE mappings for new
	names.
2002-12-06 04:13:31 +00:00
Christopher Faylor 49dd6fc61e * fhandler.h (fhandler_termios::line_edit): Change return from an int to an
enum to allow the function to return an error.
* fhandler_console.cc (fhandler_console::read): Update the line_edit call to
use the new enum.
* fhandler_termios.cc (fhandler_termios::line_edit): Change return from an int
to an enum to allow the function to return an error.  Put put_readahead call
before doecho for future patch.
* fhandler_tty.cc (fhandler_pty_master::write): Change to call line_edit one
character at a time, and stop if an error occurs.
2002-12-05 16:24:52 +00:00
Christopher Faylor 77c33bf2b9 fix comment 2002-12-04 20:46:16 +00:00
Christopher Faylor 838ad58232 * netdb.cc: New file.
* Makeile.in (DLL_OFILES): Add reference to the new netdb.cc file.
* cygwin.din : Add new aliased exports for service and protocol enumerations in
netdb.cc.
2002-12-04 20:44:17 +00:00
Corinna Vinschen 7453997e0e * cxx.cc: New file. Implement new, new[], delete and delete[]
operators and  __cxa_pure_virtual if compiled by gcc >=3.
	* Makefile.in (DLL_OFILES): Add cxx.o.
	Remove libstdc++.a from cygwin1.dll link step.
2002-12-04 20:36:23 +00:00
Danny Smith d0619aa715 2002-12-02 Andrew Stadt <acstadt@sympatico.ca>
* include/shellapi.h (_SHFILEOPSTRUCTA,_SHFILEOPSTRUCTW):
	Wrap with pshpack2.h/poppack.h to correct alignment.
2002-12-02 09:53:09 +00:00
Danny Smith c7ca0398dc 2002-12-02 Ken Fitlike <kenfitlike@users.sourceforge.net>
* include/commctrl.h (LVBKIF_*): Add defines.
	(LVM_SETIMAGE[AW]): Add defines and UNICODE mappings.
	(LVM_GETIMAGE[AW]): Add defines and UNICODE mappings.
	(LVBKIMAGE[AW]): Add defines and UNICODE mappings.
	(LPLVBKIMAGE[AW]): Add defines and UNICODE mappings.
	(LVM_GETBKIMAGE[AW]): Add defines and UNICODE mappings.
	(LVM_SETBKIMAGE[AW]): Add defines and UNICODE mappings.
	(ListView_GetBkImage): Add define.
	(ListView_SetBkImage): Add define.
	(LVBKIMAGE): Add structures and typedefs.
2002-12-02 09:50:03 +00:00
Christopher Faylor 4f96ae699c * fhandler_tty.cc (fhandler_pty_master::accept_input): Move read_retval
assignment to prevent race condition.  Remove read_retval from return
statement.
2002-11-30 22:23:01 +00:00
Christopher Faylor 883bbc6478 * pinfo.h (winpids::set): Renamed from init.
(winpids::init): New declaration.
(winpids::cs): Ditto.
(winpids::winpids): Use set rather than init.
* external.cc (fillout_pinfo): Ditto.
* dcrt0.cc (dll_crt0_1): Call winpids::init.
* pinfo.cc (winpids::set): Renamed from init.  Wrap calls in critical section.
(winpids::init): New function.
(winpids::cs): Define.
2002-11-29 07:05:26 +00:00
Christopher Faylor c0b813e500 * sigproc.cc (sig_dispatch_pending): Remove assertion. 2002-11-29 00:43:50 +00:00
Christopher Faylor ae799c9931 revert botched checkin 2002-11-28 00:41:02 +00:00
Christopher Faylor 7007fd238f * include/cygwin/version.h: Bump DLL minor number. 2002-11-28 00:40:20 +00:00
Christopher Faylor 50f4a61a36 * fhandler_socket.cc (fhandler_socket::sendto): Fix potential unitialized value
return.
2002-11-27 23:44:14 +00:00
Christopher Faylor cdaf88961d * cygwin.din: Export pthread_getsequence_np.
* include/cygwin/version.h: Bump API minor version.
2002-11-27 16:11:40 +00:00
Danny Smith dc8597f966 * mingwex/math/lgamma.c: New file.
* mingwex/math/lgammaf.c: New file.
	* mingwex/math/lgammal.c: New file.
	* mingwex/math/tgamma.c: New file.
	* mingwex/math/tgammaf.c: New file.
	* mingwex/math/tgammal.c: New file.
	* mingwex/math/cephes_mconf (polevlf): Add float version.
	(p1evlf): Likewise.
	Define _CEPHES_USE_ERRNO.
	* mingwex/Makefile.in (MATH_DISTFILES): Add new files.
	(MATH_OBJS): Add new objects.
	* include/math.h (lgamma[fl]): Add prototypes.
	(tgamma[fl]): Add prototypes.
2002-11-27 03:41:25 +00:00
Christopher Faylor eb6d2e2f9a white space 2002-11-27 02:26:44 +00:00
Christopher Faylor 05c728c45b * cygwin.din: Export nl_langinfo().
* include/cygwin/version.h: Bump API minor version.
2002-11-27 02:12:50 +00:00
Christopher Faylor b263d1d8d3 * fhandler_tty.cc (fhandler_pty_master::accept_input): Just use a normal Sleep
or suffer amazing pauses when other tty apps are running.
(fhandler_pty_master::process_slave_output): Ditto.
2002-11-26 20:32:39 +00:00
Danny Smith 5362be5926 Add strtold and wcstold to libmingwex.a
* mingwex/strtold.c: New file.
	* mingwex/wcstold.c: New file.
	* mingwex/ldtoa.c: New file.
	* mingwex/math/cephes_emath.h: New file.
	* mingwex/math/cephes_emath.c: New file.
	* mingwex/Makefile.in (DISTFILES): Add new files.
	(MATH_DISTFILES): Ditto.
	(STDLIB_OBJS): New. Define as strtold.c wcstold.c.
	(MATH_OBJS): Add cephes_emath.o.
	(LIB_OBJS): Add $(STDLIB_OBJS).
	* include/stdlib.h (strtold, wcstold): Add prototypes.
	* include/wchar.h (wcstold): Add prototype.

Add missing ChangeLog entry for 2002-11-09.
2002-11-26 00:11:06 +00:00
Earnie Boyd 4e85569d11 * include/w32api.h: Increment to version 2.2
* Makefile.in: Ditto.
2002-11-25 21:15:52 +00:00
Earnie Boyd 60d4d42f4f * lib/Makefile.in (dist, install): Correct the install destinations.
* lib/ddk/Makefile.in (dist, install): Ditto.
2002-11-25 18:14:25 +00:00
Corinna Vinschen d1b6d5cd14 * mkpasswd.c (main): Set pw_passwd field to '*' on 9x/Me. 2002-11-25 15:12:50 +00:00
Corinna Vinschen efcaf0426a * passwd.cc (read_etc_passwd): Never add an entry when starting
on Win95/98/ME if a default entry is present.
	* uinfo.cc (internal_getlogin): Look for the default uid if needed.
	Always call user.set_name ().
2002-11-25 15:11:39 +00:00
Corinna Vinschen f1da8a0664 * sec_acl.cc (getacl): Set errno to ENOSPC if command is GETACL and
nentries is less than the number of entries in the file's ACL.
2002-11-25 11:23:21 +00:00
Corinna Vinschen 19f209011a 2002-11-24 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc: Fix some formatting.  Only set and check `other' bits in
	a_perm throughout.  Use ILLEGAL_GID id for all entries having no id.
	(setacl): Fix inheritance condition.
	(getacl): Set all permission bits in CLASS_OBJ and DEF_CLASS_OBJ
	entries.  Remove DENY bits before returning to calling function.
	(acltomode): Fix usage of searchace().  If available, use CLASS_OBJ
	to mask GROUP_OBJ permissions.
	(aclfrommode): Fix usage of searchace().  If available, set CLASS_OBJ
	permissions to same value as GROUP_OBJ permissions.

2002-11-24  Pierre Humblet <pierre.humblet@ieee.org>

	* sec_acl.cc (getace): Fix the behavior when allow and
	deny entries are present in arbitrary order.
	(getacl): Report the actual number of entries when
	aclbufp is NULL, even if nentries is zero. Fix the mask
	reporting, handle the case where the owner and group sids
	are equal and streamline the code.
	(acl_worker): Take allow_ntsec into account.
2002-11-24 18:58:47 +00:00
Corinna Vinschen 2d06bd1109 * setfacl.c (getperm): Set only `other' permission bits.
(getaclentry): Set a_id to -1 by default.
2002-11-24 18:07:30 +00:00
Corinna Vinschen ad2bc53e8f * getfacl.c (permstr): Use `other' permission bits for requesting
ace permissions.
2002-11-24 16:15:33 +00:00
Robert Collins f8c8e13b7e 2002-11-05 Thomas Pfaff <tpfaff@gmx.net>
* dcrt0.cc (dll_crt0_1): Add call to pthread::initMainThread to
        initialize mainthread when it is safe to call new.
        * init.cc (dll_entry): Change call to store reents in tls key.
        * thread.cc (_reent_clib) : Change call to get reents from tls
        key.
        (_reent_winsup): Ditto.
        (MTinterface::Init): Key handling changed. Remove initialization
        of member variables.
        (MTinterface::fixup_after_fork): Reinitialize mainthread object
        after fork. Reset threadount to 1.
        (pthread::initMainThread): Create mainthread object dynamically.
        and initialize with valid handles.
        (pthread::self): Remove calls to create thread objects.
        (pthread::setTlsSelfPointer): Change call to store thread self
        handle in tls key.
        (pthread::getTlsSelfPointer): New static method.
        (pthread::exit): Remove setTlsSelfPointer call.
        (pthread::initCurrentThread): New method.
        (pthread::thread_init_wrapper): Change call to store thread self
        handle in tls key.
        (pthread::join): Check for a valid joiner.
        (pthreadNull::pthreadNull): Mark Null object as detached.
        (pthreadNull::exit): Terminate thread via ExitThread.
        * thread.h (pthread::initMainThread): Change parameter in function
        call.
        (pthread::getTlsSelfPointer): New static method.
        (pthread::initCurrentThread): New method.
        (MTinterface::reent_key): Remove.
        (MTinterface::thread_self_dwTlsIndex): Ditto..
        (MTinterface::indexallocated): Ditto.
        (MTinterface::mainthread): Ditto.
        (MTinterface::reent_key): New member.
        (MTinterface::thread_self_key): Ditto.
        (MTinterface::MTinterface): Initialize all members.
2002-11-24 13:54:14 +00:00
Robert Collins 4f0de34d37 2002-11-25 Robert Collins <rbtcollins@hotmail.com>
* readme: Document running portions of the test suite (Thanks Egor!).
        * winsup.api/pthread/mainthreadexits.c: New file, derived from
        Thomas Pfaff's test cases.
        * winsup.api/pthread/threadidafterfork.c: Ditto.
2002-11-24 13:41:36 +00:00
Christopher Faylor 4497f2a88d * wait.cc (wait4): Force pending signal delivery before waiting for process
completion.
2002-11-23 20:24:08 +00:00
Christopher Faylor 1d676025c9 * include/cygwin/version.h: Bump DLL minor number. 2002-11-23 17:43:46 +00:00
Christopher Faylor 15a3d9cc40 fix typo 2002-11-23 01:27:42 +00:00
Christopher Faylor a0d3c309e4 * exceptions.cc (handle_sigsuspend): Force pending signal delivery before
waiting for signals to happen.
* signal.cc (sleep): Force pending signal delivery before sleeping.
(usleep): Ditto.
(signal): Force pending signal delivery before manipulating signal stuff.
(sigprocmask): Ditto.
(kill_worker): Ditto.
(abort): Ditto.
(sigaction): Ditto.
* syscalls.cc (readv): Force pending signal delivery before I/O.
(writev): Ditto.
(open): Ditto.
* net.cc: Ditto, throughout.
* sigproc.cc (sig_dispatch_pending): Deliver any pending signals prior to
returning.
* tty.cc (tty::make_pipes): Increase pipe buffer size.
2002-11-22 20:51:13 +00:00
Christopher Faylor 8efb9fd7af * include/cygwin/version.h: Fix comment. 2002-11-22 16:27:32 +00:00
Christopher Faylor ad377fe347 * external.cc (cygwin_internal): Fix va_arg references. 2002-11-22 04:50:53 +00:00
Christopher Faylor 13af9a149d * exceptions.cc (sigthread::get_winapi_lock): Just do standard 'give up
timeslice' wait.
(setup_handler): Revamp YA to attempt to deliver signal multiple times on
failure rather than punting to wait_sig.
* miscfuncs.cc (low_priority_sleep): Accept INFINITE sleep to mean "don't reset
the priority after setting it to idle".  Return previous priority.
* winsup.h (SLEEP_0_STAY_LOW): Define.
(low_priority_sleep): Return an int.
* sigproc.h: Define WAIT_SIG_PRIORITY here.
* sigproc.cc: Remove WAIT_SIG_PRIORITY definition.
2002-11-22 04:43:47 +00:00
Corinna Vinschen 647b92a7d4 * security.h: Declare internal_getpwsid and internal_getgrsid.
Undeclare internal_getpwent.  Define DEFAULT_UID_NT.  Change
	DEFAULT_GID.
	* passwd.cc (internal_getpwsid): New function.
	(internal_getpwent): Suppress.
	(read_etc_passwd): Make static.  Rewrite the code for the completion
	line.  Set curr_lines to 0.
	(parse_pwd): Change type to static int.  Return 0 for short lines.
	(add_pwd_line): Pay attention to the value of parse_pwd.
	(search_for): Do not look for nor return the DEFAULT_UID.
	* grp.cc (read_etc_group): Make static.  Free gr_mem and set
	curr_lines to 0.  Always call add_pwd_line.  Rewrite the code for the
	completion line.
	(internal_getgrsid): New function.
	(parse_grp): If grp.gr_mem is empty, set it to &null_ptr.
	Never NULL gr_passwd.
	(getgrgid32): Only return the default if ntsec is off and the gid is
	ILLEGAL_GID.
	* sec_helper.cc (cygsid::get_id): Use getpwsid and getgrsid.
	(cygsid_getfrompw): Clean up last line.
	(cygsid_getfromgr): Ditto.
	(is_grp_member): Use getpwuid32 and getgrgid32.
	* uinfo.cc (internal_getlogin): Set DEFAULT_GID at start.
	Use getpwsid. Move the read of /etc/group after the second access
	to /etc/passwd.  Change some debug_printf.
2002-11-20 17:10:05 +00:00
Corinna Vinschen 3a366b12f6 * poll.cc (poll): ...but set POLLIN instead. 2002-11-20 11:00:15 +00:00
Corinna Vinschen dbcb75780a * security.cc (get_attribute_from_acl): Always test "anti",
just in case an access_denied ACE follows an access_allowed.
	Handle the case owner_sid == group_sid, with a FIXME.
	Remove unnecessary tests for non-NULL PSIDs.
	(alloc_sd): Use existing owner and group sids if {ug}id == -1.
	Handle case where owner_sid == group_sid.
	Do not call is_grp_member. Try to preserve canonical ACE order.
	Remove unnecessary tests for non-NULL PSIDs. Reorganize
	debug_printf's.
	(get_initgroups_sidlist): Put well_known_system_sid on left
	side of ==.
	(add_access_denied_ace): Only call GetAce if inherit != 0.
	(add_access_allowed_ace): Ditto. Use appropriate sizeof.
	* syscalls.cc (chown_worker): Pass {ug}id equal to -1 to
	alloc_sd, which removes the need to obtain old_{ug}id.
	(chmod): Remove call to get_file_attribute (), simply pass
	{ug}id equal to -1 to alloc_sd.
2002-11-20 09:23:21 +00:00
Corinna Vinschen 03b65245db * poll.cc (poll): Don't set POLLERR if a listening socket has a
pending connect.  Don't use errno value from call to
	fhandler_socket::recvfrom().
2002-11-20 08:03:50 +00:00
Christopher Faylor 4b45d8a6f3 * net.cc: Sprinkle sigframes throughout. 2002-11-19 08:01:49 +00:00
Christopher Faylor 78907ddc89 remove unneeded comments 2002-11-19 01:20:58 +00:00
David Starks-Browning 4ed9c1e62e new entry: "Is there a better alternative to the standard console window?" (yes, rxvt) 2002-11-18 00:25:14 +00:00
David Starks-Browning 34fd220461 re. copy/paste in console window: use rxvt instead 2002-11-17 23:54:11 +00:00
David Starks-Browning 52b945c6bf indicate ntsec now on by default 2002-11-17 23:49:14 +00:00
Christopher Faylor 1b6860be30 * tty.cc (tty::make_pipes): Make pipe buffer larger. 2002-11-16 06:22:42 +00:00
Christopher Faylor 463e739282 * grp.cc (getgroups32): Protect against closing cygheap->user.token. 2002-11-16 03:50:56 +00:00
Danny Smith a87878a965 * lib/uuid.c (CATID_InternetAware,CLSID_HttpSProtocol,
CLSID_PSUrlMonProxy,CLSID_StdURLMoniker,IID_IObjectWithSite,
	IID_IPersistMoniker,IID_IProgressNotify): Correct definitions.
	(CLSID_CFontPropPage00, GUID_FONTUNDERSCORE11,
	IID_IOleControlSite89): Remove.
2002-11-16 03:04:41 +00:00
Christopher Faylor d894f55295 * lib/uuid.c (IID_IRunnableObject): Remove duplicate definition.
(IID_IStdMarshalInfo): Ditto.
2002-11-15 21:18:47 +00:00
Christopher Faylor ed2b976b0f * lib/uuid.c (IID_IOleInPlaceSite): Remove duplicate definition.
(IID_IPersistStorage): Ditto.
2002-11-15 21:11:29 +00:00
Christopher Faylor f319cb1ad3 * include/cygwin/version.h: Bump API_MINOR to accommodate below changes.
* cygwin.din (siginterrupt): New export.
* signal.cc (siginterrupt): New.
2002-11-15 19:04:36 +00:00
Christopher Faylor 4b9ddc7dc9 * select.cc (peek_serial): Don't call PurgeComm() to avoid characters loss. 2002-11-15 18:58:12 +00:00
Danny Smith 26eb19efe4 2002-11-15 Weiqi Gao <weiqigao@users.sourceforge.net>
* lib/uuid.c (CLSID_PSClassObject, CLSID_PSEnumerators,
	IID_IClassActivator, IID_IClientSecurity, IID_ICreateTypeInfo,
	IID_ICreateTypeLib2, IID_IOleInPlaceSite, IID_IPersistStorage,
	IID_IRunnableObject, IID_IServerSecurity, IID_IStdMarshalInfo):
	Correct definitions.
2002-11-15 07:13:22 +00:00
Christopher Faylor 6597785dc2 * exceptions.cc (setup_handler): Add debugging output. Set thread priority to
idle if pending signals to allow other threads to get into interruptible state.
* miscfuncs.cc (sys_mbstowcs): Save current thread in variable to avoid an OS
call.
* wait.cc (wait_sig): Reset thread priority each time through loop since the
priority may have been set down to deal with pending signals.
2002-11-15 04:35:13 +00:00
Christopher Faylor d4990113a1 * fhandler_serial.cc (fhandler_serial::tcgetattr): Don't take any special
action when vmin_ == 0.
2002-11-15 02:12:36 +00:00
Danny Smith 540d550a38 * include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
	miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
	ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
	netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
	ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
	ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
	ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
	ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
	poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
	storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
	upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
	usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
	winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
	xfilter.h): Change comment to refer w32api package, not MinGW.
2002-11-15 01:08:17 +00:00
Danny Smith 429ae76922 * include/ddk/ntddk.h: Include winnt.h as system header. 2002-11-15 01:02:37 +00:00
Corinna Vinschen 4ce377c9d4 * grp.cc (getgroups32): Revert previous patch. Use impersonation
token if process is in impersonated state.
	* sec_helper.cc (is_grp_member): Rewrite.  Call getgroups32 only
	for current user.  Scan passwd and group info otherwise.
2002-11-14 19:19:39 +00:00
Christopher Faylor 33902276b1 checking previously ChangeLog'ed file. 2002-11-14 18:02:05 +00:00
Christopher Faylor 5b213f8bd6 * fhandler_console.cc (fhandler_console::write): Allow characters >= 0177 to be
displayed in the title bar.
2002-11-14 17:46:58 +00:00
Corinna Vinschen dae01cb624 * grp.cc (getgroups32): Don't use access token of current user when
retrieving group info for another user.
2002-11-14 10:28:55 +00:00
Christopher Faylor 052990e6b3 * dll_init.cc (dll_list::detach): Eliminate reliance on passed in dll address.
Infer from module of caller instead.
(cygwin_detach_dll): Ignore dll_index argument.
* dll_init.h (dll_list::detach): Reflect argument change above.
2002-11-14 04:29:39 +00:00
Christopher Faylor a2dea5c333 * ioctl.cc (ioctl): Always print ioctl results, even when it's a tty.
* winsup.h (low_priority_sleep): Declare.
2002-11-14 02:15:23 +00:00
Christopher Faylor 40e4147f4e * winsup.h (low_priority_sleep): Declare. 2002-11-13 22:08:05 +00:00
Christopher Faylor c0a02a4b42 * miscfuncs.cc (low_priority_sleep): New function. Use throughout where code
is supposed to be giving up time slice.
* fhandler_console.cc (fhandler_console::read): Switch button 2/3 output escape
sequences to be consistent with xterm.
2002-11-13 19:36:12 +00:00
David Starks-Browning e0900ffdb5 Update Emacs-related entries (new Cygwin port, details on XEmacs ports) 2002-11-13 00:23:18 +00:00
Danny Smith 6ac7b97610 * include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
	miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
	ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
	netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
	ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
	ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
	ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
	ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
	poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
	storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
	upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
	usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
	winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
	xfilter.h): Fix typo in disclaimer comment.
2002-11-12 21:34:07 +00:00
Danny Smith 4308e5b0dd * include/exdisp.h: Include oaidl.h as system header. 2002-11-12 21:25:23 +00:00
Earnie Boyd 1f90279128 * include/w32api.h (__W32API_VERSION): Fix. 2002-11-12 16:13:51 +00:00
Corinna Vinschen 7a11fe607e * syscalls.cc (chmod): Simplify conditional.
* sec_helper (cygsid::getfromstr): Reorganize to remove
	calls to strcpy and strtok_r.
	(cygsid::getfromgr): Change type to __uid32_t instead of int.
	Keep only the allow_ntsec branch. Never call LookupAccountSid
	which calls PDCs, simply return -1 in case of failure.
	Use cygsid == instead of calling EqualSid and remove test
	for NULL psid.
	* security.h: Declare cygsid::getfromgr as __uid32_t.
2002-11-12 15:51:11 +00:00
Christopher Faylor 1b5f0e595b * how-programming.texinfo: Document _WIN32 more fully. 2002-11-10 19:38:26 +00:00
Corinna Vinschen 7922485391 * net.cc: Run indent.
* autoload.cc (GetIfEntry): Add symbol.
	* net.cc (get_2k_ifconf): Get the interface entries with the GetIfEntry
	call intead of the GetIfTable call. Clean-up multiple IP address naming.
2002-11-10 13:43:26 +00:00
Danny Smith 5d7bffe927 2002-11-09 Weiqi Gao <weiqigao@users.sourceforge.net>
* lib/uuid.c (IID_ICatInformation): Correct definition.
2002-11-10 04:14:31 +00:00
Christopher Faylor ec61cd7268 correct date 2002-11-10 00:51:25 +00:00
Danny Smith 9da547ff26 * include/math.h (sqrt): Remove inline definition.
(sqrtf): Replace inline definition with prototype.
	(sqrtl): Likewise.
	* mingwex/math/sqrtf.c (sqrtf): Set domain error if
	argument less than zero.
	* mingwex/math/sqrtf.c (sqrtl): Likewise.

	Correct typo in 2002-10-30 ChangeLog entry.
2002-11-09 10:44:02 +00:00
Christopher Faylor 49f7ea1675 * fhandler.h (class fhandler_pipe): New ioctl() method.
* pipe.cc (fhandler_pipe::ioctl): New.
2002-11-09 03:17:40 +00:00
Corinna Vinschen 7c4f9b9a05 * setfacl.c (usage): Add missing LF. 2002-11-08 10:22:58 +00:00
Danny Smith 00970f126e * include/oleauto.h (DeregisterTypeLib): Remove.
(UnRegisterTypeLib): Add prototype.
2002-11-08 00:00:01 +00:00
Christopher Faylor 783747919d * fhandler_serial.cc (fhandler_serial::ioctl): Fix typo. 2002-11-07 18:47:21 +00:00
Corinna Vinschen cad2c685b4 * include/cygwin/fs.h: New file.
* include/cygwin/hdreg.h: New file.
	* fhandler_floppy.cc (fhandler_floppy::ioctl): Add implementation for
	HDIO_GETGEO, BLKGETSIZE, BLKGETSIZE64, BLKRRPART and BLKSSZGET ioctls.
2002-11-07 14:16:29 +00:00
Corinna Vinschen 963fb8837d * include/winioctl.h: Add definition for IOCTL_DISK_UPDATE_DRIVE_SIZE. 2002-11-07 14:14:01 +00:00
Corinna Vinschen 59ba222ca2 * fhandler_socket.cc (fhandler_socket::ioctl): Return correct flags
for loopback interface when name is given on input instead of address.
2002-11-07 10:22:26 +00:00
Corinna Vinschen 0be1147408 * cygwin.din: Export fseeko() and ftello().
* include/cygwin/version.h: Bump API minor version.
2002-11-07 09:08:40 +00:00
Christopher Faylor f7618386af minor reformat 2002-11-07 03:41:16 +00:00
Christopher Faylor c8fae3c17b * fhandler_console.cc (keytable[]): Revert previous change. It would break too
many things.
2002-11-07 03:35:02 +00:00
Christopher Faylor 6c2d501195 * fhandler_console.cc (keytable[]): Redefine F1 - F5 to something a little more
sensical.
2002-11-07 03:16:08 +00:00
Christopher Faylor c759d297b2 * syscalls.cc (getutid): Use UT_IDLEN where appropriate. 2002-11-07 02:50:50 +00:00
Christopher Faylor 4248a1d7f8 * include/cygwin/version.h: Bump API minor number for below export.
* cygwin.din (pututline): New exported function.
* syscalls.cc (login): Use pututiline().
(setutent): Open utmp as read/write.
(endutent): Check if utmp file is open.
(utmpname): call endutent() to close current utmp file.
(getutid): Enable all cases, use strncmp() to compare ut_id fields.
(pututline): New.
* tty.cc (create_tty_master): Set ut_pid to current pid.
2002-11-07 02:19:52 +00:00
Christopher Faylor 2035f402e4 * fhandler_serial.cc (fhandler_serial::ioctl): Don't try to figure out if OS
has the capability to retrieve RTS/CTS.  Just set default values if
DeviceIoControl fails.  (suggested by Sergey Okhapkin)
2002-11-06 01:50:32 +00:00
Christopher Faylor 087a28bf5e * fhandler_serial.cc (fhandler_serial::raw_read): Use correct type for
minchars.
(fhandler_serial::ioctl): Set errno if the ClearCommError fails.
(fhandler_serial::tcsetattr): Use correct value for vmin_.
(fhandler_serial::tcgetattr): Ditto.
2002-11-05 23:15:04 +00:00
Christopher Faylor 2f5e9ace2e * fhandler_socket.cc (fhandler_socket::recvmsg): Call if from == NULL
WSARecvFrom with fromlen = NULL.
2002-11-05 16:49:58 +00:00
Christopher Faylor ef1bf288df * pinfo.cc (_pinfo::commune_send): Fix thinko in previous checkin. 2002-11-05 04:52:52 +00:00
Christopher Faylor d263732238 * pinfo.cc (_pinfo::commune_send): Set priority low when sleeping, waiting for
commune completion so that we don't spin waiting for lower priority processes.
2002-11-05 04:43:02 +00:00
Christopher Faylor 73f7245be2 revert erroneous checkins 2002-11-05 04:24:48 +00:00
Christopher Faylor 5806add291 * sigproc.cc (WAIT_SIG_PRIORITY): Bump to THREAD_PRIORITY_TIME_CRITICAL. 2002-11-05 04:23:41 +00:00
Christopher Faylor f57289609b * pinfo.cc (_pinfo::commune_send): Initialize buffer or suffer random crashes. 2002-11-05 03:39:25 +00:00
Christopher Faylor 8948b6585d * fhandler_process.cc (fhandler_process::fill_filebuf): Deal with error
condition from cmdline retrieval.
2002-11-05 03:21:32 +00:00
Christopher Faylor 43a299881f * sigproc.cc (WAIT_SIG_PRIORITY): Bump to highest priority. 2002-11-05 02:58:10 +00:00
Christopher Faylor d4e7dfae8e * include/cygwin/version.h: Bump DLL minor number. 2002-11-04 05:08:15 +00:00
Christopher Faylor b6183403ae * fhandler_serial.cc (fhandler_serial::ioctl): Reformat. Set errno
appropriately.  Exit from the bottom.  Correctly deal with third argument for
TCFLSH.  (Suggested by Sergey Okhapkin)
2002-11-04 04:09:14 +00:00
Danny Smith 2f14399c16 * include/winnt.h (VerSetConditionMask): Add prototype.
* lib/kernel32.def (VerifyVersionInfo[AW]): Add stubs.
2002-11-04 03:53:53 +00:00
Christopher Faylor 2601ab5778 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Do nothing if the new window
size is equal to the old one.  Send SIGWINCH if slave connected to a pseudo
tty.
(fhandler_pty_master::ioctl): Do nothing if the new window size is equal to the
old one.
2002-11-04 01:10:38 +00:00
Christopher Faylor 3593c18730 space 2002-11-02 03:31:15 +00:00
Pierre Humblet fe5ba95245 2002-10-31 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler.cc (fhandler_base::open): Verify pc isn't NULL.
2002-11-01 01:47:29 +00:00
Christopher Faylor cf157504a8 * cygpath.cc (get_long_path_name_w32impl): Define similarly to GetLongPathName.
(get_long_name): Correctly prototype GetLongPathName.
(get_long_paths): Implement using get_long_name to cut down on code
duplication.
(doit): Do various things to make path output work predictably.
2002-10-31 02:40:26 +00:00
Christopher Faylor bfb1f3e04f * include/cygwin/version.h: Bump DLL minor number. 2002-10-30 21:06:21 +00:00
Christopher Faylor 831d6fa520 * external.cc (cygwin_internal): Implement CW_CMDLINE.
* pinfo.h (SIGCOMMUNE): New signal type.
(commune_result): New structure for commune functions.
(picom): New enum for commune functions.
(_pinfo::hello_pid): New.  Pid who's communicating with me.
(_pinfo::tothem): New.  Handle of communicating pipe.
(_pinfo::fromthem): Ditto.
(_pinfo::commune_recv): Declare.
(_pinfo::commune_send): Declare.
(_pinfo::alive): Declare.
(_pinfo::cmdline): Declare.
(_pinfo::lock): Declare.
* pinfo.cc (set_myself): Initialize new _pinfo lock.
(_pinfo::alive): Define.  Determines if process still exists.
(_pinfo::commune_recv): Define.  Receive info from another cooperating process.
(_pinfo::commune_send): Define.  Send info to another cooperating process.
(_pinfo::cmdline): Define.  Determine command line of a given process.
* include/sys/cygwin.h (CW_CMDLINE): Define.
*sigproc.cc (talktome): Communicate with any processes who want to talk to me.
(wait_sig): Honor __SIGCOMMUNE.
* fhandler.cc (fhandler_virtual::fixup_after_exec): Declare.
* fhandler_proc.cc: Use malloc/free/realloc throughout rather than cmalloc
since buffers don't need to be propagated to subprocesses.
* fhandler_registry.cc: Ditto.
* fhandler_virtual.cc: Ditto.
(fhandler_virtual::fixup_after_exec): Define.
* fhandler_process.cc: Ditto for malloc/free/realloc.
(process_listin): Add "cmdline".
(fhandler_process::fill_filebuf): Implement PROCESS_CMDLINE.
* miscfuncs.cc (isalpha_array): New array populated with xor values for alpha
characters to switch from one case to another.
* string.h (cygwin_strcasematch): New asm implementation of case match.
* string.h (cygwin_nstrcasematch): New asm implementation of counted case
match.
2002-10-30 21:05:18 +00:00
Danny Smith 4c8eba2cf3 2002-10-30 Guido Serassio <serassio@libero.it>
* include/stdio.h (_getnaxstdio): Add prototype.
         (_setmaxstdio): Likewise.
2002-10-30 01:07:54 +00:00
Christopher Faylor 950a7601d1 * pwdgrp.h (pwdgrp_read::open): Compare fh to INVALID_HANDLE_VALUE. 2002-10-24 14:33:13 +00:00
Joshua Daniel Franklin a8ab20942e * ntsec.sgml: Correct some minor grammatical errors. 2002-10-23 04:29:46 +00:00
Joshua Daniel Franklin 0fd3e6ea29 * dll.sgml: Simplify dll build instructions. 2002-10-23 03:55:34 +00:00
Christopher Faylor 281e3b2423 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Nevermind. Revert
everything to previous state wrt ntsec and exec bits.
2002-10-23 02:32:34 +00:00
Christopher Faylor 082512aea1 * shared.cc (shared_info::initialize): Use correct value for version
comparison.
* include/cygwin/version.h (CYGWIN_VERSION_MAGIC): Use all of a DWORD for magic
calculation.
2002-10-23 02:20:38 +00:00
Christopher Faylor 046a4e718e * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Oops. Only do the
executable thing for #! scripts since .exe files wouldn't be executable in
ntsec case regardless.
2002-10-22 21:35:21 +00:00
Christopher Faylor 7dcbb978e0 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always consider
.exe files and '#!' shell scripts to be executable.
2002-10-22 20:41:31 +00:00
Christopher Faylor d525130f04 * cygthread.cc (cygthread::exiting): New variable.
(cygthread::initialized): Delete.
(cygthread::stub): Use exiting variable to determine when to exit.
(cygthread::runner): Delete.
(cygthread_protect): New variable.
(cygthread::init): Don't start runner thread.  Initialize muto for list
protection.
(cygthread::freerange): Return pointer to cygthread.
(cygthread::operator new): Change logic to start threads on an as-needed basis.
(cygthread::detach): Don't zero id.
(cygthread::terminate): Don't kill any executing threads.  Just set exiting
flag.
* cygthread.h (cygthread): Reflect above changes.
* dcrt0.cc (dll_crt0_1): Move cygthread initialization later.
* fork.cc (fork_child): Do fdtab fixup after dll fixup or (apparently) winsock
may allocate memory in dll load address.
2002-10-22 20:16:31 +00:00
Christopher Faylor 329b9ead3e * sec_helper.cc (cygsid::get_id): If the sid matches a sid stored in
cygheap->user, return the uid or gid from myself.
* security.cc (alloc_sd): If gid == myself->gid, return the group sid from
cygheap->user.  Remove the test for uid == original_uid, which is
counter-productive.
2002-10-22 16:22:10 +00:00
Christopher Faylor 1cc651ecaf * cygheap.cc (cygheap_fixup_in_child): Use user_heap element in cygheap.
(init_cheap): Ditto for declaration.
* fork.cc (fork_parent): Use user_heap element in cygheap.
* heap.h (inheap): Ditto.
* heap.cc (sbrk): Ditto.
(heap_init): Ditto.  Reorganize to shrink heap chunk as required and record new
value in cygheap.
* dcrt0.cc (dll_crt0_1): More "move the cygthread init" games.
* shared.cc (open_shared): Rework memory protection to properly deal with
relocated shared segment.
(shared_info::heap_chunk_size): Rename element to 'heap_chunk'.
* shared_info.h (shared_info): Ditto for declaration.
* strace.cc (strace::hello): Report on heap chunk size from cygheap since it
may shrink.
2002-10-22 16:18:55 +00:00
Christopher Faylor 5ec14fe40a Change _function() to function() throughout.
* cygwin.din: Remove last vestiges (?) of newlib wrappers.
* cygthread.cc (cygthread::detach): Always wait for event or suffer an
apparently inavoidable race.
* dcrt0.cc (dll_crt0_1): Allocate threads after stack has been relocated.
* debub.cc (lock_debug): Don't acquire lock on exit.
* fork.cc (fork_child): Recreate mmaps before doing anything else since Windows
has a habit of using blocks of memory in the child that could previously have
been occupied by shared memory in the parent.
* mmap.cc (fhandler_disk_file::fixup_mmap_after_fork): Issue error here and
provide some details about what went wrong.
(fixup_mmaps_after_fork): Remove error message.
* shared.cc (open_shared): Move warning message so that more detail is
possible.
* sigproc.cc (sigproc_init): Initialize sync_proc_subproc to avoid a race.
(sigproc_terminate): Specifically wait for process thread to terminate.
2002-10-21 01:00:58 +00:00
Christopher Faylor ccefaab1d5 * cygthread.cc (cygthread::stub): Fix typo.
(cygthread::terminate): Don't zero thread handle prior to using it.
2002-10-20 18:17:43 +00:00
Christopher Faylor cf70a7e372 fix typo 2002-10-20 04:53:30 +00:00
Christopher Faylor 818089d9c8 missed checkin 2002-10-20 04:46:31 +00:00
Christopher Faylor da17f96378 fix typo 2002-10-20 04:42:13 +00:00
Danny Smith aab9ff2a5e 2002-10-19 Kang Li <rubylith@users.sourceforge.net>
* include/fcntl.h (O_SEQUENTIAL): Correct typo.
2002-10-20 04:35:58 +00:00
Danny Smith 1c00ad29b8 2002-10-19 Danny Smith <dannysmith@users.sourceforge.net>
* crt1.c: Define new macro __IN_MINGW_RUNTIME before including
	stdlib.h. Comment on reason.
	Define WIN32_MEAN_AND_LEAN before including windows.h
	* include/stdlib.h (_fmode): Protect declaration as dllimported
	variable with __IN_MINGW_RUNTIME.

2002-10-19  Igor Pechtchanski  <pechtcha@cs.nyu.edu>

	* crt1.c: Include stdlib.h.
2002-10-20 04:30:28 +00:00
Christopher Faylor bfda61d419 * sigproc.cc (wait_sig): Remove obsolete sigchld logic. 2002-10-20 04:17:59 +00:00
Christopher Faylor d25c187f12 Rename _kill() to kill() throughout. Rename _raise() to raise() throughout.
Rename _pid() to pid() throughout.
* Makefile.in: Compile some objects with -fomit-frame-pointer.
* cygwin.din: Reverse aliasing for _kill.
* syscalls.cc (_getpid_r): New function, implemented for newlib compatibility.
* shared.cc (open_shared): Remove reserving of memory since previous change
eliminate the need for this hack.
2002-10-20 04:15:50 +00:00
Danny Smith bea966c0d9 * Makefile.in (CRT0S): Add txtmode.o binmode.o.
(MINGW_OBJS): Add txtmode.o.
	(SRCDIST_FILES): Add txtmode.c binmode.c.
	crt1.c: Don't include fcntrl.h, stdlib.h.
	(_fmode): Declare, without dllimport attribute.
	(__p__fmode): Declare access function for dll's _fmode.
	(_mingw32_init_fmode): Sync dll _fmode with staticly linked
	_fmode for app.
	* txtmode.c: New file.
	* binmode.c: New file.
	* samples/fmode/test2.c: New file.
	* samples/fmode/jamfile: Add test2.exe target.
2002-10-19 20:26:26 +00:00
Christopher Faylor 1fc4df5a69 * fork.cc (fork_child): Move pinfo fixup later to attempt some minor gains from
concurrency from cythread::init.
2002-10-19 18:29:37 +00:00
Christopher Faylor 3350721cff fix changelog 2002-10-19 11:59:14 +00:00
Christopher Faylor 7c51881531 * mount.cc (usage): Correctly report default mode. 2002-10-19 11:41:31 +00:00
Christopher Faylor a85860b5c8 * dcrt0.cc (dll_crt0_1): Initialize cygwin threads here only when not forking.
* fork.cc (fork_child): Initialize cygwin thread later in process to avoid
allocating memory for thread stacks.
* shared.cc (open_shared): Issue warning if NT and shared segment is relocated.
2002-10-19 00:57:06 +00:00
Christopher Faylor 824166e620 * cygthread.cc: Bump number of cygthreads up to accommodate applications which
use ttys.
2002-10-19 00:35:20 +00:00
Christopher Faylor 60bc7b5977 * fork.cc (fork_child): Move mmap initialization.
* shared.cc (shared_info::heap_chunk_size): Store info as megabytes.  Search
HKEY_LOCAL_MACHINE as well as HKEY_CURRENT_USER.
* shared_info.h (shared_info::initial_heap_size): Change element name to
reflect new functionality.
* strace.cc (strace::hello): Report on initial heap size.
2002-10-18 23:52:59 +00:00
Christopher Faylor 5d8c2b592d * thread.cc (verifyable_object_isvalid): Test for a valid object pointer before
testing for static ptr.
2002-10-18 14:02:40 +00:00
Christopher Faylor abb58a6d3f * dtable.cc (dtable::init_std_file_from_handle): Force "devices" to always be
in binary mode.  Temporary fix until ssh is rebuilt?
2002-10-18 01:28:48 +00:00
Christopher Faylor fef1edbc9a * dtable.cc (dtable::set_file_pointers_for_exec): New function.
* dtable.h (dtable::set_file_pointers_for_exec): Declare new function.
* spawn.cc (spawn_guts): Call dtable::set_file_pointers_for_exec to set
pointers to EOF when execing non-cygwin applications.
2002-10-17 17:45:09 +00:00
Robert Collins e9350b6575 2002-10-17 Robert Collins <rbtcollins@hotmail.com>
* thread.h (pthread_mutex::isGoodInitializerOrBadObject): Declare.
        * thread.cc (pthread_mutex::isGoodInitializerOrBadObject): Implement.
        (pthread_mutex::init): Use isGoodInitializerOrBadObject to avoid
        unneeded SEGV's during debugging.
2002-10-17 08:44:18 +00:00
Robert Collins 841cf30bc3 2002-10-17 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (verifyable_object_isvalid): Test for static object first.
2002-10-17 08:31:30 +00:00