Commit Graph

3700 Commits

Author SHA1 Message Date
Christopher Faylor 12ffca1d84 * net.cc (dup_ent): Make debugging output consistent. 2003-08-31 23:23:40 +00:00
Christopher Faylor a3de4e19b4 Use dup_ent rather than specific dup_*_ptr functions throughout.
* (gen_ent): Delete.
(dup_ent): Subsume gen_ent functionality.
(dup_host_ptr): Delete.
(dup_proto_ptr): Ditto.
(dup_servent_ptr): Ditto.
* net.cc (gen_ent): Invert sense of null check so that debug output makes
sense.
2003-08-31 23:16:34 +00:00
Christopher Faylor edf16a29fc * net.cc (free_char_list): Delete.
(dup_addr_list): Delete.
(dup_char_list): Delete.
(free_hostent_ptr): Delete.
(free_protoent_ptr): Delete.
(free_servent_ptr): Delete.
(DWORD_round): New function.
(strlen_round): New function.  Returns strlen rounded up to word size.
(dup_ent): New, generic function to duplicate a {host,proto,serv}ent structure.
(gen_ent): New macro.  Generates a generic dup_{host,proto,serv}ent_ptr
function.
(cygwin_getservbyname): Remove call to free_servent_ptr, pass servent_buf to
dup_servent_ptr.
(cygwin_getservbyport): Ditto.
(cygwin_gethostbyname): Ditto for hostent.
(cygwin_gethostbyaddr): Ditto.
(cygwin_getprotobyname): Ditto for protoent.
(cygwin_getprotobynumber): Ditto.
2003-08-31 22:02:15 +00:00
Christopher Faylor f8e2f358c4 * Makefile.in (MALLOC_OFILES): Always fill in with correct malloc object.
* configure.in: Fill in MALLOC_OFILES with either debugging or regular malloc.
* configure: Regenerate.
* dlmalloc.c: Make various fruitless changes to attempt to get to work.
* dlmalloc.h: Ditto.
* malloc.cc (free): Check malloc pool when debugging.
* path.cc (win32_device_name): Eliminate compiler warning.
* sigproc.cc (sig_dispatch_pending): Remove use of was_pending.  Let
thisframe.call_signal_handler decide if handler should be called rather than
using bogus was_pending check.
* exceptions.cc (interrupt_setup): Remove accidentally checked in debugging
code.
* heap.cc (sbrk): Save rounded addess in user_heap_max.
2003-08-31 18:26:58 +00:00
Christopher Faylor 110a4b87df change copyright 2003-08-31 00:40:16 +00:00
Christopher Faylor b939e87080 * sigproc.cc (sig_dispatch_pending): Remove explicit call to
thisframe.call_signal_handler.
2003-08-30 20:43:06 +00:00
Christopher Faylor 40f3536c52 missed one 2003-08-30 16:35:46 +00:00
Christopher Faylor a245bd6e99 * msg.cc: New file.
* sem.cc: Ditto.
2003-08-30 16:34:56 +00:00
Christopher Faylor 9540fc5962 * threaded_queue.h: New file. 2003-08-30 16:32:15 +00:00
Christopher Faylor 6c125ba745 Remove some cygserver files. 2003-08-30 16:31:10 +00:00
Danny Smith b258e2c63b 2003-08-29 Steve Cleary <scleary@jerviswebb.com>
* include/winuser.h (QS_ALLPOSTMESSAGE, QS_RAWINPUT): Add defines.
	(QS_INPUT, QS_ALLINPUT, QS_ALLEVENTS): Adjust by OR'ing	with
	QS_RAWINPUT for XP.
	(MWMO_*): Add flags.

	* include/wincrypt.h (MS_ENHANCED_PROV[AW], MS_STRONG_PROV[AW],
	MS_DEF_RSA_SIG_PROV[AW], MS_DEF_RSA_SCHANNEL_PROV[AW],
	MS_DEF_DSS_PROV[AW], MS_DEF_DSS_DH_PROV[AW], MS_ENH_DSS_DH_PROV[AW],
	MS_DEF_DH_SCHANNEL_PROV[AW], MS_SCARD_PROV[AW]): Add definitions.
2003-08-29 08:01:09 +00:00
Christopher Faylor 5a96b1cbff * sigproc.h: Make some functions regparm.
* sigproc.cc (checkstate): Make regparm.
(getevent): Change parameters in declaration, rename from getsem, make regparm.
(sig_send): Recognize that nosync is now an event.  Remove some old cruft from
previous interrupt anywhere signal handler.
(getevent): Change parameters in definition, rename from getsem.  Allocate
event rather than semaphore.
(wait_sig): Treat sigcatch_nosync as an event.
2003-08-29 03:29:16 +00:00
Christopher Faylor 99a8fab5a6 * sigproc.h: Make some functions regparm.
* sigproc.cc (checkstate): Make regparm.
(getevent): Change parameters in declaration, rename from getsem, make regparm.
(sig_send): Recognize that nosync is now an event.  Remove some old cruft from
previous interrupt anywhere signal handler.
(getevent): Change parameters in definition, rename from getsem.  Allocate
event rather than semaphore.
(wait_sig): Treat sigcatch_nosync as an event.
2003-08-29 02:59:06 +00:00
Christopher Faylor 5e8355c765 * exceptions.cc (sigreturn): Fix problem where old return address was not
properly restored for a nested signal.
2003-08-29 02:05:00 +00:00
Christopher Faylor d533b9214f * autoload.cc (SwitchToThread): Declare as autoload function.
* cygthread.h (cygthread::main_thread_id): Make public.
* exceptions.cc (setup_handler): Remove unneeded priority stuff.  Rename label
to reflect what it does.  Add debugging for idiotic Windows NT problem.  Change
debugging output to include signal number.
* miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread function
to give time slice to other threads.
* wincap.cc: Properly define have_switch_to_thread throughout.
* wincap.h (wincap::switch_to_thread): New element.
2003-08-28 02:09:42 +00:00
Christopher Faylor e2bc5017fa * syscalls.cc (mount): Don't check win32_path when doing cygdrive mount. 2003-08-28 02:04:16 +00:00
Christopher Faylor 7028311c04 * specdir: Correctly remove temporary directory prior to use. 2003-08-27 21:01:14 +00:00
Christopher Faylor 90f4768b78 * sigproc.cc (wait_sig): Count number of iterations through 'more_signals' loop
and issue a warning if DEBUGGING and excessive.
(WFSO): When debugging and infinite timeout, loop.
2003-08-27 20:42:52 +00:00
Corinna Vinschen 1ce25e2add * include/cygwin/stat.h: Allow definition of internal stat structures
also when compiling newlib.
2003-08-26 07:45:38 +00:00
Danny Smith 311d0d67b9 2003-08-26 Danny Smith <dannysmith@users.sourceforge.net>
* lib/test.c: Add vfw.h to includes.
	* include/mmsystem.h: Add #ifndef guard to definition of
	mmioFOURCC macro.
	* include/vfw.h: Protect __OBJC__ from COM declarations.

2003-08-26  Filip Navara  <xnavara@volny.cz>

	* include/vfw.h: New file.
2003-08-26 06:54:55 +00:00
Christopher Faylor ff57520702 add missing files 2003-08-25 19:44:44 +00:00
Christopher Faylor 29c1c50828 * Makefile.in: Build libcygserver.a.
* client.cc: Rename allow_daemon to allow_server.
2003-08-25 18:22:07 +00:00
Christopher Faylor 4392d36cbb Throughout, change USE_CYGSERVER to USE_SERVER.
* Makefile.in (LIBSERVER): Define and use.
* configure.in: Set LIBSERVER as appropriate.
* environ.cc: Rename allow_daemon to allow_server.  Only recognize when
USE_SERVER is defined.
2003-08-25 18:21:07 +00:00
Danny Smith e98b6dbb6d 2003-08-26 Filip Navara <xnavara@volny.cz>
* include/ddk/winddk.h (RTL_REGISTRY_*): Add defines.
	(IoSetCompletionRoutine): Cast _CompletionRoutine arg to
	PIO_COMPLETION_ROUTINE.
2003-08-25 10:20:36 +00:00
Danny Smith 1b1c7fbfa5 test new snmp headers 2003-08-25 09:52:10 +00:00
Danny Smith 912800ed01 Add snmp API
2003-08-26  Filip Navara  <xnavara@volny.cz>

	* include/snmp.h: New file.
	* include/winsnmp.h: New file.
	* include/mgmtapi.h: New file.
	* lib/snmpapi.def: New file.
	* lib/wsnmp32.def: New file.
	* lib/igmpagnt.def: New file.
	* lib/mgmtapi.def (SnmpMgrCtl) Add stub.
	(SnmpMgrGetTrapEx): Ditto.
	(SnmpMgrMIB2Disk): Remove.
	(dbginit): Remove.
2003-08-25 09:33:14 +00:00
Danny Smith 6315f62b20 2003-08-25 Steven Edwards <Steven_Ed4153@yahoo.com>
* include/ddk/ntifs.h: Change all C++ style comments to C.
	* include/GL/gl.h: Ditto.

2003-08-25  Martin Fuchs  <Martin-Fuchs@gmx.net>

	* include/shlobj.h (SFGAO_GHOSTED): Correct.
	(SFGAO_HIDDEN): Add define.
2003-08-25 02:02:37 +00:00
Danny Smith 1a5c6b9d0a 2003-08-25 Filip Navara <xnavara@volny.cz>
* include/commctrl.h (ILCF_*): Add defines.
	(ILD_*): Ditto.
	(HDS_*); Ditto.
	(IPN_FIRST, IPN_LAST): Cast to UINT.
	(SBN_FIRST, SBN_LAST): Add defines.
	(PGN_*): Ditto.
	(HDF_JUSTIFYMASK): Fix typo.
	(HDM_*): Add defines.
	(HICF_*): Ditto.
	(I_INDENTCALLBACK,I_IMAGENONE): Ditto.
	(TBSTATE_MARKED): Add define.
	(TBSTYLE_EX_*): Add defines.
	(TBCDRF_*): Ditto.
	(IDB_HIST_SMALL_COLOR,IDB_HIST_LARGE_COLOR): Ditto.
	(TB_*): Ditto.
	(TBN_*): Ditto.
	(TBNRF_*): Ditto.
	(TTF_*): Ditto.
	(TBCD_*): Ditto.
	(TBDDRET_*): Ditto.
	(TBIMHT_*): Ditto.
	(TTM_*): Ditto.
	(UDM_*): Ditto.
	(TBIF_BYINDEX): Define as hex constant.
	(CDIS_*): Add defines.
	(CDDS_SUBITEM): Add define.
	(LVIF_*): Add defines.
	(LVM_*): Ditto.
	(LVGIT_UNFOLDED): Add define.
	(TVM_): Add defines.
	(TVE_EXPANDPARTIAL): Add define.
	(TVGN_LASTVISIBLE): Ditto.
	(TVN_*): Add defines.
	(TVNRET_*): Add defines.
	(TCIF_STATE): Add define.
	(NM_TOOLTIPSCREATED): Ditto.
	(CCM_*): Add defines.
	(INFOTIPSIZE): Add numeric value.
	(ODT_LISTVIEW): Ditto.
	(MCM_GETMAXTODAYWIDTH): Ditto.
	(MCHT_*): Add defines.
	(UDM_SETRANGE32,UDM_GETRANGE32): Define in terms of WM_USER.
	(PGF_*): Add defines.
	(PGM_*): Ditto.
	(TBINSERTMARK): Add structure.
	(LPIMAGEINFO) Add typedef.
	(LPHDHITTESTINFO): Ditto.
	(NMLVGETINFOTIP[AW]: Add structures.
	(NMTBCUSTOMDRAW): Add structure.
	(TTTOOLINFOA_V*_SIZE): Add macros.
	(TTTOOLINFOW_V1_SIZE): Ditto.
	(IMAGELISTDRAWPARAMS): Add new members for WXP.
	(LVITEM[AW]: Ditto.
	(TCITEM[AW]):Ditto.
	(CCSIZEOF_STRUCT): Correct macro definition.
	(ListView_*): Add new macros.
	(HIMAGELIST): Correct typedef.
	(HTREEITEM): Ditto.

2003-08-25   Danny Smith <dannysmith@users.sourceforge.net>

	* commctrl.h (TC_HITTESTINFO): Remove. Add defines for
	TCHITTESTINFO for backward compatibility.
	(TC_ITEM[AW]): Rename to TCITEM[AW]. Add defines for backward
	compatibility.
2003-08-25 01:39:59 +00:00
Danny Smith 110af2d2db 2003-08-24 Danny Smith <dannysmith@users.sourceforge.net>
* include/objidl.h (COBJMACROS): Define macros only
	if using C interace.
	* include/unknwn.h: Ditto.
	* include/comcat.h: Ditto.

2003-08-24  Filip Navara  <xnavara@volny.cz>

	* include/prsht.h (PSH_WIZARDHASFINISH, PSH_WIZARD_LITE,
	PSH_NOCONTEXTHELP): Define.
	(PSH_WIZARD97): Fix definition for _WIN32_IE >= 0x500.
	* include/winuser.h (DFCS_TRANSPARENT, DFCS_HOT): Define.
	(LPDLGTEMPLATE[AW]): Add typedefs.
2003-08-24 23:04:57 +00:00
Christopher Faylor be1ea8cde7 * syscalls.cc (_remove_r): Define. 2003-08-23 18:03:16 +00:00
Christopher Faylor 5c6497b43f * cygheap.h (enum cygheap_types): Add HEAP_MMAP.
(CYGHEAPSIZE): Add another 64K.
* mmap.cc: Use cmalloc, ccalloc and crealloc with HEAP_MMAP type throughout.
2003-08-23 00:03:54 +00:00
Christopher Faylor 7f32ba3a8d * cygheap.cc (user_heap_info::max): New field.
* heap.cc (heap_init): Save pointer to end of heap reserved memory.
(sbrk): Don't attempt to commit memory beyond end of heap reserved memory.
Attempt to honor comment and reserve commitbytes if heapchunk fails.
2003-08-22 19:33:09 +00:00
Christopher Faylor 897c6b5231 * exceptions.cc (sigreturn): Don't clobber ebp in recursive signal calls. 2003-08-22 19:25:56 +00:00
Christopher Faylor 29cd21d03a * exceptions.cc (sig_handle): Change so that default signals indicate success. 2003-08-22 17:01:53 +00:00
Danny Smith 01d699914d 2003-08-22 Filip Navara <xnavara@volny.cz>
* include/aclapi.h (BuildImpersonateExplicitAccessWithName[AW]):
	Add prototypes.
	BuildImpersonateTrustee[AW]): Add prototypes.
	GetMultipleTrustee[AW]): Add prototypes.
	GetMultipleTrusteeOperation[AW]): Add prototypes.

Add missing changelog entry from last commit.
2003-08-22 11:21:28 +00:00
Danny Smith 9e80cb966c 2003-08-22 Danny Smith <dannysmith@users.sourceforge.net>
* include/winnt.h (IMAGE_SUBSYSTEM_XBOX): Add define.

2003-08-22  Mihai Preda <mihai_preda@users.sourceforge.net>

	* include/shlobj.h (IPersistFolder::GetClassID):
	Correct declaration.
	(CMF_*) Add missing defines.

2003-08-22   Danny Smith <dannysmith@users.sourceforge.net>

        * include/winuser.h (DC_BUTTONS): Add define.

2003-08-22  Andrew Greenwood  <lists@silverblade.co.uk>

        * include/winuser.h (DC_GRADIENT): Add define.

2003-08-22  Martin Fuchs  <Martin-Fuchs@gmx.net>

	* include/commctrl.h (BTNS_*): Define BTNS_* as successors to the
	older TBSTYLE_* constants.
2003-08-22 10:50:54 +00:00
Christopher Faylor 095abc79ba * sigproc.cc (wait_sig): Remove redundant test in do/while. 2003-08-22 03:40:49 +00:00
Christopher Faylor a9f7754462 * sigproc.cc (wait_sig): Avoid infinite loop. 2003-08-22 01:07:01 +00:00
Christopher Faylor b5c5b9996a * speclib: Reenable removal of temp files. 2003-08-21 03:36:02 +00:00
Christopher Faylor d688945c44 * miscfuncs.cc (low_priority_sleep): Sleep at same priority as main thread.
* sigproc.cc (wait_sig): Keep looping if there are more signals to consider and
we are flushing signals.
(sig_send): Put nonsync signals in the correct bucket.
2003-08-21 03:18:46 +00:00
Christopher Faylor 0b10f795f1 * speclib: Fix created lib to avoid "File truncated" problems. 2003-08-21 02:19:25 +00:00
Christopher Faylor 2bf794af9a * exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a race. 2003-08-20 18:09:24 +00:00
Christopher Faylor 6f6d673cc5 * sigproc.cc (wait_sig): Ensure that myself->getsigtodo array is flushed on a
__SIGFLUSH.  Christopher Faylor <cgf@redhat.com>
* exceptions.cc (_sigreturn): Handle nested signals without growing the stack.
2003-08-20 05:15:33 +00:00
Christopher Faylor 5f31e0f305 * exceptions.cc (pending_signals): Remove unneeded declaration.
* sigproc.cc (pending_signals): Make static.
(wait_sig): Use defined values rather than integers for rc.  Never scan both
todo arrays as this could cause hangs if signals arrive from two different
sources.  Rename saw_pending_signals to saw_failed_interrupt.  Exit loop when
signal found.  Enter low-priority sleep, if necessary, after finished
signalling completion.  Set pending_signals when blocked
(from Pierre Humblet).
2003-08-20 02:31:26 +00:00
Christopher Faylor 6ac844b5e3 clarify 2003-08-20 01:19:04 +00:00
Christopher Faylor 06bb489932 * signal.cc (sigpending): Move.
* sigproc.cc (sigpending): To here.
(getlocal_sigtodo): Return process-local signal array.
(sigpending): Accommodate new process-local signal array.
(sig_send): Ditto.
(sig_set_pending): Ditto.
(wait_sig): Ditto.
2003-08-19 05:47:44 +00:00
Christopher Faylor 05cb7b17cb Throughout, eliminate argument to sig_dispatch_pending.
* exceptions.cc (setup_handler): Move non-interruptible condition handling
(back) to wait_sig (as suggested by Pierre Humblet).
(set_process_mask): Don't worry about calling sig_dispatch_pending from
sigthread since it is detected in the function anyway.
(sig_handle): Eliminate thisproc arg.  Don't call sig_dispatch_pending on
SIGCONT since that should happen automatically.
* sigproc.cc (sig_dispatch_pending): Eliminate justwake argument.  Just return
when called from sigthread.
(wait_sig): Change some variables to bool.  Change inner while to an if.  Move
uninterruptible signal handling here.
(sigproc_terminate): Don't call sig_dispatch_pending.  Just increment semaphore
on exit.
* speclib: Use slightly different (but still flawed) method for determining
symbols to extract from libraries.
2003-08-19 04:10:42 +00:00
Christopher Faylor 755f575f15 correct attribution, since this is not Pierre's patch. 2003-08-19 01:17:53 +00:00
Christopher Faylor 372cd2cbe6 * exceptions.cc (sigdelayed): Fix race where signal handler could get the wrong
mask.
2003-08-19 00:31:56 +00:00
Christopher Faylor 9d7f26eaf4 * path.cc (mount): Add null/empty check for input parameters.
(umount): Add null/empty check for input parameters.
2003-08-19 00:18:48 +00:00
Danny Smith bb7c60962d 2003-08-17 Danny Smith <dannysmith@users.sourceforge.net>
* include/commctrl.h (TB_*) Group defines together.

2003-08-17  Martin Fuchs  <Martin-Fuchs@gmx.net>

	* include/winuser.h (ICON_SMALL2): Define.
	* include/commctrl.h (TB_SETBUTTONWIDTH,TB_SETDRAWTEXTFLAGS):
	Define.
	* include/shlobj.h (SHDRAGIMAGE): Define structure.
	(IDragSourceHelper) Define interface.
  	(IDropTargetHelper): Likewise.
	(IExtractIcon): Unicode it.
	(ICommDlgBrowser): Use IShellView type as param in OnDefaultCommand,
	OnStateChange and IncludeObject methods.
2003-08-18 09:43:24 +00:00
Corinna Vinschen 981f9625f3 * grp.cc (read_group): Revert previous change.
* uinfo.cc (pwdgrp::load): Always reset curr_lines.
2003-08-17 17:50:40 +00:00
Corinna Vinschen 919497ee6b * dump_setup.cc (check_package_files): Strip leading / and ./ from
package file names.
2003-08-17 17:26:08 +00:00
Corinna Vinschen 22d82f9f46 * errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.
* fhandler_raw.cc (fhandler_dev_raw::raw_read): Set more accurate
	errnos instead of EACCES.
	(fhandler_dev_raw::raw_write): Ditto.
2003-08-17 17:12:18 +00:00
Christopher Faylor 293ce8104d * path.cc (special_name): Accommodate all special names with extensions. 2003-08-17 16:33:15 +00:00
Danny Smith 597b518cb9 Add ChangeLog entry for last commit. 2003-08-17 08:55:28 +00:00
Danny Smith 5ca7a646d5 2003-08-17 Martin Fuchs <Martin-Fuchs@gmx.net>
* include/commctrl.h (TreeView_GetScrollTime,
	TreeView_SetScrollTime): Define macros.
	* include/winuser.h (GetShellWindow): Add prototype.
	* include/objidl.h (STGMEDIUM): Correct lpszFileName type.
2003-08-17 08:47:37 +00:00
Corinna Vinschen b723879025 * dump_setup.cc (package_find): Don't stop searching on missing
file list.
	(package_list): Ditto.

	* dump_setup.cc: (package_list): Make output terse unless
	verbose requested.  Fix formatting.
	(package_find): Ditto.
2003-08-16 09:09:09 +00:00
Corinna Vinschen 200f243c42 * cygcheck.cc (main): Fix some formatting and help text printing.
* cygcheck.cc (find_package,list_package): New global
	variables.
	(usage): Add "--find-package" and "--list-package" options,
	reformat output.
	(longopts, opts): Add "--find-package" and "--list-package"
	options.
	(main): Process the "--find-package" and "--list-package"
	flags.  Add new semantic checks.  Add calls to find_package()
	and list_package().
	* dump_setup.cc: Fix header comment.
	(match_argv): Change return type to int to distinguish
	between real matches and default ones.
	(open_package_list): New static function.
	(check_package_files): Factor out opening the package list
	file into open_package_list().
	(get_packages): New static function.
	(dump_setup): Factor out getting a list of packages into
	get_packages().
	(package_list, package_find): New global functions.
2003-08-15 20:26:11 +00:00
Corinna Vinschen 92d897cde2 * mmap.cc (mmap64): Avoid crash if file size is less than requested
map length.
2003-08-15 12:05:08 +00:00
Corinna Vinschen dae37d5d84 * regtool.cc (usage): Add missing linefeed. Move example to --help
text.  Fix forward slash description.
2003-08-15 08:58:54 +00:00
Danny Smith b98580a716 2003-08-15 Martin Fuchs <Martin-Fuchs@gmx.net>
* include/shguid.h (CLSID_DragDropHelper, IID_IDropTargetHelper,
	IID_IDragSourceHelper): Declare.
	* lib/shell32.c (CLSID_DragDropHelper, IID_IDropTargetHelper,
	IID_IDragSourceHelper): Define.
2003-08-15 03:04:25 +00:00
Danny Smith 37f0dc7a05 2003-08-15 Andrew Greenwood <lists@silverblade.co.uk>
* include/wingdi.h (DEVMODE[AW]) Correct structure definition.
	* include/ddk/ntapi.h (LPC_TYPE): Add LPC_CONNECTION_REFUSED.
	* include/ddk/winddk.h (IRP_*): Add constants as anonymous enum.
2003-08-15 02:19:54 +00:00
Corinna Vinschen e2b1a74c13 * dump_setup.cc (check_package_files): Fix extra '/' in filename.
Resize command buffer.  Fix buffer overflow bug.
2003-08-13 19:37:40 +00:00
Corinna Vinschen 6763d47b1e * path.cc (special_name): Add checks for some specials followed by
a "." and a FIXME comment.
2003-08-13 17:28:00 +00:00
Corinna Vinschen ae89a49602 * cygwin.din: Accomodate change from cygwin_lstat to lstat.
* syscalls.cc: Add defines to avoid declaration issues when
	renaming cygwin_lstat back to lstat.
	(lstat): Reverted name change from cygwin_lstat.
2003-08-13 11:28:42 +00:00
Corinna Vinschen c86c10b803 * include/sys/param.h (NBBY): Define if not defined.
* include/sys/param.h (setbit): Add new bitmap related macro.
	(clrbit): Likewise.
	(isset): Likewise.
	(isclr): Likewise.
	(howmany): Add new counting/rounding macro.
	(rounddown): Likewise.
	(roundup): Likewise.
	(roundup2): Likewise.
	(powerof2): Likewise
	(MIN): Add macro for calculating min.
	(MAX): Add macro for calculating max.
2003-08-12 10:23:40 +00:00
Danny Smith 6c7560c901 * lib/uuid.c (CGID_Explorer, CGID_ShellDocView,
CGID_ShellServiceObject): Remove definitions.
	* lib/shell32.c (CGID_ShellServiceObject): Add definition.

	Correct last ChangeLog entry for lib/shell32.def.
2003-08-10 09:19:06 +00:00
Christopher Faylor e41630b08a * dump_setup.cc (dump_setup): Check for the existence of the package list file.
Rework slightly to use static buffer for popen commands.
2003-08-10 01:07:04 +00:00
Danny Smith 46258d6fb8 2003-08-10 Danny Smith <dannysmith@users.sourceforge.net>
* include/shlobj.h (SHELLSTATE): Add structure.
	(SHGetSetSettings): Add prototype.
	(SHGetSettings): Add prototype.
	* lib/user32.def (SHGetSetSettings): Add stub.

2003-08-10  Phil Krylov  <likewolf@users.sourceforge.net>

	* include/commctrl.h (HDM_ORDERTOINDEX): Add define.
	(Header_OrderToIndex): Add macro.
	(Header_GetOrderArray): Add macro.

	* include/commdlg.h (FR_MATCHALEFHAMZA,
	FR_MATCHDIAC, FR_MATCHKASHIDA): Add defines.

2003-08-10  Martin Fuchs  <Martin-Fuchs@gmx.net>

	* include/commctrl.h (TVM_GETSCROLLTIME,
	TVM_SETSCROLLTIME): Add defines.
2003-08-10 00:40:01 +00:00
Christopher Faylor 58d4b72d33 * dump_setup.cc (version_len): New static variable.
(could_not_access,directory_exists): New static function.
(file_exists): Ditto.
(check_package_files): Ditto.
(dump_setup): Check the contents of each package if check_files is true and
output the result in the "Status" column.  Flush output after each package.
* dump_setup.cc (dump_setup): Remove redundant null check.  Add informative
message if package info not found.
2003-08-09 16:32:22 +00:00
Christopher Faylor 9d77d53601 * include/cygwin/version.h: Bump DLL minor number to 3. 2003-08-09 16:32:03 +00:00
Christopher Faylor 5c65fa0200 * include/stdint.h: Correctly define INT32_MIN. 2003-08-08 19:30:41 +00:00
Christopher Faylor b344f1876c * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr after
free() is called.
2003-08-08 19:28:34 +00:00
Christopher Faylor 0601b11fb6 fix typo 2003-08-06 03:39:36 +00:00
Christopher Faylor 8440f55d74 typo 2003-08-06 03:22:18 +00:00
Christopher Faylor 16f9bc1323 * Makefile.common: Hmm. Older compilers seem to need -nostdinc. 2003-08-06 02:35:33 +00:00
Christopher Faylor c6f80f3e29 * Makefile.common: Don't send -nostdinc++ with g++. 2003-08-06 02:06:43 +00:00
Christopher Faylor 4b154cc1b3 * Makefile.in: Rework to accommodate new speclib arguments.
* speclib: Rework to extract everything from libcygwin.a rather than building
things from existing object files.
2003-08-06 01:40:12 +00:00
Christopher Faylor 4423d92489 * path.cc (cygdrive_getmntent): Do not skip over drives of type
DRIVE_REMOVABLE.
* fhandler.cc (fhandler_base::lseek): Be more paranoid when constructing
offsets from 64 bit value.
* syscalls.cc (logout): Avoid temp buffer memcpy since new scheme does not
require it.
(utmp_data): Rework as a macro which returns a pointer into a buffer.
(getutent): Use new buffer allocation mechanism to grab a utmp buffer.
(getutid): Ditto.
(pututline): Ditto.
2003-08-05 04:49:44 +00:00
Christopher Faylor 3fea2e4087 * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Do not change 'errno' if
end of directory condition is encountered as per SUSv2.
* fhandler_proc.cc (fhandler_proc::readdir): Ditto.
* fhandler_process (fhandler_process::readdir): Ditto.
* fhandler_registry (fhandler_registry::readdir): Ditto.
2003-08-05 03:04:28 +00:00
Christopher Faylor 2f631ebc94 change default for --change-default-prefix 2003-08-05 01:06:22 +00:00
David Starks-Browning 90b3d5dcb6 New canonical location. 2003-08-04 10:40:28 +00:00
Danny Smith 5060d48ee7 * include/shlobj.h (SHELLFLAGSTATE): Add structure.
(SHGetInstanceExplorer): Correct return type.
	(SHGetFolderPath[AW]: Likewise.
	Thanks to Magnus Olsen  <greatlord@sourceforge.users.net>
	for report.
2003-08-03 09:09:07 +00:00
Danny Smith be21429f2f 2003-08-01 Danny Smith <dannysmith@users.sourceforge.net>
* lib/test.c: Include winldap.h, ntldap.h, winber.h.

2003-08-01  Filip Navara  <xnavara@volny.cz>

	* include/winldap.h: New file.
	* include/ntldap.h: New file.
	* include/winber.h: New file.
	* lib/winldap32.def: New file.
2003-08-01 09:11:39 +00:00
Danny Smith 7d18037f8f 2003-08-01 Danny Smith <dannysmith@users.sourceforge.net>
* include/ddk/atm.h: Remove stray '.';

2003-08-01  Gisle Vanem  <gvanem@broadpark.no>

	* include/ddk/winddk.h; Remove trailing ';' from macro expressions,
	throughout. Add () around macro expressions with cast returns,
	throughout.
2003-08-01 01:06:26 +00:00
Joshua Daniel Franklin 4b8283ec80 Screwed up ChangeLog 2003-07-31 21:12:11 +00:00
Joshua Daniel Franklin 0da026c397 * effectively.sgml: New file, "Using Cygwin Effectively with Windows". 2003-07-31 21:06:55 +00:00
Danny Smith 49c12c3f53 2003-7-31 Martin Fuchs <Martin-Fuchs@gmx.net>
* include/shlobj.h (SFGAO_COMPRESSED): Add define.
	(SFGAOF,SHGDNF): Add typedef's.
	(SHCONTF): Extend enum.
2003-07-31 10:25:56 +00:00
Danny Smith de03e10ca5 * include/shellapi.h: Include all structs within pshpack2.h/
poppack.h block.
2003-07-31 05:40:39 +00:00
Christopher Faylor b9621e8d94 * dcrt0.cc (_dll_crt0): Move strace.microseconds initialization to after
pthread initialization.
(dll_crt0_1): i.e., here.
2003-07-30 04:46:07 +00:00
Christopher Faylor 8e2315f07d * include/cygwin/version.h: Bump DLL minor number to 2. 2003-07-28 21:14:25 +00:00
Christopher Faylor d2466c7aa0 * fhandler_base.cc (fhandler_base::readv): Rework to properly return number of
bytes from read.
2003-07-28 21:13:17 +00:00
Danny Smith e816a74f80 * include/winuser.h (ASFW_ANY, LSFW_LOCK, LSFW_UNLOCK,
LWA_COLORKEY, LWA_ALPHA): Guard with _WIN32_WINNT,
	_WIN32_WINDOWS, not WINVER.
	(AllowSetForegroundWindow,LockSetForegroundWindow,
	SetLayeredWindowAttributes): Likewise.
	(GetLayeredWindowAttributes,UpdateLayeredWindow): Add prototypes.
	* lib/user32.def (GetLayeredWindowAttributes,UpdateLayeredWindow):
	Add stubs.
2003-07-26 11:58:24 +00:00
Christopher Faylor 035df9eff5 * mount.cc (do_mount): Issue warning when using managed mount option on
non-empty directory.
2003-07-26 05:38:51 +00:00
Christopher Faylor df04ae29b2 * exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if there
is a tty associated with the process.  Send SIGHUP on CTRL_LOGOFF_EVENT.
* fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open handle
counter regardless of whether this is a pty or tty.
(fhandler_tty_slave::open): Ditto.
(fhandler_tty_slave::dup): Ditto.
(fhandler_tty_common::set_close_on_exec): Ditto.
(fhandler_tty_master::init_console): Decrement console open handle counter
after init since it will now be handled by all tty open.
* syscalls.cc (setsid): Rework debugging output slightly.
2003-07-26 04:53:59 +00:00
Christopher Faylor ddb6762155 * configure.in: Use 'install-sh -c'.
* configure: Regenerate.
2003-07-26 01:53:18 +00:00
Christopher Faylor 4b2bb1425e revert erroneous checkin 2003-07-26 01:52:52 +00:00
Christopher Faylor c2af0de226 * Makefile.in: Only use localhost when building mingw with distcc or gcc won't
be able to find .exp files on other hosts.
2003-07-26 01:51:39 +00:00
Danny Smith ffe3e7ef4f 2003-07-26 Eric R. Krause <ekrause_98@users.sourceforge.net>
* include/onjidl.h (IMalloc): Fix typo.
2003-07-26 01:01:03 +00:00
Christopher Faylor 8c21a4cdfb preliminary checkin 2003-07-26 00:49:12 +00:00
Christopher Faylor d9cbe316d5 preliminary checkin 2003-07-26 00:43:57 +00:00
Christopher Faylor 5ed664d4a6 preliminary checkin 2003-07-26 00:28:59 +00:00
Christopher Faylor 9ddd929f68 preliminary checkin 2003-07-26 00:10:48 +00:00
Christopher Faylor 7f4773b3ef * configure.in: Always use install-sh.
* configure: Regenerate.
2003-07-25 23:52:30 +00:00
Christopher Faylor 5d66faab67 * include/cygwin/socket.h: Conditionalize [AP]F_INET6 define. 2003-07-25 17:57:51 +00:00
Christopher Faylor 6f8c86aec5 * Makefile.in (OBSOLETE_FUNCTION): Add fdopen. 2003-07-25 17:42:08 +00:00
Christopher Faylor 86ed5c8821 * cygwin.din: Export _fdopen64
* Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
* include/cygwin/version.h: Bump api minor number.
* ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT definition.
2003-07-25 16:13:12 +00:00
Danny Smith 468f9fa2fe * include/dkk/ntifs.h: Fix typo in guard for
#pragma GCC system_header.
2003-07-24 20:55:48 +00:00
Christopher Faylor 1fbeb8274f * environ.cc (check_case_init): Use strncasematch.
* cygwin.din: Export __mempcpy.
* cygwin/version.h: Bump api minor number.
2003-07-24 19:33:14 +00:00
Danny Smith b57a74b210 * include/objidl.h (PropVariant): Add CHAR cVal field
to union.
	(FMTID_SummaryInformation, FMTID_DocSummaryInformation,
	FMTID_UserDefinedProperties): Declare.
2003-07-22 22:48:00 +00:00
Danny Smith f7ef885903 * include/winbase.h (GetModuleHandleEx[AW]): Add prototypes. 2003-07-22 22:36:03 +00:00
Danny Smith 1058b66e9a * include/winbase.h (DUPLICATE_CLOSE_SOURCE,
DUPLICATE_SAME_ACCESS): Remove defines.
	(HANDLE_FLAG_INHERIT, HANDLE_FLAG_PROTECT_FROM_CLOSE): Sync with
	ddk/ntapi.h defines.
	(SEM_*) : Likewise.
	* include/winnt.h (COMPRESSION_*, ACCESS_*, SYSTEM_*): Sync with
	ddk/ntifs.h defines.
	(FILE_*): Likewise.
	(MEM_IMAGE, SEC_*): Likewise.
	(DUPLICATE_CLOSE_SOURCE, DUPLICATE_SAME_ACCESS,
	DUPLICATE_SAME_ATTRIBUTES): Sync with ddk/winddk.h defines.
	(TOKEN_*): Sync with ddk/ntifs.h defines.
	* include/ddk/ntapi.h: Add comments noting definitions in
	winbase.h.
	* include/ddk/ntifs.h: Add comments noting definitions in
	winnt.h.
	* include/ddk/winddk.h: Add comments noting definitions in
	winnt.h.
2003-07-22 22:21:27 +00:00
Corinna Vinschen d432ac751b * mmap.cc: Use proper format specifiers for _off64_t and size_t in
format strings passed to syscall_printf () and debug_printf ()
	throughout.
2003-07-21 13:06:49 +00:00
Christopher Faylor 522483e4f6 * Makefile.common (CFLAGS_COMMON): Remove -march=i386. 2003-07-18 16:40:59 +00:00
Danny Smith 00314d7e16 * include/winnt.h (FILE_*): Sync with ddk/winddk.h.
* include/winioctl.h (FILE_*): Sync with ddk/winddk.h.
2003-07-18 10:21:01 +00:00
Pierre Humblet b4ece40c0f 2003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
* security.cc (verify_token): Fix white space and style.
        Use type bool instead of BOOL and char. Use alloca
        instead of malloc and free for my_grps.
2003-07-18 02:14:42 +00:00
Danny Smith a817d5a835 2003-07-17 Pierre Humblet <pierre.humblet@ieee.org>
* include/mmsystem.h (TIME_KILL_SYNCHRONOUS): Add define.
2003-07-17 08:23:06 +00:00
Corinna Vinschen fc2843ca96 * sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
_SC_PAGESIZE again.
2003-07-17 07:35:16 +00:00
Christopher Faylor 5b429f2674 update copyright 2003-07-17 05:27:03 +00:00
Danny Smith a13fa879dd Clean up warnings in ddk.
* include/ddk/atm.h (_ATM_AAL_OOB_INFO): Add _ANONYMOUS_UNION,
	conditional on  __cplusplus.
	* include/ddk/scsi.h: Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT
	defines, throughout.
	(_CDB): Add _ANONYMOUS_UNION, conditional on __cplusplus.
	* include/ddk/cfg.h (_PNP_VETO_TYPE): Remove extra comma.
	* include/ddk/cfgmgr32.h: Change C++ comment style to ISO C.
	* include/ddk/ddkmapi.h (_DDLOCKOUT): Add _ANONYMOUS_UNION defines.
	* include/ddk/hidpi.h: Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT
	defines, throughout.
	* include/ddk/ndis.h: Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT
	defines, throughout. Remove trailing semicolon from *_S 'structure'
	macro expansion, throughout. Remove trailing semicolon from
	DECLARE_UNKNOWN_STRUCT macro expansion.
	* include/ddk/ndiswan.h (_NDIS_WAN_COMPRESS_INFO): Add
	_ANONYMOUS_UNION.
	* include/ddk/ntapi.h (_PROCESS_DEVICEMAP_INFORMATION,
	_PROCESS_SESSION_INFORMATION): Add _ANONYMOUS_UNION.
	* include/ddk/ntddcdrm.h (CDROM_TOC_CD_TEXT_DATA_BLOCK):
	Add _ANONYMOUS_UNION.
	* include/ddk/ntdddisk.h: Add _ANONYMOUS_UNION, throughout.
	* include/ddk/ntddmou.h:  Add _ANONYMOUS_UNION, throughout.
	* include/ddk/ntifs.h:  Add _ANONYMOUS_UNION, throughout.
	(ZwQueryObject): Change 2nd param to OBJECT_INFORMATION_CLASS, to
	match proto in ntapi.h.
	(ZwSetInformationObject): Likewise.
	* include/ddk/srb.h (SCSI_REQUEST_BLOCK): Add _ANONYMOUS_UNION.
	(SCSI_ADAPTER_CONTROL_TYPE): Add __extension__.
	* include/ddk/tdikrnl.h (TDI20_CLIENT_INTERFACE_INFO): Add
	_ANONYMOUS_UNION and _ANONYMOUS_STRUCT.
	* include/ddk/usb.h (USB): Add _ANONYMOUS_UNION.
	* include/ddk/usbcamdi.h (USBCAMD_CamControlFlags): Remove
	last comma.
	* include/ddk/video.h (STATUS_BLOCK): Add _ANONYMOUS_UNION.
	* include/ddk/winddk.h (DECLARE_INTERNAL_OBJECT): Remove
	trailing semicolon when expanding macro.
	(GENERAL_LOOKASIDE_S): Likewise.
	Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT, throughout.
	Change inline to __inline, throughout.
	* include/ddk/winnt4.h: Change inline to __inline, throughout.
2003-07-16 21:49:02 +00:00
Christopher Faylor 908a2a2bc0 * pathnames.sgml: Use correct registry key. Clarify '@' operation.
* ntsec.sgml: Reword references to "ntsec patch".
2003-07-16 02:12:00 +00:00
Corinna Vinschen ea3ba11499 * cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
value for tokens.
	* syscalls.cc (seteuid32): Ditto.  Set new_token to process token if
	process token is suitable.
	* uinfo.cc (uinfo_init): Initialize tokens in cygheap user info
	to INVALID_HANDLE_VALUE.

	* cygheap.h (enum impersonation): Delete.
	(cygheap_user::impersonation_state): Delete.
	(cygheap_user::current_token): New.
	(cygheap_user::issetuid): Modify to use current_token.
	(cygheap_user::token): Ditto.
	(cygheap_user::deimpersonate): Ditto.
	(cygheap_user::reimpersonate): Ditto.
	(cygheap_user::has_impersonation_tokens): Ditto.
	(cygheap_user::close_impersonation_tokens): Ditto.
	* security.cc (cygwin_set_impersonation_token): Always set the token.
	(verify_token): Change type of gsid to cygpsid.
	(get_file_attribute): Use the effective ids.
	* syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
	* uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
2003-07-14 17:04:21 +00:00
Danny Smith 8330615ded 2003-07-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ddk/ntifs.h (KeInsertQueueApc): Make return type
	BOOLEAN. Name parameter 4 PriorityBoost and make it of type
	KPRIORITY.
	* include/ddk/winddk.h (_KPCR): Put IDT field on next line.
	* include/ddk/winddk.h (_IO_STATUS_BLOCK, _IRP, _OWNER_ENTRY,
	_ERESOURCE, _IMAGE_INFO, _CREATE_DISK, _DISK_SIGNATURE, _KPCR_TIB):
	Apply _ANONYMOUS_UNION to anonymous unions and _ANONYMOUS_STRUCT
	to anonymous structs.
2003-07-13 03:41:46 +00:00
Christopher Faylor 9e8ac0ae35 * pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
communicating pid actually stops eventually.
2003-07-12 21:37:07 +00:00
Danny Smith a6674ee61b * include/winnt.h (PVOID): Move to before HANDLE typedef.
* include/winuser.h (mouse_event): Correct type of fifth param,
	Thanks to: Andrew Jones <guln at users dot sourceforge dot net>
2003-07-12 09:26:43 +00:00
Earnie Boyd 57552a7378 * include/winnt.h (HANDLE): Define based on STRICT filter.
(THREAD_BASE_PRIORITY_MIN): Use parens around negative value.
	(THREAD_BASE_PRIOIRTY_IDLE): Ditto.
2003-07-11 11:56:00 +00:00
Christopher Faylor e47d564835 * path.cc (get_device_number): Remove special com? consideration.
(special_chars): Make static.
(special_introducers): New.
(special_char): Allow specified valid_chars args.
(fnunmunge): Handle aux-like filenames correctly.
(special_name): Add con, conin$, conout$.
(mount_item::fnmunge): Use __small_sprintf return value to calculate
increments.
2003-07-11 00:54:46 +00:00
Christopher Faylor 30811232c7 * include/cygwin/version.h: Bump DLL minor number to 1. 2003-07-10 02:33:27 +00:00
Christopher Faylor 2f5cab7bb2 * fhandler_proc.cc (format_proc_stat): Use correctly sized constants for
filling in zeros on 98.
2003-07-10 02:09:24 +00:00
Christopher Faylor f1a4b6b59a * include/cygwin/version.h: Bump DLL minor number to 1. 2003-07-10 01:58:39 +00:00
Christopher Faylor cf38615c3b * fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space for stat
buffer.
(format_proc_stat): Reorganize to accumulate and report on all cpus.
2003-07-10 01:09:24 +00:00
Christopher Faylor ab3dc80d9e * sysconf.cc (sysconf): Return processors online rather than bitmask for
_SC_NPROCESSORS_ONLN.
2003-07-09 23:59:47 +00:00
Christopher Faylor 4d782b426a * cygheap.cc (creturn): Set appropriate errno when out of memory.
(ccalloc): Only issue system_printf when debugging.
* dtable.cc (dtable::extend): Only allocate 100 * the incremental growth size
max.  Set errno appropriately.
(dtable::build_fhandler): Check for error from set_name.
* fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
* fhandler.h (fhandler_base::set_name): Change to bool.
* fhandler_process.cc (format_process_stat): Fix formatting.
* resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
* sysconf.cc (sysconf): Ditto.
2003-07-09 01:33:06 +00:00
Danny Smith 49a14729eb * include/commctrl.h (NMTVDISPINFO[AW]): Replace obsolete struct
names _TV_DISPINFO[AW] and typedefs. Add defines for backward
	compatability. Thanks to Magnus Olsen <greatlord@users.sf.net>
	for report.
2003-07-08 11:11:58 +00:00
Christopher Faylor a711a5af45 * rmsym: Don't use ranlib. 2003-07-07 05:32:24 +00:00
Christopher Faylor c0a6fcd75b * newsym: Reenable removal of tmp directory. Just use ar to generate archive
index.
* Makefile.in: Don't send ranlib to newsym.
2003-07-07 05:30:33 +00:00
Christopher Faylor 0e5db0bfe8 * newsym: Create objects that are closer to those created by dlltool so as not
to confuse --export-all-symbols.
* rmsym: Be a little more accepting of object filenames now that dlltool can
create different format files.
2003-07-07 05:23:35 +00:00
Christopher Faylor c522b9078c * newsym: Oops. Revert below change. 2003-07-07 00:14:58 +00:00
Christopher Faylor 88a628163e * newsym: Use correct prefix for generating imports.
* pinfo.cc (_pinfo::commune_send): Don't wait forever for a response from
another process.
2003-07-06 23:24:13 +00:00
Christopher Faylor f346ea770f update copyright 2003-07-06 21:45:21 +00:00
Christopher Faylor 35738f040e * winsup.api/known_bugs.tcl: Remove gethostid01 from list of known bugs. 2003-07-06 21:40:38 +00:00
Christopher Faylor 0d043e9aac white space 2003-07-06 20:13:48 +00:00
Christopher Faylor b671715358 * syscalls.cc (gethostid): Set thread affinity so that results are predictable. 2003-07-06 20:08:42 +00:00
Christopher Faylor e2723b750a * Makefile.in: Remove .dat files when cleaning. 2003-07-06 19:25:40 +00:00
Christopher Faylor d9a7d28a3f * Makefile.in: Remove .d files when cleaning. 2003-07-06 19:24:31 +00:00
Corinna Vinschen f2d3c47b14 * mmap.cc (list::match): Add parameters to return valid address and
length back to munmap().  Evaluate intersection between given
	area and mapped area and return it, if any.
	(mmap64): On regular files, don't allow mappings beginning beyond
	EOF.  Return with errno set to ENXIO instead.
	(munmap): Rewrite SUSv3 conformant.  Check if given memory area is
	valid.  Unmap all maps inside given memory area.  Don't return error
	if no mapping has been unmapped.
2003-07-05 18:59:35 +00:00
Corinna Vinschen 4b2cbaeefd * fhandler.h (fhandler_socket::get_connect_state): New method to
return socket connection state.
	* fhandler_socket.cc (dup): Copy socket connect state to new file
	handle.
	* net.cc (cygwin_rcmd): Mark file handles of sockets returned by
	rcmd() as CONNECTED state.
	(cygwin_rexec): Similarly for rexec().
	(socketpair): Mark both ends of a new socket pair as CONNECTED.
2003-07-05 18:20:13 +00:00
Christopher Faylor 49806b9b06 fix typo 2003-07-04 17:37:59 +00:00
Corinna Vinschen 6694f3054e * mmap.cc (fhandler_disk_file::mmap): Fix address test. 2003-07-04 09:06:54 +00:00
Christopher Faylor baf77a53b0 * mount.cc (struct opt): Remove posix option. 2003-07-04 03:20:22 +00:00
Christopher Faylor 08604f02bc * mount.cc (longopts): Add long "options" keyword.
(opts): Add -o option.
(usage): Display -o option.
(struct opt): New.
(concat3): New function.
(main): Handle -o flag.
2003-07-04 03:11:18 +00:00
Christopher Faylor d108f312f9 * path.cc (fillout_mntent): Change "posix" to "managed". 2003-07-04 03:08:26 +00:00
Christopher Faylor 3f21478315 * fhandler.h (FH_ENC): New enum.
(fhandler_base::get_encoded): New function.
(fhandler_base::set_encoded): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag in
fhandler, as appropriate.
(fhandler_disk_file::readdir): Unmunge filename as appropriate based on new
encoding flag.
* path.cc (normalize_posix_path): Don't punt on files with colons.
(special_char): New function.
(mount_item::fnmunge): Ditto.
(fnunmunge): Ditto.
(special_name): Ditto.
(mount_item::build_win32): Avoid drive considerations when file is encoded.
(mount_info::conv_to_win32_path): Handle encoded filenames.
(mount_info::conv_to_posix_path): Ditto.
(fillout_mntent): Add posix string when directory is encoded.
* path.h (fnunmunge): Declare.
(path_conv::is_encoded): Declare.
2003-07-04 03:07:01 +00:00
Christopher Faylor 8f856553c0 ntsec patch 2003-07-04 01:58:24 +00:00
Christopher Faylor 3d8a75bdbe * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little more of
the cygserver stuff so that ttys actually work.
2003-07-03 21:22:17 +00:00
Corinna Vinschen 6556178009 * mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
If a non-zero addr is given, align it to the next lower 64K boundary.
	(fhandler_disk_file::mmap): If a non-zero address is given, try
	mapping using the given address first.  If it fails and flags is not
	MAP_FIXED, try again with NULL address.
2003-07-03 20:53:26 +00:00
Earnie Boyd 0def41361b * config.guess, config.sub: Update with new versions from ftp.gnu.org. 2003-07-03 15:17:14 +00:00
Earnie Boyd cdff6e0e16 * config.guess, config.sub: Update with versions from ftp.gnu.org. 2003-07-03 15:15:56 +00:00
Danny Smith 235f653a53 * mingwex/math/trunc.c (trunc): Provide lvalue for memory input constraint.
* mingwex/math/truncf.c (truncf): Likewise.
	* mingwex/math/truncl.c (truncl): Likewise.
	* mingwex/math/modff.c (modff): Likewise.
	* mingwex/math/modfl.c (modfl): Likewise.
2003-07-03 11:24:18 +00:00
Danny Smith 78b8a13965 * include/search.h: New file.
* include/stdlib.h: Add comment about qsort, bsearch in
	search.h.
	* test_headers.c: Include search.h.
	* moldname.def.in (lfind, lsearch): Add.
2003-07-03 07:50:53 +00:00
Luke Dunstan b1868c88bc * include/commdlg.h (CommDlg_OpenSave_*): Add parentheses around
macro arguments. Thanks to Tom Bishop <tombishop@users.sf.net>.
	* include/winuser.h (MONITOR_DEFAULTTONULL, MONITOR_DEFAULTTOPRIMARY,
	MONITOR_DEFAULTTONEAREST, MONITORINFOF_PRIMARY): Add defines.
	(TPM_RECURSE): Add guard for Win98/Win2K.
	Thanks to Magnus Olsen <greatlord@users.sf.net>.
2003-07-03 02:19:01 +00:00
Danny Smith e298efab0a * include/process.h (_execv, _execvp, _spawnv, _spawnvp, _execve,
_execvpe, _spawnve, _spawnvpe, execv, execvp, spawnv, spawnvp,
	execve, execvpe, spawnve, spawnvpe): Const-ify all the char params.
2003-07-02 22:09:25 +00:00
Christopher Faylor f3ff0ca9ed * thread.cc: Remove _MT_SAFE conditional. 2003-07-02 03:50:05 +00:00
Christopher Faylor 9c01984ec2 * configure.in: Add --enable-server option.
* configure: Regenerate.
2003-07-02 03:33:01 +00:00
Christopher Faylor 6a59d15696 fix typo 2003-07-02 03:32:04 +00:00
Christopher Faylor 8fb2df196d * configure.in: Fix --enable-server option. 2003-07-02 03:29:40 +00:00
Christopher Faylor 3872e9a419 * Makefile.in: Remove cygserver stuff.
* acconfig.h: Add USE_CYGSERVER define.
* config.h.in: Regenerate.
* configure.in: Add --enable-server setting.
* configure: Regenerate.
* fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize compilation of
cygserver stuff.
* fork.cc (fork_child): Ditto.
* shm.cc: Ditto.
* tty.cc (tty::common_init): Ditto.
* dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
definitions.
* environ.cc: Ditto.
* ntea.cc: Ditto.
* security.cc: Ditto.
* security.h: Ditto.
* syscalls.cc (check_posix_perm): Remove externs that were already declared in
a header.
* winsup.h: Ditto.  Declare _MT_SAFE here.  Delete it someday since cygwin
should always be _MT_SAFE.
2003-07-02 03:16:00 +00:00
Christopher Faylor 4d8d80b8a7 * Makefile.in (OBJS): Move some more files from cygwin directory.
* woutsup.h: Define _MT_SAFE.
2003-07-02 02:31:32 +00:00
Christopher Faylor 1847a1637d * Makefile.common (CFLAGS_COMMON): Remove -Winline since it is too noisy on
newer versions of gcc.
2003-07-02 02:30:16 +00:00
Earnie Boyd f7ba12a587 * include/basetyps.h (small, hyper): Change to __small and __hyper to
avoid user namespace conflicts.
2003-07-01 23:37:00 +00:00
Earnie Boyd acd2330e32 * include/_mingw.h (small, hyper): Change to __small and __hyper to
avoid user space name conflicts.
2003-07-01 23:34:36 +00:00
Christopher Faylor 345ee543e0 first checkin 2003-07-01 21:09:39 +00:00
Christopher Faylor c57452c817 First checkins. 2003-07-01 21:09:30 +00:00
Christopher Faylor 350c2f44b8 * configure.in: Add cygserver subdir.
* Makefile.in: Ditto.
* configure: Regenerate.
* Makefile.common: Remove debugging statements.
2003-07-01 20:51:03 +00:00
Earnie Boyd e21a622054 * mingwex/math/tgamma.c, tgammaf.c, tgammal.c (small):
Rename to Small (case difference).
2003-07-01 13:55:47 +00:00
Earnie Boyd 6dbe0697a7 Change existing guards to use the above macro names as appropriate.
* include/basetyps.h (__int32, __int16, __int8, small, hyper): Define.
	Note: Also added to mingw/include/_mingw.h.
2003-07-01 13:01:41 +00:00
Earnie Boyd fecdb8380e * include/_mingw.h (__int32, __int16, __int8, small, hyper): Define.
Note: Also added to w32api/include/basetyps.h.
2003-07-01 12:57:53 +00:00
Earnie Boyd b8582a99b5 * include/w32api.h (_NT4, _W98, _WME, _NT5, _W2000, _WXP, _W2003,
_IE3, _IE4, _IE5, _IE6): Add definitions.
	* include/winbase.h (GetLongPathName[AW]): Add guard for OS >= NT5 or
	>= Win98.
	Change existing guards to use the above macro names as appropriate.
2003-07-01 12:01:05 +00:00
Corinna Vinschen 70249d5687 * cygheap.h (enum impersonation): New enum.
(cygheap_user::token): Delete.
	(cygheap_user::impersonated): Delete.
	(cygheap_user::external_token): New member.
	(cygheap_user::internal_token): New member.
	(cygheap_user::impersonation_state): New member.
	(cygheap_user::issetuid): Modify.
	(cygheap_user::token): New method.
	(cygheap_user::deimpersonate): New method.
	(cygheap_user::reimpersonate): New method.
	(cygheap_user::has_impersonation_tokens): New method.
	(cygheap_user::close_impersonation_tokens): New method.
	* dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
	* fhandler_socket.cc (fhandler_socket::dup): Ditto.
	* fork.cc (fork_child): Ditto.
	(fork_parent): Ditto.
	* grp.cc (internal_getgroups): Ditto.
	* security.cc (verify_token): Ditto.
	(check_file_access): Ditto.
	(cygwin_set_impersonation_token): Detect conflicts. Set
	user.external_token.
	* spawn.cc (spawn_guts): Use new cygheap_user methods.
	* syscalls.cc (seteuid32): Rearrange to use the two tokens
	in cygheap_user.
	(setegid32): Use new cygheap_user methods.
	* uinfo.cc: (internal_getlogin): Ditto.
2003-06-30 13:07:36 +00:00
Danny Smith a52e274d12 2003-06-28 Steven Edwards <Steven_Ed4153@yahoo.com>
* include/shlwapi.h (UrlGetLocationA, UrlGetLocationW,
	PathFindSuffixArrayA, PathFindSuffixArrayW,
	PathFindExtensionA, PathFindExtensionW, StrStrW
	StrStrA): Change unicode-macro'd LP[C]TSTR return values to
	explicit type.
2003-06-28 05:34:47 +00:00
Danny Smith b08e1ec95a 2003-06-26 Mattia Barbon <mbarbon@dsi.unive.it>
* include/richedit.h (PARAFORMAT2): Add definition.
	* include/richedit.h (PFA_*, PFE_*, PFM_*): Add some
	missing constants.
2003-06-26 01:49:11 +00:00
Christopher Faylor b06d4a0881 * Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL. 2003-06-25 19:12:01 +00:00
Thomas Pfaff e1e196a225 * thread.cc (MTinterface::fixup_after_fork): Fix thread list after fork.
(pthread::threads): Instantiate.
(pthread::pthread): Initialize running and suspendend.
Initialize next with NULL.
Add thread to thread list if it is not the null_pthread.
(pthread::~pthread): Remove thread from thread list if it is not the null_pthread.
(pthread::postcreate): Set running flag.
(pthread::exit): Reset running flag.
(pthread::cancel): Try to cancel thread only if still running.
(pthread::_fixup_after_fork): Implement.
(pthread::detach): Check if thread is still running before detach.
* thread.h (pthread::running): New member.
(pthread::next): Ditto.
(pthread::fixup_after_fork): New static method.
(pthread::threads): New static method.
(pthread::_fixup_after_fork): New method.
2003-06-24 20:14:01 +00:00
Christopher Faylor 6c6f70947d * pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a pure
windows process.
2003-06-21 00:08:02 +00:00
Earnie Boyd e7f4ab4d51 Oops, Forgot to submit the change log 2003-06-19 02:06:04 +00:00
Pierre Humblet c9a5cfa0d3 2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
* autoload.cc (GetNetworkParams): Add.
        * net.cc (getdomainname): Call GetNetworkParams and read the
        DhcpDomain registry value if warranted.
2003-06-19 00:57:26 +00:00
Earnie Boyd 2302957c53 * include/dirent.h (dirent): Make d_name and array instead of a pointer.
* mingwex/dirent.c: Modifications througout to fill d_name array.
        * Makefile.in (LIBS): Add new MSVCRT libraries libmsvcr70 and
        libmsvcr71, including debug versions.
        (msvcr70.def, msvcr70d.def, msvcr71.def, msvcr71.def): New targets.
2003-06-18 13:54:47 +00:00
Danny Smith 1c906df21f 2003-06-17 Danny Smith <dannysmith@users.sourceforge.net>
* include/shellapi.h (SHQUERYRBINFO): Add structure,
	(SHQueryRecycleBin[AW]. SHEmptyRecycleBin[AW]):Add prototypes.
	(SHERB_NOCONFIRMATION, SHERB_NOPROGRESSUI, SHERB_NOSOUND):
	Add defines. Thanks to Brett Hart <brett at ncubedtech dot com>

2003-06-17  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/winbase.h (GlobalCompact, GlobalFix, GlobalFlags,
	GlobalUnfix, GlobalUnWire, GlobalWire, LocalCompact,
	LocalFlags, LocalShrink, LockSegment, UnlockSegment): Add comment
	that these are obsolete no-ops.

2003-06-17  Bang Jun-Young  <junyoung@netbsd.org>

	* include/winbase.h (GetProcessWorkingSetSize,
	GlobalCompact, LocalAlloc, LocalCompact, LocalReAlloc,
	LocalShrink, SignalObjectAndWait, WriteProcessMemory):
	Correct prototypes.
2003-06-18 10:04:09 +00:00
Luke Dunstan 5a8ad0f577 2003-06-18 Steven Edwards <Steven_Ed4153@yahoo.com>
* include/winuser.h (TPM_RECURSE): Add define.
2003-06-18 09:46:09 +00:00
Danny Smith 0d7e4ab2ba * msvcrt.def.in (__badioinfo, __lc_codepage, __lc_handle,
__pioinfo, __setlc_active, _unguarded_readlc_active, _dstbias):
	Mark as DATA.
2003-06-17 23:08:26 +00:00
Christopher Faylor 0d58ef9dac * path.cc (mount): Do more strict checking on posix path arguments. 2003-06-17 16:52:18 +00:00
Christopher Faylor c433f4617f Throughout, remove "include <errno.h>" from files which already include
cygerrno.h.
* include/cygwin/config.h (__DYNAMIC_REENT__): Define.
* include/cygwin/version.h: Bump API minor version.
* cygwin.din: Export __getreent
* cygerrno.h: Include errno.h.  Fix places where _impure_ptr is used directly
to store the errno value.
* debug.cc (__set_errno): Ditto.
* errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
* signal.cc: Rename _reent_clib to _REENT throughout.
* thread.h (reent_clib): Remove prototype.
* thread.cc (reent_clib): Rename reent_clib to __getreent.  Return _impure_ptr
until MTinterface is initialized.
(reent_winsup): Fix a possible SEGV when _r == NULL.  Return NULL instead.
* MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to keep
signal handling running when fork is called from a thread other than the
mainthread.
2003-06-16 03:24:13 +00:00
Christopher Faylor 6806f4f6e2 * cygcheck.cc (pretty_id): Rework slightly to not rely on spaces. 2003-06-13 02:36:12 +00:00
Christopher Faylor 8d60a6029c clarify 2003-06-13 02:21:18 +00:00
Christopher Faylor cc3ce0bb5f Throughout, always return error when GetShortPathName returns 0. 2003-06-12 20:40:58 +00:00
Thomas Pfaff 1c80421cb4 * thread.cc (pthread_attr_init): Revert change from 2003-06-11
to return 0 if attribute is already initialized back to EBUSY.
(pthread_condattr_init): Ditto.
(pthread_rwlockattr_init): Ditto.
(pthread_mutexattr_init): Ditto.
2003-06-12 18:15:34 +00:00
Corinna Vinschen 5bdb56f061 * exceptions.cc (ctrl_c_handler): Don't send a signal on
CTRL_SHUTDOWN_EVENT.  Add a comment to rationalize the patch.
2003-06-12 12:36:07 +00:00
Thomas Pfaff 00e6660b0d * thread.cc (pthread_attr_init): Return 0 if attribute is already initialized.
Fix return code if out of memory.
(pthread_condattr_init): Ditto.
(pthread_rwlockattr_init): Ditto.
(pthread_mutexattr_init): Return 0 if attribute is already initialized.
2003-06-11 19:08:42 +00:00
Corinna Vinschen 271c1935b3 * spawn.cc (spawn_guts): Call CreateProcess while impersonated,
when the real {u,g}ids and the groups are original.
	Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
	* uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
	while impersonated, preserve the uids and gids and call
	ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.

	* exceptions.cc (error_start_init): Quote the pgm in the command.
2003-06-09 13:29:12 +00:00
Christopher Faylor 32173f7ec4 fix typo 2003-06-07 15:37:35 +00:00
Christopher Faylor 42a737d0a4 * poll.cc: Define FD_SETSIZE to ridiculously large number so that there will be
no artificially large limits.
2003-06-07 15:36:47 +00:00
Christopher Faylor 9501a0a1c7 * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when last tty
closes.
2003-06-07 15:12:23 +00:00
Thomas Pfaff f496071c40 * fhandler_socket.cc (fhandler_socket::connect): Change error
handling for nonblocking connects to return EALREADY when
connect is called more than once for the same socket.
2003-06-07 11:05:35 +00:00
Corinna Vinschen 54152c7e7e * cygwin.din: Add vsyslog.
* fhandler.cc (fhandler_base::write): Only make file sparse if the
	seeked area is >= 128K.
	* syslog.cc (vsyslog): New function, overtaking functionality from
	syslog.
	(syslog): Just call vsyslog.
	* include/cygwin/version.h: Bump API minor.
	* include/sys/syslog.h: Add vsyslog declaration.
2003-06-06 08:11:19 +00:00
Danny Smith b0ad6f2ba5 2003-06-06 Danny Smith <dannysmith@users.sourceforge.net>
* lib/test.c: #include <powerprof.h>.

2003-06-06  James E. Lucas  <xelloss@sourceforge.net>

	* include/powerprof.h: New file.
	* lib/powerprof.def: New file.

2003-06-06  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/winnt (SLIST_HEADER): Add C90 anonymous struct
	protection.
2003-06-06 00:24:34 +00:00
Christopher Faylor 979233a51a * cygthread.cc (cygthread::terminate_thread): Change system_printf to
debug_printf.
2003-06-05 19:18:33 +00:00
Luke Dunstan 51683b1aed * include/winuser.h (WNDCLASS[AW], WNDCLASSEX[AW]): Change type of
hInstance members to HINSTANCE.
	Thanks to: Brenden T. <brenden@rcsis.com>
2003-06-05 10:19:08 +00:00
Christopher Faylor f51e42acc8 * shared.cc (shared_info::heap_chunk_size): Be really defensive about making
sure that heap_chunk is set.
2003-06-05 02:56:27 +00:00
Danny Smith 496e018f2f 2003-06-05 Bart Oldeman <bartoldeman@users.sourceforge.net>
* include/lmaccess.h (UF_MNS_LOGON_ACCOUNT): Add define.
	* include/wingdi.h (LPRGBTRIPLE, LPRGBQUAD): Add typedefs.
2003-06-05 00:49:27 +00:00
Christopher Faylor 7b17543fb2 * path.cc (conv_path_list): Use correct value when calculating length to avoid
a potential SEGV.
2003-06-04 22:59:55 +00:00
Pierre Humblet 9f033c223c 2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
        as non-executable if the file cannot be opened for read. Retry query
        open only if errno is EACCES. Never change the mode, even if it is 000
        when query open() fails.
2003-06-04 01:57:44 +00:00
Christopher Faylor 1e61337ccf * configure.in: Allow any i?86 variant.
* configure: Regenerate.
2003-06-04 01:44:07 +00:00
Christopher Faylor 14963df6be * configure.in: Allow any i?86 variant.
* configure: Regenerate.
2003-06-03 17:32:03 +00:00
Corinna Vinschen fb6b1418e4 * fhandler_socket.cc (connect_thread): Remove.
(accept_thread): Remove.
	(fhandler_socket::connect): Remove all special blocking handling.
	(fhandler_socket::accept): Ditto.
	* net.cc (cygwin_connect): Make blocking sockets temporarily
	non-blocking and call cygwin_select on them to be interruptible.
	(cygwin_accept):  Ditto.
2003-06-03 14:05:17 +00:00
Christopher Faylor 0c8fe17278 * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist. 2003-06-03 02:32:49 +00:00
Danny Smith 38b524b385 * include/ddk/ntpoapi.h (POWER_INFORMATION_LEVEL): Remove.
* include/winnt.h (POWER_INFORMATION_LEVEL): Add.
	* include/ddk/winddk.h (SINGLE_LIST_ENTRY,SLIST_HEADER):
	Remove.
	* include/ddk/ndis.h (NdisAllocateSpinLock): Add missing '\'.
2003-06-02 22:21:54 +00:00
Christopher Faylor 3786526ea8 * cygthread.h (cygthread::terminate_thread): Mark private.
* cygthread.cc (cygthread::terminate_thread): Deallocate free_range thread
stuff.
2003-06-02 21:22:02 +00:00
Corinna Vinschen cbdc3d1780 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
to `interrupted' as used in fhandler_socket::connect.
2003-06-02 21:20:22 +00:00
Corinna Vinschen dfe7d28850 * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
patch.
	(fhandler_socket::accept): Ditto.
2003-06-02 21:14:39 +00:00
Corinna Vinschen 8e13bd144d * fhandler_socket.cc: Include cygthread.h.
(class sock_event): Remove.
	(thread_connect): New function.
	(thread_accept): Ditto.
	(fhandler_socket::connect): Use cygthread instead of socket event
	handling for blocking sockets.
	(fhandler_socket::accept): Ditto.
2003-06-02 17:52:16 +00:00
Christopher Faylor 418c623614 * fhandler.cc (fhandler_base::write): Correct minor printf formatting style
glitch.
2003-06-02 14:07:48 +00:00
Pierre Humblet c17e8306d0 2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
        an existing directory is a root if FindFirstFile fails.
2003-06-01 19:37:13 +00:00
Christopher Faylor e59c6ff448 * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok was
actually valid.  Fix it.
2003-05-30 23:43:24 +00:00
Christopher Faylor cbe5375437 * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's have
problems with.
* path.cc (path_conv::check): Rework has_acls logic slightly.  Uncouple exec
tests away from filesystem tests.
2003-05-30 15:01:33 +00:00
Luke Dunstan 1698ff392a 2003-05-30 Mattia Barbon <mbarbon@dsi.unive.it>
* lib/oleacc.def: New file.
	* include/winable.h: New file.
	* include/oleacc.h: Add extern "C" guard.
	(NAVDIR_*, ROLE_*, STATE_*): Add missing constants.
	(AccessibleChildren, AccessibleObjectFromEvent,
	AccessibleObjectFromPoint, AccessibleObjectFromWindow,
	CreateStdAccessibleProxy[AW], GetOleaccVersionInfo, GetRoleText[AW],
	GetStateText[AW], LresultFromObject, ObjectFromLresult,
	WindowFromAccessibleObject): Add prototypes and UNICODE mappings.
	* include/winuser.h (NotifyWinEvent): Add prototype.
	(OBJID_WINDOW, OBJID_SYSMENU, OBJID_TITLEBAR,
	OBJID_MENU, OBJID_CLIENT, OBJID_VSCROLL, OBJID_HSCROLL,
	OBJID_SIZEGRIP, OBJID_CARET, OBJID_CURSOR, OBJID_ALERT,
	OBJID_SOUND): Move from here to...
	* include/winable.h (OBJID_WINDOW, OBJID_SYSMENU, OBJID_TITLEBAR,
	OBJID_MENU, OBJID_CLIENT, OBJID_VSCROLL, OBJID_HSCROLL,
	OBJID_SIZEGRIP, OBJID_CARET, OBJID_CURSOR, OBJID_ALERT,
	OBJID_SOUND): Here, as per documentation.
	* lib/test.c: Include winable.h.
	* lib/user32.def (NotifyWinEvent): Add missing export.
2003-05-30 10:09:36 +00:00
Danny Smith a681e7f0c6 2003-05-30 Bang Jun-Young <junyoung@netbsd.org>
* include/winbase.h (HeapCompact): Correct prototype.
	* include/winnt.h (SINGLE_LIST_ENTRY, SLIST_ENTRY,
	SLIST_HEADER): Add.
2003-05-30 08:44:50 +00:00
Corinna Vinschen 4aa10069db * include/sys/param.h: Add DEV_BSIZE. 2003-05-30 08:39:02 +00:00
Danny Smith ea6ce1d0de 2003-05-30 Sascha Sommer <saschasommer@freenet.de>
* include/sys/types.h (_ssize_t, ssize_t):  Add typedefs.
2003-05-30 02:42:07 +00:00
Corinna Vinschen 4e2db52c1c * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
conditional.
2003-05-29 16:16:59 +00:00
Luke Dunstan 87cde7d600 * include/winuser.h (LWA_COLORKEY, LWA_ALPHA): Add defines. 2003-05-29 10:32:03 +00:00
Christopher Faylor b666c2eb34 * mkvers.sh: Avoid "-dontuse" tags.
* path.cc (path_conv::check): Set exec state based on known situations.
* path.cc (mount_item::fnmunge): New function.
(mount_item::build_win32): New function.
(mount_info::conv_to_win32_path): Use build_win32 to build windows path.
* path.h (mount_item::fnmunge): Declare new function.
(mount_item::build_win32): Ditto.
* sys/mount.h (MOUNT_ENC): Define.
2003-05-29 03:50:15 +00:00
Corinna Vinschen 72c1470d67 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
revert to original account before calling fixup_before_fork_exec
	and impersonate again afterwards.  Change comment accordingly.
	Clean up error handling and debug output.
2003-05-28 22:05:56 +00:00
Thomas Pfaff a946fb037d * fhandler_socket.cc (sock_event::~sock_event): New method.
(sock_event::load): Change to void. Check if winsock2 is available.
(socke_event::wait): Return 0 if interruptible mode is not available.
(fhandler_socket::connect): Remove checks for winsock2 availability.
(fhandler_socket::accept): Ditto.
2003-05-27 18:30:29 +00:00
Corinna Vinschen dae86e4507 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
2003-05-27 07:50:00 +00:00
Corinna Vinschen 2311f6b0e4 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
permissions throug umask on FAT or if ntsec is off.
2003-05-27 07:44:26 +00:00
Corinna Vinschen ada0376f64 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace. 2003-05-26 16:52:58 +00:00
Corinna Vinschen 0372ad9f11 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
instead of numeric constant.
2003-05-26 15:43:54 +00:00
Corinna Vinschen 6852f6c0f6 * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
sock_event methods by a check for WinSock2 availability.
	(fhandler_socket::accept): Ditto.
2003-05-26 11:11:22 +00:00
Corinna Vinschen fac297d5f8 * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
(fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
	(fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
	(fhandler_base::set_fs_flags): New method.
	(fhandler_base::get_fs_flags): Ditto.
	* fhandler.cc (fhandler_base::write): Make 64 bit clean.  Convert file
	to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
	(fhandler_base::lseek): Call set_did_lseek() instead of
	set_check_win95_lseek_bug().
	(fhandler_base::fhandler_base): Initialize fs_flags to 0.
	* fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
	as "sparse" unconditionally.  Set fs_flags member.
2003-05-26 09:54:01 +00:00
Christopher Faylor 7b3a9e6e00 * include/winuser.h (EnumDisplayDevicesW): Fix typo. 2003-05-25 21:38:31 +00:00
Corinna Vinschen a80229fd49 * autoload.cc (GetDiskFreeSpaceEx): Add.
* syscalls.cc (statfs): Call full_path.root_dir() instead of
	rootdir(full_path). Use GetDiskFreeSpaceEx when available and
	report space available in addition to free space.
	* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
	Do not call FindFirstFile for disk root directories.
2003-05-25 09:18:43 +00:00
Corinna Vinschen c295ce6f6e * fhandler_process.cc (format_process_stat): use PagefileUsage
instead of VirtualSize.
	(get_mem_values): Ditto.
2003-05-24 20:14:19 +00:00
Danny Smith ff462cb235 2003-05-23 Danny Smith <dannysmith@users.sourceforge.net>
* include/winuser.h (EnumDisplayDevices[AW]): Add prototypes.
	* include/wingdi.h (DISPLAY_DEVICE): UNICODE it.

2003-05-23  Andrew Dunbar <hippietrail@users.sourceforge.net>

	* include/wingdi.h (GCP_RESULTS[AW]) Correct type of
	lpGlyphs field to LPWSTR.
2003-05-23 08:07:05 +00:00
Danny Smith a66cfe68eb * include/wincrypt.h (PLAINTEXTKEYBLOB, OPAQUEKEYBLOB,
PUBLICKEYBLOBEX, SYMMETRICWRAPKEYBLOB) Add defines.
	(PP_*): Add defines.
	(CryptContextAddRef): Add prototype.
	Thanks to: Shura Zam  <debil_urod@users.sourceforge.net>
2003-05-21 09:49:58 +00:00
Corinna Vinschen 5c768c978c * shared_info.h: Match shared_name declaration with below change.
* shared.cc (shared_name): Use incoming char * parameter instead of
	local static buffer.
	(open_shared): Accomodate new calling convention for shared_name.
	* exceptions.cc (events_init): Ditto.
	* sigproc.cc (getsem): Ditto.
	* syscalls.cc (login): Ditto.
	(logout): Ditto.
	(pututline): Ditto.
2003-05-21 08:01:57 +00:00
Corinna Vinschen 44be819760 * fhandler_socket.cc (secret_event_name): Return void. Use incoming
char *parameter instead of local static buffer.
	(fhandler_socket::create_secret_event): Accomodate new calling
	convention for secret_event_name.
	(fhandler_socket::close_secret_event): Ditto.
2003-05-20 17:39:46 +00:00
Corinna Vinschen d4f3ce316c * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
(ENTROPY_SOURCE_NAME): Ditto.
	(secret_event_name): New static function.  Create shared event name
	with "Global\" prefix on systems supporting terminal services.
	(fhandler_socket::set_connect_secret): Fix conditional.
	(fhandler_socket::create_secret_event): Create secret event using
	secret_event_name().
	(fhandler_socket::close_secret_event): Ditto.
	* shared.cc (shared_name): Create shared object name with "Global\"
	prefix on systems supporting terminal services.
	* wincap.cc: Set has_terminal_services capability throughout.
	(wincap_2003): New global object representing Windows 2003 Server
	capabilities.
	(wincapc::init): Accomodate Windows 2003 Server.
	* wincap.h (struct wincaps): Add has_terminal_services capability.
2003-05-20 15:22:09 +00:00
Corinna Vinschen 10bada05fa * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
* winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
	* winsup/cygwin/cygwin.din: Add ftok, _ftok.
	* winsup/cygwin/ipc.cc (ftok): Rework implementation.
2003-05-20 12:38:04 +00:00
Christopher Faylor d8ee8ca551 * spawn.cc (spawn_guts): Show more of command line in strace output. 2003-05-19 01:43:31 +00:00