Commit Graph

3454 Commits

Author SHA1 Message Date
Christopher Faylor 94cc482c64 * mount.cc (main): Use default system/user flag for cygdrive stuff, too.
(change_cygdrive_prefix): Change MOUNT_AUTO to MOUNT_CYGDRIVE.
* umount.cc (remove_cygdrive_prefix): Ditto.
(main): Use default system/user flag for cygdrive stuff, too.
2002-06-09 04:54:32 +00:00
Christopher Faylor 7ac66bdda0 * pinfo.cc (pinfo_dummy): Initialize to correct size. 2002-06-09 03:54:07 +00:00
Danny Smith 63f4c63a19 * include/windows.h (ole2.h): #include if !__OBJC__ and
__GNUC__ >=3 and !WIN32_LEAN_AND_MEAN.
2002-06-09 03:37:20 +00:00
Jason Thorpe 6643e348be * configure.in (vax-*-netbsd*): Re-enable gas. 2002-06-09 01:32:19 +00:00
Christopher Faylor a004a5b8fb * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
2002-06-09 00:48:38 +00:00
Christopher Faylor 60a3d46123 * mount.cc (opts): Remove '-i' option.
(usage): Ditto.
(main): Ditto.
(longopts): Remove --import-old-mounts option.
2002-06-09 00:33:27 +00:00
Christopher Faylor 50484e8e36 * external.cc (cygwin_internal): Make v1 mount table access invalid.
* path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
(mount_info::from_registry): Remove v1 table import.
(mount_info::read_v1_mounts): Eliminate.
(mount_info::import_v1_mounts): Ditto.
* shared_info.h (mount_info): Ditto for both of above.
* sys/mount.h (MOUNT_DEVFS): New enum.
(MOUNT_PROC): Ditto.
2002-06-09 00:31:03 +00:00
Christopher Faylor 2e2dcba320 * include/wchar.h: Define __need_size_t. 2002-06-08 16:55:47 +00:00
Alan Modra bdc9d6f5bf * a29k.h: Replace CONST with const.
(CONST): Don't define.
	* convex.h: Replace CONST with const.
	(CONST): Don't define.
	* dlx.h: Replace CONST with const.
	* or32.h (CONST): Don't define.
2002-06-08 07:32:12 +00:00
Christopher Faylor f61563846d coerce 2002-06-08 01:35:54 +00:00
Christopher Faylor 9cde3cf3b5 * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket is
unix-domain socket.
* times.cc (hires_ms::prime): Set init flag.
* times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to 1970.
2002-06-08 01:24:58 +00:00
Thomas Fitzsimmons 0953fe640f * libm/common/s_fdim.c: New file.
* libm/common/s_fma.c: Likewise.
	* libm/common/s_fmax.c: Likewise.
	* libm/common/s_fmin.c: Likewise.
	* libm/common/s_fpclassify.c: Likewise.
	* libm/common/s_lrint.c: Likewise.
	* libm/common/s_lround.c: Likewise.
	* libm/common/s_nearbyint.c: Likewise.
	* libm/common/s_remquo.c: Likewise.
	* libm/common/s_round.c: Likewise.
	* libm/common/s_scalbln.c: Likewise.
	* libm/common/s_signbit.c: Likewise.
	* libm/common/s_trunc.c: Likewise.
	* libm/common/sf_fdim.c: Likewise.
	* libm/common/sf_fma.c: Likewise.
	* libm/common/sf_fmax.c: Likewise.
	* libm/common/sf_fmin.c: Likewise.
	* libm/common/sf_lrint.c: Likewise.
	* libm/common/sf_lround.c: Likewise.
	* libm/common/sf_nearbyint.c: Likewise.
	* libm/common/sf_remquo.c: Likewise.
	* libm/common/sf_round.c: Likewise.
	* libm/common/sf_scalbln.c: Likewise.
	* libm/common/sf_trunc.c: Likewise.
	* libm/math/w_exp2.c: Likewise.
	* libm/math/w_tgamma.c: Likewise.
	* libm/math/wf_exp2.c: Likewise.
	* libm/math/wf_tgamma.c: Likewise.
	* libm/mathfp/s_exp2.c: Likewise.
	* libm/mathfp/s_tgamma.c: Likewise.
	* libm/mathfp/sf_exp2.c: Likewise.
	* libm/mathfp/sf_tgamma.c: Likewise.
	* libm/math/er_gamma.c: Fix return value.
	* libm/math/erf_gamma.c: Likewise.
	* libm/mathfp/er_gamma.c: Likewise.
	* libm/mathfp/erf_gamma.c: Likewise.
	* libc/include/math.h (!__STRICT_ANSI__): Include ISOC99-specific
	declarations and macros.
	Regenerated all Makefile.in, aclocal.m4 and configure files to
	use new libtool macros in top-level libtool.m4
2002-06-07 21:59:57 +00:00
Christopher Faylor 2bd6505b39 * cygpath.cc: Add option to output windows paths in different formats: "dos"
and "mixed".
(main): Process options.
(doit): Check new options flags.
2002-06-07 19:25:26 +00:00
Nick Clifton f43a747271 Enable pei386_auto_import by default. Only print a info message about auto
imports being resilved if this feature was not requested via a command line
switch.
2002-06-07 14:56:01 +00:00
Corinna Vinschen 381fb8baa1 * regtool.cc (Fail): Be more verbose.
(find_key): Add support for remote registry access.
	(usage): Document it.
	* utils.sgml: Document it.
2002-06-07 11:12:16 +00:00
Christopher Faylor 9d0efbb3ae * autoload.cc (timeGetDevCaps): Define new autoload function.
(timeGetTime): Ditto.
(timeBeginPeriod): Ditto.
(timeEndPeriod): Ditto.
* hires.h (hires_base): New class.  Renamed from hires.
(hires_us): New class.
(hires_ms): New class.
* strace.cc (strace::microseconds): Use hires_us class.
* times.cc (gettimeofday): Use hires-ms class.
(hires_us::prime): Renamed from hires::prime.
(hires_us::usecs): Renamed from hires:usecs.
(hires_ms::prime): New method.
(hires_ms::usecs): New method.
(hires_ms::~hires_ms): New destructor.
2002-06-07 03:44:33 +00:00
Christopher Faylor b841df7954 * strace.cc (main): Make toggle a local variable. 2002-06-07 01:37:20 +00:00
Christopher Faylor 80082f1ec4 * strace.cc (toggle): New global variable.
(error): Use exit instead of ExitProcess so that stdio buffers get flushed.
(create_child): Remove command line error checking.
(dostrace): Ditto.
(dotoggle): New function.
(usage): Add entry for new option -T|--toggle.  Alphabetize.
(longopts): Add new option -T|--toggle.
(opts): Ditto.
(main): Handle new -T|--toggle option.  Move all command line checking here
from other functions.
* utils.sgml: Update section for strace.
2002-06-07 01:36:17 +00:00
Danny Smith a579a11b57 2002-06-07 Gunnar Degnbol <gdegnbol@users.sourceforge.net>
* include/mapi.h: Change LPTSTR to LPSTR throughout.
2002-06-07 00:30:17 +00:00
Christopher Faylor 46b941fcf9 * autoload.cc (noload): Correctly save argument count register. 2002-06-06 23:53:45 +00:00
Corinna Vinschen c4e6ff484c * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
st_atim, st_mtim, and st_ctim fields.
	* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
	* fhandler_process.cc (fhandler_process::fstat): Ditto.
	* glob.c (stat32_to_STAT): Copy across the whole st_atim,
	st_mtime, and st_ctim fields.
	* syscalls.cc (stat64_to_stat32): Ditto.
	* times.cc (to_timestruc_t): New function.
	(time_as_timestruc_t): New function.
	* winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
	* include/cygwin/stat.h: Replace time_t with timestruc_t
	throughout for all file times, removing the st_spare1, st_spare2,
	and st_spare3 fields in the process. Add macros to access tv_sec
	fields by old names.
	* include/cygwin/types.h: Typedef timespec_t and timestruc_t as
	struct timespec.
2002-06-06 15:35:09 +00:00
DJ Delorie a81cc3be2a merge from gcc 2002-06-06 12:55:14 +00:00
Corinna Vinschen 2e8abfc1c5 * sec_helper.cc (lookup_name): Suppress.
* security.cc (alloc_sd): Remove logsrv argument.
	Remove two calls to lookup_name.
	(set_security_attribute): Remove logsrv argument.
	Remove logsrv argument in call to alloc_sd.
	(set_nt_attribute): Remove logsrv argument.
	Remove logsrv argument in call to set_security_attribute.
	(set_file_attribute): Remove logsrv argument.
	Remove logsrv argument in call to set_nt_attribute.
	(set_file_attribute): Remove logsrv argument.
	Remove logsrv argument in call to set_file_attribute.
	* syscalls.cc (chown_worker): Remove logserver argument in
	call to set_file_attribute.
	(chmod): Ditto.
	* shm.cc (shmget): Remove logsrv argument in call to alloc_sd.
	* uinfo.cc (internal_getlogin): Replace calls to
	lookup_name by call to LookupAccountName.
	* security.h: Remove logsrv in declarations of set_file_attribute
	and alloc_sd. Remove declaration of lookup_name.
2002-06-06 11:17:51 +00:00
Alan Modra ea6a35f68a * common.h: Change registry@sco.com to registry@caldera.com.
(EM_PDP10, EM_PDP11): Define.
2002-06-06 09:59:38 +00:00
Corinna Vinschen ae1ebb81dc Fix ChangeLog entry. 2002-06-06 08:37:24 +00:00
Christopher Faylor ba692ae9c0 * strace.cc (version): New global variable.
(usage): Accomodate stdout output.
(print_version): New function.
2002-06-06 02:55:10 +00:00
Christopher Faylor f7a7cc9067 * child_info.h (CHILD_INFO_MAGIC): Oops. Revert previous change. gcc 3.1 bug? 2002-06-06 01:49:56 +00:00
Christopher Faylor 784e340c03 * child_info.h (CHILD_INFO_MAGIC): Update. 2002-06-06 01:31:16 +00:00
Christopher Faylor 58fcd93ae3 * strace.cc (strace::hello): Set inited, when appropriate. 2002-06-06 01:26:33 +00:00
Christopher Faylor c240a7fcde * ssp.c (version): New global variable.
(longopts): Ditto.
(opts): Ditto.
(run_program): Correct cmd_line typos to cmdline.
(usage): New function.  Standardize usage output.  Add ssp.txt to --help
output.
(print_version): New function.
(main): Accommodate getopt.
2002-06-06 00:36:12 +00:00
Christopher Faylor ee964e2f97 * cygwin.din: Eliminate some newlib wrappers.
* path.cc (get_devn): Only consider first 99 potential com devices.
(get_device_number): Ditto.
* times.cc (_times): Eliminate.
(_times): Renamed from times().
2002-06-06 00:09:55 +00:00
Jeff Johnston 39e65e0113 2002-06-05 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/string.h[__linux__]: Add strsignal prototype.
        * libc/include/sys/lock.h: New file with default locking support.
        * libc/include/sys/reent.h: Add signal buffer support for strsignal
        and psignal.
        * libc/posix/Makefile.am: Add support for readdir_r.c.
        * libc/posix/Makefile.in: Regenerated.
        * libc/posix/closedir.c: Add locking support and hash table cleanup.
        * libc/posix/opendir.c: Add lock support.
        * libc/posix/readdir.c: Ditto.
        * libc/posix/rewinddir.c: Ditto.
        * libc/posix/scandir.c: Ditto.
        * libc/posix/seekdir.c: Ditto.
        * libc/posix/telldir.c: Ditto plus add _cleanupdir routine to
        clean up leftover hash table entries.
        * libc/posix/readdir_r.c: New file.
        * libc/sys/linux/Makefile.am: Add psignal.c and strsignal.c support.
        * libc/sys/linux/Makefile.in: Regenerated.
        * libc/sys/linux/sys/dirent.h: Add dd_lock to DIR structure.
        * libc/sys/linux/sys/signal.h: Add psignal prototype.
        * libc/sys/linux/psignal.c: New file.
        * libc/sys/linux/strsignal.c: Ditto.
2002-06-05 20:58:59 +00:00
Christopher Faylor ea4e6ec8f9 * dir.cc (rmdir): Streamline. Detect attempts to remove directories from
"read-only" virtual devices.  (Suggested by Pavel Tsekov)
* syscalls.cc (unlink): Detect attempts to remove directories from "read-only"
virtual devices.  (From Pavel Tsekov)
2002-06-05 16:01:55 +00:00
Christopher Faylor 2bb6b3e506 * dtable.cc (handle_to_fn): Check error return value from NtQueryObject first
before seeing if name buffer is NULL.
* grp.cc (read_etc_group): Fix gcc warning regarding snprintf format.
* passwd.cc (read_etc_passwd): Ditto.
2002-06-05 15:43:49 +00:00
Robert Collins e9259cb240 /tmp/cvs610a0efc.1 2002-06-05 12:39:55 +00:00
Corinna Vinschen eceee297d5 * grp.cc (read_etc_group): When emulating nonexisting group file on
NT systems, read primary group SID from process token.  Use that info
	to create correct group entry.  On error or on 9x systems fallback
	to emulating Administrators group as before.
	(read_etc_passwd): When emulating nonexisting passwd file on NT systems,
	read user and primary group SID from process token.  Use that info to
	create correct passwd entry.  On error or on 9x systems fallback to
	emulating user with Administrator user id and Administrators group
	as before.
2002-06-05 11:56:56 +00:00
Corinna Vinschen 38f3936889 * grp.cc (etc_group): Removed.
(parse_grp): Make line parameter nonconst.  Don't copy data into new
	allocated memory.  Check for CR instead of LF to accomodate new
	read method.
	(add_grp_line): Make line parameter nonconst.
	(read_etc_group): Rearrange using new pwdgrp_read class.
	* passwd.cc (parse_pwd): Don't copy data into new allocated memory.
	Check for CR instead of LF to accomodate new read method.
	(read_etc_passwd): Rearrange using new pwdgrp_read class.
	* pwdgrp.h (pwdgrp_check::set_last_modified):  Use different
	parameters.
	(class pwdgrp_read): New class for opening and reading passwd and
	group files.
2002-06-05 11:10:15 +00:00
Christopher Faylor ce006ffa7f * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote shares.
* path.cc (mount_info::conv_to_win32_path): Set flags to binary when mount
entry is not found.
(mount_info::set_flags_from_win32_path): Ditto.
2002-06-05 04:01:43 +00:00
Christopher Faylor 147d2ab494 * dtable.cc (handle_to_fn): Correct placement and length of name buffer.
(Suggested by Pavel Tsekov)
2002-06-05 02:42:15 +00:00
Jason Thorpe 372e3e53ba bfd/
* Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
(elf32-sh64-com.lo): New dependency list.
* Makefile.in: Regenerate.
* configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
(bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
elf32-sh64-com.lo.
* configure: Regenerate.
* elf32-sh64.c (sh64_address_in_cranges)
(sh64_get_contents_type, sh64_address_is_shmedia): Move to...
(crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
(crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
* elf32-sh64-com.c: ...here.  New file.

include/elf/
* sh.h (_bfd_sh64_crange_qsort_cmpb, _bfd_sh64_crange_qsort_cmpl)
(_bfd_sh64_crange_bsearch_cmpb, _bfd_sh64_crange_bsearch_cmpl): New
prototypes.
2002-06-05 01:50:42 +00:00
Christopher Faylor e35f391fa5 Remove fcntl.h includes throughout.
* fhandler.h: Move fcntl.h include here.
(fhandler_base::set_flags): Accept supplied_bin argument.  Make non-inlined.
* dtable.cc (dtable::init_std_file_from_handle): Just use binmode from pc.
(reset_to_open_binmode): Use set_flags.
* cygwin.din (open): Avoid newlib wrapper.
(read): Ditto.
(unlink): Ditto.
(write): Ditto.
* fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument.  Make
binmode decisions here.
(fhandler_base::open): Avoid using pc if it is NULL.  Eliminate binmode logic.
Just call set_flags with binmode argument.
(fhandler_base::init): Call set_flags with binmode argument.
* fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
* fhandler_console.cc (fhandler_console::open): Ditto.
(fhandler_console::init): Force binary on open.
* fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode here.
Let it happen in base class.
* fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open.  Set return
value appropriately if unable to open.
* fhandler_proc.cc (fhandler_proc::open): Make sure flags are set before
open_status.
* fhandler_process.cc (fhandler_process::open): Ditto.
* fhandler_registry.cc (fhandler_registry::open): Ditto.
* fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
* fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default.
* fhandler_serial.cc (fhandler_serial::init): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
(fhandler_pty_master::open): Ditto.
* fhandler_virtual.cc (fhandler_virtual::open): Ditto.
* fhandler_windows.cc (fhandler_windows::open): Ditto.
* fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
* net.cc (fdsock): Ditto.
* path.cc (path_conv::check): Avoid checking for extension when error or
directory.
(set_flags): Set PATH_TEXT explicitly, when appropriate.
(mount_info::conv_to_win32_path): Use set_flags() to set path flags.
* path.h (PATH_TEXT): New enum.
(path_conv::binmode): Return appropriate constant based on binmode.
* pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY.
* syscalls.cc (setmode_helper): Make debugging message a little clearer.
(setmode): Set binmode via set_flags.
2002-06-05 01:42:28 +00:00
Danny Smith 915d66ce9e * include/winnt.h (PACE_HEADER, PACCESS_ALLOWED_ACE,
PACCESS_DENIED_ACE): Add typedefs.
2002-06-04 22:41:50 +00:00
Corinna Vinschen 4e1388472d * fhandler.h (class fhandler_socket): Add private method
fixup_after_fork (bool, HANDLE).
	* fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move
	functionality to new private method.  Add closing parent socket
	if not called from dup().  Create method new calling private method
	with appropriate parameter.
	(fhandler_socket::fixup_after_exec): Call private method
	fixup_after_fork with appropriate parameter.
	(fhandler_socket::dup): Ditto.
2002-06-04 16:38:13 +00:00
Corinna Vinschen 6bfca3cca5 * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
requested mode isn't supported.
2002-06-04 11:18:46 +00:00
Christopher Faylor e02f1e9c81 * fhandler.cc (fhandler_base::open): Don't set binmode if already set. Don't
check for file.  Files should already be set.  Report on binary mode for
debugging.
(fhandler_base::fhandler_base): Don't set default binmode here.  That's for
later.
* fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set binmode,
ever, for console.
* fhandler_disk_file.cc (fhandler_disk_file::open): Always set the binary mode
to the value derived from mount table.
* path.cc (mount_info::conv_to_win32_path): Default to binmode if path does not
translate into anything in the mount table.
2002-06-04 01:40:53 +00:00
Christopher Faylor e6cd2312d6 * umount.cc (version): New global variable.
(longopts): Accommodate new --version option.
(opts): Ditto.
(usage): Standardize usage output.
(print_version): New function.
(main): Accommodate --help, --version options.
2002-06-04 01:31:28 +00:00
Corinna Vinschen 31b98a623c * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
handling to call extract_nt_dom_user() from applications.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add
	CW_EXTRACT_DOMAIN_AND_USER.
2002-06-03 17:56:10 +00:00
Corinna Vinschen cc890e8952 * libc/include/sys/types.h: Don't define dev_t when compiling for
Cygwin.
2002-06-03 17:48:06 +00:00
Corinna Vinschen b3c2973142 * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
(fstat64): Add evaluating st_ino and st_dev.
	(stat_worker): Evaluate st_dev as 32 bit value.
	* include/cygwin/stat.h: Use new dev_t definition throughout.
	* include/cygwin/types.h: Define __dev16_t and __dev32_t.  Define
	dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
	* include/sys/sysmacros.h: Define major, minor and makedev
	according to __CYGWIN_USE_BIG_TYPES__ setting.
2002-06-03 17:44:09 +00:00
Corinna Vinschen 656c31920b * syscalls.cc (setegid32): Verify the correctness of the gid
of the group returned by getgrgid32.
2002-06-03 17:11:14 +00:00