Commit Graph

5248 Commits

Author SHA1 Message Date
Christopher Faylor a232350855 Fix typo. 2005-08-28 16:51:55 +00:00
Christopher Faylor b2068b401b Fix improper formatting. 2005-08-28 16:51:13 +00:00
Christopher Faylor 988e9165e9 *dir.cc (readdir_r): Invert sense on error-test. 2005-08-28 16:30:48 +00:00
Joshua Daniel Franklin 970fabec27 2005-08-26 Brian Dessent <brian@dessent.net>
* faq-using.xml: Add 'net use' hint to network shares FAQ.
2005-08-27 04:53:15 +00:00
Joshua Daniel Franklin 7a582da599 2005-08-26 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
* Makefile.in: Remove extra anchor to make NN4 happy.
	* faq.xml: Link to cygwin.com/license.html
	* faq-resources.xml: Link instead of duplicating info.
	* faq-using.xml: Split out services and network shares FAQ.
	* faq-what.xml: Link to cygwin.com/license.html
2005-08-27 01:32:36 +00:00
Corinna Vinschen 63958f00d3 * path.cc (normalize_posix_path): Keep two leading slashes
intact throughout.
	(normalize_win32_path): Revert to only checking for slash.
	(realpath): Convert drive letters to cygdrive paths before
	doing anything else.
	* shared_info.h (mount_info::cygdrive_posix_path): Make public.
2005-08-26 15:11:06 +00:00
Corinna Vinschen 3716969169 * path.cc (realpath): Drop call to mount_info::conv_to_posix_path
in favor of calling path_conv with PC_POSIX flag.  Align error
	handling closer to POSIX.  As on Linux, return user space allocated
	memory if second parameter is NULL.
2005-08-25 21:18:26 +00:00
Corinna Vinschen 9d13e04523 * path.cc (normalize_win32_path): Honor network paths. Fold more
than two leading dir separators into one.  Check for dir separator
	instead of just slashes to handle incoming Win32 paths correctly.
2005-08-25 20:35:25 +00:00
Christopher Faylor b4b0980b9d * errno.cc (errmap): Translate ERROR_NO_MORE_ITEMS to ENMFILE. 2005-08-25 15:27:10 +00:00
Danny Smith 9e28e551f2 * mingwex/fe*.c: Revert previous changes.
* include/fenv.h: Revert previous changes.

	Add Changelog entry for the reverted change.
2005-08-25 08:39:54 +00:00
Christopher Faylor b9ebff640a * exceptions.cc (handle_sigsuspend): Just sleep forever if called from non-main
thread.
(sigpacket:process): Simplify logic which determines when and how a signal is
masked.  Don't trigger sigwait if there is a signal handler.
* sigproc.cc (wait_sig): Update comment.  Try to process a signal which is in
the queue if it isn't queued for the target thread (this is still not right).
2005-08-25 03:12:48 +00:00
Danny Smith 5092e4a714 * mingwex/feclearexcept.c (feclearexcept): Change declaration.
Do not return a value.
	* mingwex/fegetexceptflag.c (fegetexceptflag): Likewise.
	* mingwex/feraiseexcept.c (feraiseexcept): Likewise.
	* mingwex/fesetexceptflag.c (fesetexceptflag): Likewise.
	* mingwex/fegetenv.c (fegetenv): Likewise.
	* mingwex/fesetenv.c (fesetenv): Likewise.
	* mingwex/feupdateenv.c (feupdateenv): Likewise.
	* include/fenv.h (feclearexcept, fegetexceptflag, feraiseexcept,
	fesetexceptflag, fegetenv, fesetenv, feupdateenv): Correct
	prototypes.
2005-08-25 02:35:34 +00:00
Danny Smith 03ee0ba163 * mingwex/stdio/fseeko64.c (fseeko64): Flush stream before
getting filelength for SEEK_END.
2005-08-25 02:04:59 +00:00
Christopher Faylor 04dfd98dc6 * spawn.cc (perhaps_suffix): Record errno-type error value in third argument.
(find_exec): On error, set errno returned from perhaps_suffix.
(spawn_guts): Ditto.
2005-08-24 18:26:14 +00:00
Christopher Faylor b56c466b2c * fhandler_virtual.cc (fhandler_virtual::close): Don't free filebuf if it's
NULL.
* pinfo.cc (_pinfo::commune_send): Fix test for incorrect number of bytes read
from pipe.
2005-08-24 17:45:11 +00:00
Corinna Vinschen 986c841b21 * syscalls.cc (endusershell): Reset shell_fp to NULL to allow
subsequent getusershell calls.
2005-08-24 15:50:11 +00:00
Christopher Faylor 7871cd8c5d * path.cc (path_conv::check): Fill in fileattr for /dev, defaulting to
directory if /dev doesn't actually exist.
(win32_device_name): Don't consider FH_DEV to be a device since it's really a
directory which should go through mount processing.
2005-08-24 14:17:56 +00:00
Christopher Faylor 14c4d65ef1 * cygheap.h (cygheap_types): Add HEAP_COMMUNE.
* fhandler_proc.cc: Use cygheap rather than user heap for allocation of filebuf
throughout.
* fhandler_registry.cc: Ditto.
* fhandler_virtual.cc: Ditto.
* fhandler_process.cc: Ditto.
(get_mem_values): Use malloc/realloc/free rather than new.
* pinfo.cc (_pinfo::commune_send): Allocate on cygwin heap rather than user
heap.  Avoid calling ReadFile when correct number of characters have been read
or suffer buffer corruption.
(_pinfo::fd): Allocate on cygwin heap rather than user heap.
(_pinfo::fds): Ditto.
(_pinfo::root): Ditto.
(_pinfo::cwd): Ditto.
(_pinfo::cmdline): Ditto.
* devices.h (FH_DEV): New define.
* devices.in: Detect lone /dev.
* devices.cc: Regenerate.
* path.cc (path_conv::check): Treat FH_DEV as a special case.
2005-08-24 04:38:39 +00:00
Christopher Faylor db7f135b03 * sigproc.h (set_signal_mask): Remove default on second parameter and make pass
by reference.
* signal.cc (abort): Accommodate change to set_signal_mask.
* select.cc (pselect): Ditto.
* exceptions.cc (handle_sigsuspend): Ditto.
(ctrl_c_handler): Ditto.
(sighold): Ditto.
(sigrelse): Ditto.
(set_process_mask_delta): Ditto.
(_cygtls::call_signal_handler): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Return ENMFILE if
__handle is not set.  Set __handle to NULL when out of files.
(fhandler_disk_file::rewinddir): Don't close handle if it's NULL.
(fhandler_disk_file::closedir): Ditto.
2005-08-23 22:22:52 +00:00
Christopher Faylor 5f5c6f7fa9 * dir.cc (readdir_worker): Make static. Only add '.' and '..' when readdir
fails due to ENMFILE.
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Only close handle on
error != ENMFILE.
2005-08-23 03:58:09 +00:00
Corinna Vinschen b575e059ac * mtinfo.h (mtinfo_drive::error): Fix argument bug in debug_printf call. 2005-08-22 16:12:01 +00:00
Christopher Faylor acc12b15a1 add missing entry 2005-08-20 06:21:20 +00:00
Christopher Faylor d9a2276435 * cygerrno.h (geterrno_from_win_error): Change declaration to default to using
GetLastError and EACCESS.
* cygwin.din: Export readdir_r.
* include/cygwin/version.h: Bump API version number to 138.
* syscalls.cc (readdir_worker): New function, renamed from old readdir()
function.
(readdir): Use readdir_worker.
(readdir_r): New function.
* fhandler.h (fhandler_base::readdir): Accommodate second argument indicating
dirent buffer.
(fhandler_disk_file::readdir): Ditto.
(fhandler_cygdrive::readdir): Ditto.
(fhandler_proc::readdir): Ditto.
(fhandler_netdrive::readdir): Ditto.
(fhandler_registry::readdir): Ditto.
(fhandler_process::readdir): Ditto.
* fhandler.cc (fhandler_base::readdir): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Ditto.
* fhandler_cygdrive.cc (fhandler_cygdrive::readdir): Ditto.
* fhandler_proc.cc (fhandler_proc::readdir): Ditto.
* fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
* fhandler_registry.cc (fhandler_registry::readdir): Ditto.
* fhandler_process.cc (fhandler_process::readdir): Ditto.
2005-08-20 06:19:55 +00:00
Christopher Faylor 683ef95392 * fhandler.h (dirent_states): Add dirent_saw_proc.
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Fill in "proc" if it is
the root dir and it is missing.
2005-08-19 16:29:43 +00:00
Christopher Faylor 358063ace3 * fhandler.h (dirent_states): Add dirent_isroot, dirent_saw_cygdrive,
dirent_saw_dev.
* dir.cc (opendir): Don't zero __flags here.  Push that responsibility to
opendir methods.
(seekdir): Preserve dirent_isrrot in __flags.
(rewinddir): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set dirent_isroot
appropriately.
(fhandler_disk_file::readdir): Fill in "cygdrive" and "dev" if it is the root
dir and they are missing.
* fhandler_process.cc (fhandler_process::opendir): Set __flags here.
* fhandler_virtual.cc (fhandler_virtual::opendir): Set __flags here.
2005-08-19 16:18:42 +00:00
Christopher Faylor babc4e5424 * winsup.h (create_pipe): Declare new function.
(CreatePipe): New define.
* miscfuncs.cc (create_pipe): Define new function.
2005-08-19 14:56:48 +00:00
Corinna Vinschen 4fa0a39865 * passwd.c (longopts): Add --logonserver option.
(opts): Add -d option.
	(GetPW): Add server parameter which is given to Net functions.
	(ChangePW): Ditto.
	(PrintPW): Ditto.
	(SetModals): Ditto.
	(usage): Add description for -d/--logonserver option.
	(main): Add option handling for -d/--logonserver.  Use LOGONSERVER
	environment variable content for server to contact, unless
	-d/--logonserver option is given.  If both is missing, use NULL.
2005-08-18 20:25:43 +00:00
Christopher Faylor 4f3e6ff17b * fhandler.h (fhandler_tty_common::lseek): Declare new method.
(fhandler_tty_slave::lseek): Delete old method.
(fhandler_tty_master::lseek): Delete old method.
* fhandler_tty.cc (fhandler_tty_common::lseek): Define new method.
2005-08-18 20:17:10 +00:00
Corinna Vinschen abebe87c40 * fhandler_socket.cc (fhandler_socket::recvfrom): Always initialize
ret to 0.
	(fhandler_socket::recvmsg): Ditto.
2005-08-18 13:14:15 +00:00
Corinna Vinschen d71805725f * errno.cc (strerror): Check errnum for underflow. 2005-08-18 08:35:19 +00:00
Christopher Faylor abed5965ca * textbinary.sgml: Correct incorrect information about ability to specify text
mode in fopen().
2005-08-17 18:23:39 +00:00
Christopher Faylor 0d339267ec * dcrt0.cc (dll_crt0_1): Tweak debugging stuff.
* fhandler_tty.cc (fhandler_tty_common::close): Rearrange the code so that the
master end of the input and output pipes is closed before signalling an EOF
event to the slave.
(fhandler_pty_master::close): Likewise.
2005-08-17 16:10:48 +00:00
Danny Smith ae6c01c069 2005-08-17 Michael Jung <mjung@iss.tu-darmstadt.de>
* lib/shell32.c (CLSID_RecycleBin, CLSID_ControlPanel,
	CLSID_MyComputer,CLSID_Internet, CLSID_NetworkPlaces,
	CLSID_MyDocuments, CLSID_FolderShortcut): Add GUIDs.
2005-08-17 10:57:17 +00:00
Danny Smith 38c9e858ac 2005-08-17 Martin Fuchs <martin-fuchs@gmx.net>
* include/shlobj.h (IContextMenu3): Define.
	* include/shlguid.h (IID_IContextMenu3): Declare.
	* lib/shell32.c (IID_IContextMenu3): Define.

2005-08-17  Martin Fuchs <martin-fuchs@gmx.net>

	* include/shlobj.h (SHFormatDrive): Declaration of function
	and associated constants.
2005-08-17 08:29:08 +00:00
Brian Dessent 9a99dcd39c * cygcheck.cc (dump_sysinfo_services): Properly null-terminate 'buf'.
Avoid extraneous cygrunsrv invocation if 'verbose' is true.
2005-08-17 00:52:43 +00:00
Corinna Vinschen 447419497d * init.cc (respawn_wow64_process): Make inline function. Remove
"noreturn" attribute.  Add additional check if parent process is
	actually a 64 bit process.
	(dll_entry): Only test WOW64 processes with a stack in the usual
	"dangerous" process space area.
2005-08-14 19:48:07 +00:00
Chris Sutcliffe 50f196b57f * Include/_mingw.h: Increment version to 3.8.
* Makefile.in: Ditto.
2005-08-13 12:52:43 +00:00
Danny Smith 1a2fe82e40 * include/ddk/hidsdi.h: New file.
* lib/ddk/hid.def: Uncomment symbols and add stdcall suffix for
	functions declared in hidsdi.h.
	Thanks to:  Alex J Lennon  <ajlennon at organixconsulting dot com>
2005-08-12 09:16:18 +00:00
Danny Smith b50ce80887 * lib/imm32.def (ImmDisableIME): Add stub.
Thanks to: "kidmin"  <kidmin at users dot sourceforge dot net>
2005-08-12 09:11:40 +00:00
Christopher Faylor 1cd065837c white space 2005-08-12 02:39:13 +00:00
Christopher Faylor b4ec184199 fix typo 2005-08-11 17:18:18 +00:00
Christopher Faylor 205a575188 * fhandler_serial.cc (fhandler_serial::tcgetattr): Return current baud rate
regardless of current DTR state.
2005-08-11 17:03:18 +00:00
Christopher Faylor b21413b304 * dcrt0.cc: Remove ld_preload declaration.
* winsup.h: Move ld_preload declaration here.
* fork.cc (fork_child): Call ld_preload() before returning.
2005-08-11 16:30:48 +00:00
Christopher Faylor ff7bdd11f5 * child_info. (CURR_CHILD_INFO_MAGIC): Refresh.
(child_info::child_info()): New constructor.
(child_info_spawn::child_info_spawn()): Ditto.
(child_info_spawn::operator new): New operator.
(child_info_spawn::set): New function.
* spawn.cc (av()): New constructor.
(av::operator new): New operator.
(av::set): New function.
(spawn_guts): Reorganize so that classes which allocates are defined early in
the function so that it can be properly cleaned up after an efault.  Set errno
to E2BIG in the event of a SEGV situation.
2005-08-11 16:13:30 +00:00
Dimitri Papadopoulos abec0aaae9 Attempting to add include/objsafe.h again... 2005-08-11 09:04:13 +00:00
Chris Sutcliffe 8cb66eee67 * include/w32api.h: Increment version to 3.3.
* Makefile.in: Ditto.
2005-08-11 02:13:36 +00:00
Danny Smith d154b707d0 * include/wctype.h (towupper, towlower): Change arg and return value
types to wint_t.
	* include/ctype.h (towupper, towlower): Likewise.
2005-08-10 10:10:32 +00:00
Danny Smith 5ce4d1685b * mthr_stub.c (__mingwthr_key_dtor): Replace assert(0) with
a diagnostic, guarded by #ifdef DEBUG.
	(__mingwthr_remove_key_dtor): Likewise.
2005-08-10 10:05:02 +00:00
Christopher Faylor c9508cb4ec * cygserver.cc (main): Call wincap.init() earlier to avoid a NULL dereference. 2005-08-08 19:46:48 +00:00
Christopher Faylor d4c8f095ba * include/sys/cdefs.h: Remove extra line. 2005-08-08 18:54:28 +00:00