Commit Graph

1181 Commits

Author SHA1 Message Date
Christopher Faylor cdd3a8bd67 * cygmagic: Eliminate unneeded use of 'tr' and 'bc'. 2001-12-30 18:52:19 +00:00
Corinna Vinschen 5d3949b064 * security.cc (open_local_policy): Use POLICY_EXECUTE instead of
enumerating user rights.
2001-12-30 17:38:24 +00:00
Corinna Vinschen e37f6c57cd * security.cc (open_local_policy): Initialize lsa handle to NULL.
Request only needed access rights in call to LsaOpenPolicy().
	(create_token): Check for NULL lsa pointer.
2001-12-29 22:03:32 +00:00
Corinna Vinschen 971ec8d310 * cygwin.din: Add symbols for endutent(), getutent(), getutid(),
getutline(), setutent() and utmpname().
	* syscalls.cc (setutent): New function.
	(endutent): Ditto.
	(utmpname): Ditto.
	(getutent): Ditto.
	(getutid): Ditto.
	(getutline): Ditto.
	* include/cygwin/version.h: Bump API minor version.
2001-12-28 15:53:27 +00:00
Christopher Faylor aaf219f01e * cygmagic: Add define name to warning.
* dcrt0.cc (_dll_crt0): Check for changes in child_info size.
(multiple_cygwin_problem): Avoid "proc" errors when testing.  Just assume new
cygwin proc.
* shared_info.h (mount_info): Add 'cb' element for sanity checks.
(shared_info): Ditto.
* child_info.h (child_info): Add fhandler_union_size element for sanity
checking.
* shared.cc (open_shared): Detect shared region size mismatch between parent
and child.
(shared_info::initialize): Detect shared region size mismatch with expectation.
(memory_Init): Ditto.
* sigproc.cc (init_child_info): Correctly set cb in passed structure.
* shared.cc (open_shared):
2001-12-26 21:35:16 +00:00
Christopher Faylor dcd8b9be82 * include/getopt.h: Protect a declaratin. 2001-12-26 17:48:44 +00:00
Robert Collins 028ee5466b Remove accenidentally left >>> marker 2001-12-26 12:48:12 +00:00
Robert Collins cbce49804f 2001-12-26 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_cond::Signal): Use a separate flag for signal detection
        and broadcast semantics.
        (__pthread_cond_dowait): Ditto.
        * thread.h (pthread_cond): New flag for testing when a waiter has woken.
2001-12-26 12:46:26 +00:00
Christopher Faylor 7a0252e203 comment 2001-12-26 06:18:41 +00:00
Christopher Faylor a2b75539a2 * Makefile.in: Quote arguments to shell scripts.
(clean): Remove new *_magic.h autogenerated files.
2001-12-26 05:02:07 +00:00
Christopher Faylor 77f4a25028 * Makefile.in: Autogenerate some header files which provide magic numbers.
Force dependencies for files which depend on autogenerated headers to ensure
that they are always built.
* child_info.h (child_info): Add new fields to accommodate new magic number
header stuff.
* dcrt0.cc: Rely on "child_info_magic.h" to ensure that correct child_info
magic numbers are used.
(dll_crt0_1): Temporarily remove _cygwin_testing_magic test.
(_dll_crt0): Do more testing on magic numbers from fork_info structure.  Call
"multiple_cygwin_problem" where appropriate.
(multiple_cygwin_problem): Rename from multiple_cygwin_die.  Issue a warning or
die, as appropriate based on cygwin version/magic number mismatch.
* pinfo.cc (pinfo::exit): Don't attempt to dereference `this' if it doesn't
exist.  This can happen when a fatal error occurs early in process
initialization.
* shared.cc: Rely on "shared_info_magic.h" to accommodate that new magic number
header stuff.
(shared_info::initialize): Use new magic number stuff, for shared region.
(memory_init): Ditto, for mount table.
* shared_info.h: Accomodate new magic number stuff for shared region and mount
table.
* sigproc.cc: Rely on "child_info_magic.h" to accommodate new magic number
header stuff.
(init_child_info): Initialize new fields in child_info) to accomodate magic
numbers.
* winsup.h: Rename multiple_cygwin_die to multiple_cygwin_problem.
* include/cygwin/version.h: Define macros for manipulating version magic.
* cygmagic: New shell script for generating magic numbers.
2001-12-26 04:53:34 +00:00
Christopher Faylor 4f235c9559 * include/cygwin/version.h: Bump API minor version for below changes. 2001-12-20 18:54:30 +00:00
Christopher Faylor 93034cfc7c Remove obsolete include. 2001-12-20 03:03:59 +00:00
Christopher Faylor 48beacf6e4 * Makefile.in (VPATH): Add regex directory.
(NM): new variable.
(OBSOLETE_FUNCTIONS): Ditto.
(NEW_FUNCTIONS): Ditto.
(install-headers): Install regex.h.
(install-man): New target.
(install): Use new target.
(DLL_OFILES): Add v8_reg* stuff.
(new-cygwin1.dll): Eliminate stamp-cygwin-lib creation.
(libcygwin.a): Remove obsolete functions from import lib.  Add new functions.
* configure.in: Detect 'nm' tool.
* configure: Regenerate.
* cygwin.din: Export posix_reg* functions.  Eliminate export of v8 reg*
functions.  This is now handled in object files themselves.
* regex/*: New files.
* regexp/v8_*.c: New files, renamed from non v8_ equivalents.
2001-12-20 02:55:11 +00:00
Christopher Faylor 4b31ae795b Fix up comments. 2001-12-19 20:10:03 +00:00
Corinna Vinschen 6d114a5dea * include/getopt.h: Don't define getopt_long() and friends when
included through unistd.h.
2001-12-17 21:34:59 +00:00
Christopher Faylor 513a848fe6 * dtable.cc (dtable::init_std_file_from_handle): Avoid initializing using an
invalid handle.
2001-12-17 19:55:58 +00:00
Christopher Faylor a318eb217d * include/limits.h: Define LLONG_MIN, LLONG_MAX, ULLONG_MAX. 2001-12-17 01:41:07 +00:00
Christopher Faylor 9b02812029 * include/getopt.h: Add HAVE_DECL_GETOPT to save pain elsewhere. 2001-12-11 22:22:43 +00:00
Christopher Faylor 40139114ea * fhandler.h (fhandler_serial::ev): New class member.
* fhandler_serial.cc (fhandler_serial::raw_read): Use class member for event
status.
* select.cc (peek_serial): Ditto.
2001-12-11 00:24:46 +00:00
Christopher Faylor cf77faefc8 whitespace cleanup 2001-12-10 03:35:54 +00:00
Christopher Faylor 397f94082d * path.cc (path_conv::check): Use full path name for determining attributes
when /cygdrive/x/foo.
2001-12-08 01:27:10 +00:00
Christopher Faylor a12a3466b1 * path.cc (path_conv::check): Reset FH_CYGDRIVE if iterating through path. 2001-12-07 05:03:32 +00:00
Christopher Faylor a0c1938145 * path.cc (path_conv::check): Don't complain if /dev/x/foo when x doesn't
exist.
(mount_info::conv_to_win32_path): Keep translating when a /cygdrive is found.
Don't attempt to translate to a device name when devn == FH_CYGDRIVE.
(cygwin_conv_to_win32_path): Set buffer to empty on error.
(cygwin_conv_to_full_win32_path): Ditto.
* window.cc: Include unistd.h to verify definitions.
2001-12-06 22:36:08 +00:00
Christopher Faylor 5a88f2554a * dir.cc (opendir): Detect error return from build_fhandler_from_name. 2001-12-05 23:05:15 +00:00
Christopher Faylor d653df0d95 Add missing ChangeLog entries. 2001-12-05 04:48:15 +00:00
Christopher Faylor 958348a4cf * net.cc (cygwin_getsockopt): Dereference optlen pointer when passing to
__check_null_invalid_struct_errno.
2001-12-04 22:01:03 +00:00
Christopher Faylor 7543995b74 * net.cc (cygwin_getsockopt): Allow NULL optval.
* path.cc (mount_info::read_cygdrive_info_from_registry): Don't write cygdrive
to registry if it doesn't exist.
2001-12-03 20:09:33 +00:00
Christopher Faylor 2a50e3df6f * path.cc (mount_info::conv_to_win32_path): Avoid returning error if cygdrive
== '/'.
(mount_info::cygdrive_win32_path): Return 0 if invalid cygdrive path.
2001-12-03 16:47:18 +00:00
Christopher Faylor 7b80d68f4c minor reformatting. 2001-12-02 05:23:26 +00:00
Christopher Faylor 1cf0d8510a * debug.cc (makethread): Eliminate unneeded function call.
* miscfuncs.cc (tls_ix): Predefine.
* perthread.h (set_reent): Eliminate.
(get_reent): Ditto.
* winbase.h (my_tlsalloc): Use global stack base pointer.  Set newly allocated
location to NULL.
(my_tlssetvalue): Use global stack base pointer.
(my_tlsgetvalue): Ditto.
2001-11-30 06:19:58 +00:00
Christopher Faylor 558f1fb418 * winsup.h: Reorganize to avoid use of experimental stuff.
* shortcut.cc: Move winsup.h first in include order.
2001-11-28 02:36:32 +00:00
Christopher Faylor 0caa03b00a Add attribution. 2001-11-28 01:54:05 +00:00
Christopher Faylor 4d029f3940 * cygwin.din (ualarm): New export.
* dcrt0.cc (_dll_crt0): Add experimental tls storage declaration.
(dll_crt0): Ditto.
* debug.cc (thread_stub): Ditto.
* thread.cc: Minor cleanup.
(__pthread_create): Add experimental tls storage declaration.
* miscfuncs.cc: Define tls index.
* winsup.h: Declare experimental tls storage.
* window.cc (alarm): Use old timer return from setitimer.
(ualarm): New function.
2001-11-28 00:06:35 +00:00
Christopher Faylor 505f9ba17a Revert erroneous checkin. 2001-11-26 20:21:27 +00:00
Christopher Faylor 94c0e197f0 * Makefile.in (libcygwin.a): Use ar commands to build libcygwin.a since adding
an archive doesn't work the way we want it to.
2001-11-26 20:20:42 +00:00
Corinna Vinschen c74b8922ae Add missing ChangeLog entries. 2001-11-25 09:55:15 +00:00
Christopher Faylor ded250563f * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Avoid reporting
inaccessible drives.
2001-11-25 03:28:16 +00:00
Corinna Vinschen 21e379455a * net.cc (cygwin_hstrerror): Allow s == NULL.
(cygwin_rcmd): Add parameter checking.
	(cygwin_rexec): Ditto.
2001-11-24 21:52:28 +00:00
Corinna Vinschen b0fa0e6e0f * net.cc (cygwin_inet_ntoa): Add parameter checking.
(cygwin_inet_network): Return INADDR_NONE instead of 0 in case of
	EFAULT.
	(cygwin_hstrerror): Add parameter checking.
	(cygwin_rresvport): Ditto.
	(socketpair): Ditto.
	* winsup.h (check_null_str): Add extern declaration.
2001-11-24 21:10:00 +00:00
Christopher Faylor 28d3cc021d * path.cc (path_conv::check): Tighten FH_CYGDRIVE check to avoid matching
trailing component, like other devices.
2001-11-24 21:05:00 +00:00
Christopher Faylor 3409763ff3 * autoload.cc (IsDebuggerPresent): Make conditional load since it is not
available everywhere.
* path.cc (mount_info::conv_to_win32_path): Only consider /cygdrive to be
FH_CYGDRIVE, not /cygdrive/x.
2001-11-24 20:57:19 +00:00
Christopher Faylor 53a12585ac * net.cc (inet_makeaddr): Revert previous change. 2001-11-24 17:31:15 +00:00
Christopher Faylor 4e5289d848 * path.cc (chdir): Allow 'cd /cygdrive'. 2001-11-24 03:35:58 +00:00
Christopher Faylor c123b1f3a1 fix typo. 2001-11-24 03:12:41 +00:00
Christopher Faylor 5a64d86941 * dtable.cc (dtable::vfork_parent_restore): Add debugging statement.
* exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger
attached.
* fhandler.h (fhandler_base::set_nohandle): New method.
(fhandler_base::get_nohandle): New method.
* fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no
handle.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on
dummy fd.
* Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a
* fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting
since it is no longer used.
* miscfuncs.cc (check_null_str): New function.
(+check_null_str_errno): Ditto.
* net.cc: Add defensive buffer checking throughout.
(cygwin_sendto): Protect against invalid fd.
(cygwin_recvfrom): Ditto.
(cygwin_getpeername): Ditto.
(cygwin_recv): Ditto.
(cygwin_send): Ditto.
* winsup.h: Declare a new function.
* select.cc (set_bits): Fix conditional for setting fd in exceptfds.
* dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device
type.
* path.cc (get_devn): Set correct pipe device type from device name.
2001-11-24 03:11:39 +00:00
Christopher Faylor 97a2e0756d * path.cc (conv_path_list): Fix wild indexing into path due to conflicting
methods for setting src pointer.
* dir.cc (opendir): Only pass path_conv argument to opendir, since name is
already part of the fhandler.
* dtable.cc (dtable::build_fhandler): Accomodate new FH_CYGDRIVE type.
* fhandler.cc (fhandler_base::opendir): Nuke name argument.
* fhandler.h: Add FH_CYGDRIVE to "device" enum.
(fhandler_base::opendir): Nuke name argument.
(fhandler_disk_file::opendir): Ditto.
(fhandler_disk_file::fhandler_disk_file): Declare new method which passes
devtype through.
(fhandler_cygdrive): Add elements for tracking drives.
(fhandler_cygdrive::set_drives): Declare new method.
(fhandler_cygdrive::iscygdrive_root): Declare new method.
(fhandler_cygdrive::opendir): Declare new method.
(fhandler_cygdrive::readdir): Declare new method.
(fhandler_cygdrive::telldir): Declare new method.
(fhandler_cygdrive::seekdir): Declare new method.
(fhandler_cygdrive::rewinddir): Declare new method.
(fhandler_cygdrive::closedir): Declare new method.
(fhandler_cygdrive::fstat): Declare new method.
* fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file): Define new
method which passes devtype through.
(fhandler_disk_file::open): Tweak debug output.
(fhandler_disk_file::opendir): Nuke first argument.  Use info from path_conv
and class rather than calling fstat.
(fhandler_cygdrive::set_drives): New method.
(fhandler_cygdrive::iscygdrive_root): New method.
(fhandler_cygdrive::opendir): New method.
(fhandler_cygdrive::readdir): New method.
(fhandler_cygdrive::telldir): New method.
(fhandler_cygdrive::seekdir): New method.
(fhandler_cygdrive::rewinddir): New method.
(fhandler_cygdrive::closedir): New method.
(fhandler_cygdrive::fstat): New method.
* path.cc (iscygdrive_device): Assume cygdriveness is already verified.
(path_conv::check): Treat FH_CYGDRIVE "method" as a special case, setting file
attributes as needed.
(mount_info::conv_to_win32_path): Allow stand-alone /cygdrive, meaning "the
directory which contains all of the drives on the system".
(fillout_mntent): Use cyg_tolower for conversions.
(mount_info::cygdrive_win32_path): Replace unused argument with unit number.
* shared_info.h (mount_info::cygdrive_win32_path): Reflect argument change.
2001-11-22 05:59:07 +00:00
Christopher Faylor 7903ee6955 * Makefile.in (DLL_OFILES): Add fhandler_disk_file.o.
* cygheap.h (cygheap_fdnew::operator =): New operator.
* dir.cc: Add invalid struct checking throughout.  Use methods for all
directory manipulation throughout.
* fhandler.cc: Move fhandler_disk_file stuff to own file.
(fhandler_base::opendir): New method.
(fhandler_base::readdir): New method.
(fhandler_base::telldir): New method.
(fhandler_base::seekdir): New method.
(fhandler_base::rewinddir): New method.
(fhandler_base::closedir): New method.
* fhandler_disk_file.cc: New file.
* fhandler.h (fhandler_base): Declare new virtual methods.
(fhandler_disk_file): Ditto.
(fhandler_cygdrive): New class.
* path.cc (conv_path_list): Use strccpy to break apart path.
2001-11-21 06:47:57 +00:00
Christopher Faylor 9c6a5c6ea8 * path.cc (conv_path_list): Copy source paths before modifying them. 2001-11-17 20:19:19 +00:00
Corinna Vinschen 42d292493b * fhandler_raw.cc (fhandler_dev_raw::clear): Don't reset unit.
* fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Add debug
	output.
2001-11-16 23:28:56 +00:00