Commit Graph

5669 Commits

Author SHA1 Message Date
Christopher Faylor d64c96f0f5 v2 only 2006-01-29 18:05:00 +00:00
Corinna Vinschen edde4d4daf * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks. 2006-01-29 17:29:35 +00:00
Corinna Vinschen 5369605f4f * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
* fhandler_socket.cc (fhandler_socket::bind): Set socket to
	SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
	socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
	* net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
	if SO_REUSEADDR socket option has been successsfully set.
	* wincap.h (wincaps::has_exclusiveaddruse): New element.
	* wincap.cc: Implement above element throughout.
2006-01-29 12:23:44 +00:00
Danny Smith 74d3f96faa * include/winsock2.h (WINSOCK_API_LINKAGE): Define. Add to
prototypes.
2006-01-29 00:52:35 +00:00
Danny Smith 0d80558dc4 * include/winnt.h (FORCEINLINE): Define. 2006-01-29 00:33:21 +00:00
Corinna Vinschen b8670a4764 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
check for existance explicitely and set errno to EEXIST.
2006-01-28 13:59:39 +00:00
Corinna Vinschen 7ab59dee94 * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
minimum number of dir entries which fit into the readdir cache.
	(DIR_BUF_SIZE): Define globally as size of readdir cache.
	(struct __DIR_cache): New structure used for readdir caching on NT.
	(d_dirname): Accessor for struct __DIR_cache, use throughout.
	(d_pos): Ditto.
	(d_cache): Ditto.
	(fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
	cache on NT.
	(fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
	Implement readdir caching.
2006-01-28 13:41:22 +00:00
Corinna Vinschen fa3ffdd01a * include/sys/dirent.h (struct dirent): Revert misguided attempt to
rename __d_unused1 to __d_fd.
2006-01-28 10:34:11 +00:00
Joshua Daniel Franklin acfdfc9ffb Move cocom to the build requirements. 2006-01-28 02:12:32 +00:00
Corinna Vinschen 9e5f45ed6f * autoload.cc (NtQueryDirectoryFile): Define.
* dir.cc (__opendir_with_d_ino): Just call opendir.
	(opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
	(readdir_worker): Only try generating d_ino if it's 0.
	Utilize namehash of directories fhandler.  Call readdir_get_ino to
	generate d_ino for "..".
	(seekdir64): Keep dirent_set_d_ino flag.
	* fhandler.h (enum dirent_states): Add dirent_get_d_ino.
	(class fhandler_disk_file): Declare new private methods readdir_helper
	and readdir_9x.
	* fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
	evaluate if a filesystem has reliable inode numbers.
	(fhandler_base::fstat_by_handle): Accomodate structure member name
	change from IndexNumber to FileId.
	(fhandler_base::fstat_helper): Call hasgood_inode here.
	(fhandler_disk_file::opendir): Call fhaccess only for real files.
	Don't append '*' to __d_dirname here, move to readdir_9x.  On NT,
	open directory handle here.  Set dirent_get_d_ino and dirent_set_d_ino
	flags according to wincap and filesystem.
	(fhandler_disk_file::readdir_helper): New method to implement readdir
	postprocessing only once.
	(readdir_get_ino_by_handle): New static function.
	(readdir_get_ino): New function to centralize inode number evaluation
	in case inode number hasn't been returned by NtQueryDirectoryFile.
	(fhandler_disk_file::readdir): Move old functionality to readdir_9x.
	Call readdir_9x when on 9x/Me.  Implement NT specific readdir here.
	(fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
	(fhandler_disk_file::seekdir): Accomodate new NT readdir method.
	(fhandler_disk_file::closedir): Ditto.
	(fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
	(fhandler_cygdrive::opendir): Call get_namehash to prepare later
	correct evaluation of d_ino.
	(fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
	drive's d_ino by calling readdir_get_ino.
	* fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
	dirent_saw_dot_dot to avoid seeing . and .. entries twice.
	* fhandler_process.cc (fhandler_process::readdir): Ditto.
	* fhandler_registry.cc (fhandler_registry::readdir): Ditto.
	* ntdll.h (STATUS_INVALID_PARAMETER): New define.
	(STATUS_INVALID_LEVEL): New define.
	(struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
	FileId (as in Nebbitt).
	* path.h (path_conv::hasgood_inode): Now implemented in
	fhandler_disk_file.cc.
	* wincap.h (wincaps::has_fileid_dirinfo): New element.
	* wincap.cc: Implement above element throughout.
	* winsup.h (readdir_get_ino): Add declaration.
	* include/sys/dirent.h (struct dirent): Slightly rename structure
	members to accomodate changes.
	Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
	__opendir_with_d_ino.
2006-01-27 21:50:42 +00:00
Christopher Faylor e7a9c71d62 * spawn.cc (spawn_guts): Fix potential handle leak when failing exec. 2006-01-27 06:08:05 +00:00
Christopher Faylor e1bfb483ea * exceptions.cc (inside_kernel): Fix to return true if we can't get the name of
the DLL for the given memory block since we are not in kernel code.
2006-01-27 06:06:06 +00:00
Joshua Daniel Franklin 90c01ac9df Add top-level README 2006-01-27 05:37:13 +00:00
Joshua Daniel Franklin aba373611c * faq-programming.xml (faq.programming.ipc): Add new FAQ about
cygserver and its relation to the "Bad system call" error.
* faq-setup.xml (faq.setup.uninstall-all): Mention postgresql.
* overview2.sgml: Update security info on shared memory.
2006-01-27 04:52:16 +00:00
Corinna Vinschen 50a7955aa6 * fhandler.cc (fhandler_base::open): Fix bug in argument order to
InitializeObjectAttributes call.
2006-01-26 16:58:53 +00:00
Joshua Daniel Franklin 2ceb32d95a * faq-programming.xml (faq.programming.building-cygwin): Add
list of packages required for building and exact check instructions.
* faq-setup.xml (faq.setup.uninstall-service): New instructions
on uninstalling a cygwin service.
(faq.setup.uninstall-all): Reference new service uninstall FAQ.
2006-01-26 04:39:04 +00:00
Christopher Faylor 4207eed323 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
dirent_isroot to use the correct boolean operator.
2006-01-26 02:54:54 +00:00
Danny Smith c40776e5a2 * include/winnt.h (DECLSPEC_SELECTANY): Define. 2006-01-26 01:55:39 +00:00
Danny Smith a62ec6b340 2006-01-25 Filip Navara <xnavara@volny.cz>
* include/winnt.h (DECLSPEC_ALIGN): Define.
2006-01-26 01:22:07 +00:00
Corinna Vinschen 6fbc5c2a9b * faq-setup.xml (faq.setup.snapshots): Rename DLL using Windows tools. 2006-01-25 10:57:19 +00:00
Christopher Faylor 742e27bed8 * ntdll.h: (temporarily?) Add more functions for querying directory. 2006-01-25 05:57:20 +00:00
Christopher Faylor aac74926dd * dir.cc (readdir_worker): Turn off expensive inode calculation. 2006-01-24 19:03:20 +00:00
Corinna Vinschen 4aac2d2709 * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
stripping the .exe suffix from the link target in PROCESS_EXE and
	PROCESS_EXENAME case.
	* path.cc (realpath): Tack on .exe suffix if necessary.
2006-01-24 17:40:55 +00:00
Corinna Vinschen 26d27a276f * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
to determine remote file systems with reliable inode numbers.  Add
	longish comment.
2006-01-24 12:32:33 +00:00
Danny Smith 3784b87b32 * include/commctrl.h: Correct spelling of 'compatibility' in
comments.
	* include/setupapi.h: Likewise.
	* include/ws2tcpip.h: Likewise.
2006-01-24 02:19:28 +00:00
Danny Smith e5e6a33128 2006-01-24 Danny Smith <dannysmith@users.sourceforge.net>
* include/ddk/winddk.h (KeGetCurrentKPCR): Support -masm=intel.

2006-01-24  Jiri Malak  <Jiri.Malak@iol.cz>

	WATCOM compatibility changes.
	* include/ddk/ntddk.h (DECL_IMPORT): Define using __declspec,
	rather than __attribute__.
	(DECL_EXPORT): Likewise.
	* include/ddk/winddk.h (DDKAPI): Avoid using __attribute__.
	(DDKFASTAPI): Likewise.
	(DDKCDECLAPI): Likwise.
	(KeGetCurrentKPCR): Provide __WATCOMC__ syntax for inline code.
2006-01-24 01:02:31 +00:00
Corinna Vinschen 543c43d84d * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
inheritance for duplicated socket.
2006-01-23 15:10:57 +00:00
Danny Smith cfd86743ff 2006-01-23 Brandon Sneed <brandon@redf.net>
* setupapi.def: Add all CM_* functions defined in ddk/cfgmgr32.h
	to exports.
2006-01-23 08:10:32 +00:00
Christopher Faylor d96d3ec910 . 2006-01-21 04:41:57 +00:00
Christopher Faylor 868fb2ff69 * include/cygwin/version.h: Bump API minor number to 151.
* dir.cc (__opendir_with_d_ino): New function.
(opendir): Set flag if we should be calculating inodes.
(readdir_worker): Calculate d_ino by calling stat if the user has asked for it.
(seekdir64): Maintain all persistent flag settings.
* fhandler.h (dirent_states): Add dirent_set_d_ino.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes to
dirent structure.
* fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
* include/sys/dirent.h (struct dirent): Coalesce two similar structures.
Remove all threads of the apparently highly confusing references to inodes.
Add support for calculating a real inode if __USE_EXPENSIVE_CYGWIN_D_INO is
defined.
2006-01-21 02:24:17 +00:00
Christopher Faylor 90e1ee2b25 * include/sys/dirent.h: Add comments for people who are REALLY confused about
whether they should be using something called __invalid_d_ino or not.
2006-01-20 16:04:40 +00:00
Corinna Vinschen 1ef48340d5 * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
(fhandler_socket::release): Add debug output for WSAEventSelect failure.
	(fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
	to blocking mode.  Only set nonblocking flag if ioctlsocket call
	succeeded.  Only print new socket state if ioctlsocket call succeeded.
2006-01-20 10:22:38 +00:00
Christopher Faylor 3c09c0fb25 * cygcheck.cc (common_paths): Add "patch". 2006-01-19 21:16:38 +00:00
Christopher Faylor 101b3cb01a * cygcheck.cc (init_paths): Record first_nonsys_path.
(find_on_path): Start on first nonsys path when !search_sysdirs.
2006-01-19 20:17:11 +00:00
Christopher Faylor ecd4fba273 white space 2006-01-19 18:57:41 +00:00
Christopher Faylor 7b55b34c5e * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path for
root rather than windows path.
2006-01-19 18:55:07 +00:00
Christopher Faylor 9025f2aa7d * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate name
change from __ino32 to __invalid_ino32.
* include/sys/dirent.h (__invalid_ino32): Rename from __ino32.  Don't define
unused d_type macros.
2006-01-19 05:34:39 +00:00
Joshua Daniel Franklin 96f5988e31 Remove references to and files from old texinfo FAQ. 2006-01-19 02:44:17 +00:00
Chris Sutcliffe 79e60dfa66 2006-01-18 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Bump cygwin build number.
2006-01-19 00:32:21 +00:00
Christopher Faylor d0236d66d9 * heap.cc (heap_init): Remove Sleep. 2006-01-18 20:40:52 +00:00
Corinna Vinschen 339306c5ec * net.cc (rresvport): Remove extern declaration. 2006-01-18 18:37:35 +00:00
Corinna Vinschen 06a5dd435e * autoload.cc (rresvport): Remove.
* net.cc (last_used_rrecvport): New global shared variable.
	(cygwin_rresvport): Implement rresvport without using rresvport from
	wsock32.
2006-01-18 18:24:33 +00:00
Christopher Faylor 25ef7a93b6 Wasn't going to check this in but since it did get checked in, here's a ChangeLog. 2006-01-18 16:11:53 +00:00
Christopher Faylor 14a4d5989a bad_keywords 2006-01-18 15:57:56 +00:00
Corinna Vinschen 3b5d71b3a2 * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
ss_family member name.
2006-01-18 15:37:23 +00:00
Dave Korn 79f24ec37d * cygpath.cc (dowin): Remove stray debugging printf statement. 2006-01-18 12:34:59 +00:00
Chris Sutcliffe 7c9feabf98 2006-01-17 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.6.
        * Makefile.in: Ditto.
2006-01-17 18:56:12 +00:00
Christopher Faylor 4d7c0b51bf copyright 2006-01-17 15:37:13 +00:00
Corinna Vinschen 3d7e89f8a2 * Makefile.in: Replace etcdir with sysconfdir. 2006-01-17 12:33:46 +00:00
Christopher Faylor 05ee4328f2 * include/cygwin/version.h: Bump DLL minor version number to 20. 2006-01-17 03:49:04 +00:00