Commit Graph

766 Commits

Author SHA1 Message Date
Christopher Faylor 3ee92b51d6 * Makefile.in: Use dtable.o rather than hinfo.o. 2000-08-12 05:09:27 +00:00
Christopher Faylor 9015e0fb8c Rename hinfo -> dtable. Name the former dtable array 'fdtab'. 2000-08-12 04:48:44 +00:00
Jason Merrill 86bf05d540 * configure.in (CC_FOR_TARGET, CHILL_FOR_TARGET,
CXX_FOR_TARGET): Add -B$$r/gcc/ here.
        (FLAGS_FOR_TARGET): Not here.
        (CHILL_FOR_TARGET, CXX_FOR_TARGET): Don't check the list of languages.
2000-08-12 00:49:39 +00:00
Corinna Vinschen 427b6d036e * poll.cc: Allow any descriptor and any number of descriptors.
Allocate fd_set struct sdynamically.
2000-08-11 20:34:24 +00:00
Christopher Faylor bbda7ca078 Fix premature use of fdtab. 2000-08-11 13:49:42 +00:00
Corinna Vinschen e82d75cc2b * poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
if fd is invalid. Return POLLERR for each valid fd if cygwin_select
        returned with error.
        include/sys/poll.h: Change POLLERR comment according to above change.
2000-08-11 12:51:47 +00:00
Christopher Faylor 7b972f5da5 * syslog.cc (syslog): Use a less malloc-intensive method for allocating the
buffer.  Also fix a buffer overrun.
2000-08-11 01:56:05 +00:00
Christopher Faylor 20eb1efd9d DJ is sole setup maintainer now. 2000-08-10 23:51:25 +00:00
Christopher Faylor 37e7e1a3e5 Change comment. 2000-08-10 22:24:58 +00:00
Christopher Faylor 02b503c875 comment changes. 2000-08-10 22:22:09 +00:00
Christopher Faylor 9c20cc85aa Minor change. 2000-08-10 22:04:38 +00:00
Christopher Faylor da2a05da2a Minor change. 2000-08-10 22:02:41 +00:00
Christopher Faylor b6a0e444d9 Minor change. 2000-08-10 21:54:44 +00:00
Christopher Faylor b5ae313ab5 * winsup.h: Change strchr inline for strange gcc problem.
* select.cc (select_stuff::wait): Bounds check w4 array.
2000-08-10 19:33:54 +00:00
Christopher Faylor b58f5598cb * dir.cc (readdir): Ensure that errno is *only* set when we've run out of
filenames.
* fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving errno,
making it effective for the whole function.
2000-08-10 19:20:11 +00:00
Nick Clifton 38a6bf987b Recode to clean up function prologues and epilogue and to allow the functions
to be used in a Thumb based toolchain.
2000-08-09 21:55:54 +00:00
Jason Eckhardt ff3d99fb37 gas:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>

	* config/tc-i860.h: Rework completely for BFD_ASSEMBLER.
	(i860_fix_info): New enum.
	(MD_APPLY_FIX3): Define.
	(WORKING_DOT_WORD): Define.
	(TC_HANDLES_FX_DONE): Define.
	(DIFF_EXPR_OK): Define.
	(LISTING_HEADER): Define.
	(TARGET_FORMAT): Select target format based on endian flag.
	(TARGET_BYTES_BIG_ENDIAN): Default to little endian.
	(target_big_endian): Add external declaration.

	* config/tc-i860.c: All existing code reworked completely. Other
	new code shown below.
	(SYNTAX_SVR4): Define.
	(target_warn_expand): New variable.
	(md_shortopts): Declare and define (-Qy, -Qn, and -V options).
	(md_longopts): Declare and define with new options (-EL, -EB,
	and -mwarn-expand).
	(md_show_usage): New function.
	(md_operand): New function.
	(obtain_reloc_for_imm16): New function.
	(md_apply_fix3): New function.
	(tc_gen_reloc): New function.

include:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>

	* opcode/i860.h: Small formatting adjustments.

opcode:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>

	* i860-dis.c (print_br_address): Change third argument from int
	to long.

bfd:
2000-08-08  Jason Eckhardt  <jle@cygnus.com>
	* elf32-i860.c (elf32_i860_howto_table): Updated some fields.
2000-08-09 03:33:41 +00:00
Christopher Faylor 0072fdab86 * select.cc (allocfd_set): Zero allocated fd_set.
(cygwin_select): Move fd_set copying logic from ::wait to here.  Use common
return through sell.poll.
(select_stuff::wait): Just return success or failure and let caller fill in
fd_set.
* pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since pinfo
structure exists at random locations now.
* fork.cc (fork): Use 'use_psid' element to control when the psid is relevant.
* shared.cc (sec_user): Ditto.
* spawn.cc (spawn_guts): Ditto.
* uinfo.cc (internal_getlogin): Ditto.
* syscall.cc (seteuid): Ditto.  Set use_psid element.
2000-08-09 02:33:47 +00:00
DJ Delorie c51a2a8ba4 * fhandler_serial.cc (tcsendbreak): "sleeptime" argument to usleep()
must be in units of microseconds, not milliseconds.
2000-08-08 20:46:47 +00:00
Corinna Vinschen 5678e1954a * include/userenv.h: New header file.
* lib/userenv.def: New stub for userenv.dll.
2000-08-08 20:00:35 +00:00
Jeff Johnston befe0fb3e1 2000-08-08 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/snprintf.c (snprintf, _snprintf_r): Fixed code
        so size of 0 results in nothing being written to string.
        Also fixed code so that when size is non-zero, there is only
        a maximum of size - 1 characters written to the array and
        a nul terminator is appended at the end.
        * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto.
2000-08-08 19:01:02 +00:00
Christopher Faylor 0e882d4f29 * include/winuser.h: Correct PCWPSTRUCT typo.
(discovered by Axel Riese)
2000-08-08 14:30:54 +00:00
Nick Clifton fc6ab55952 Remove spurious CYGNUS LOCAL comments 2000-08-07 18:54:49 +00:00
DJ Delorie d32ca893ac * configure.in (FLAGS_FOR_TARGET): invert test for xgcc, should mean
"if we're also building gcc, and it's a gcc that will run on the
build machine, we want to use its includes instead of the system's
default includes".
2000-08-07 15:02:09 +00:00
Christopher Faylor 709262970f * include/cygwin/cygwin_dll.h: Remove extraneous (and incorrect) declarations. 2000-08-07 04:13:34 +00:00
Denis Chertykov 553d0fe671 * avr.h (AVR_UNDEF_P, AVR_SKIP_P, AVR_DISP0_P): New macros.
Move related opcodes closer to each other.
	Minor changes in comments, list undefined opcodes.
2000-08-06 14:09:14 +00:00
Christopher Faylor 91892f50d9 * hinfo.cc (hinfo::find_unused_handle): Just check for table entry == NULL
since we are already bounds checked by default.
* thread.cc (ResourceLocks::Lock): Streamline this function since it is called
a lot.
(ReleaseResourceLock): Ditto.
2000-08-04 04:04:46 +00:00
Christopher Faylor e5dd88116a * select.cc (fhandler_console::select_read): Call set_cursor_maybe since select
may block and cursor may not be visible.
* select.cc (fhandler_console::select_write): Ditto.
* select.cc (fhandler_console::select_except): Ditto.
2000-08-04 01:33:33 +00:00
Alexandre Oliva e0b51f5a76 * configure.in (libstdcxx_flags): Don't use `"'. 2000-08-03 23:54:09 +00:00
Alexandre Oliva d2b20142e4 * config-ml.in: Adjust multilib search paths to the
appropriate multilib tree.
2000-08-03 19:20:16 +00:00
Christopher Faylor 14323f6a97 * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set length field
correctly when "need_nl".
2000-08-03 13:02:09 +00:00
Christopher Faylor 47026c0785 * fork.cc (vfork): Store complete stack frame in vfork_save structure for later
recovery.
* spawn.cc (spawn_guts): Reorganize slightly to consolidate handling when there
is a CreateProcess error.
(_spawnve): Only longjmp back to vfork handling when a process has been
successfuly started.
* winsup.h (vfork_save): Extend to include frame info.  Remove obsolete cpplus
conditionals.
2000-08-03 03:02:41 +00:00
Alexandre Oliva 6a2ef32105 * configure.in (CHILL_FOR_TARGET, CXX_FOR_TARGET): Convert blanks to
commas in $LANGUAGES.
2000-08-03 02:22:11 +00:00
DJ Delorie 9ccb71b88f add winsup.h 2000-08-02 20:13:18 +00:00
Christopher Faylor 20d7f75837 * strace.cc (strace::prntf): Make second argument the function name, rather
than use special format options.
(strace::vprntf): Ditto.
(getfunc): New function.
* include/sys/strace.h: Reflect above changes.
* smallprint.c (__small_vsprintf): Eliminate '%F' formatting.
* pinfo.cc (set_myself): Modify for new strace::prntf parameter.
* errno.cc (seterrno_from_win_error): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Ditto.
2000-08-02 19:26:01 +00:00
DJ Delorie 5a7b5870ff 2000-08-01 Alexandre Oliva <aoliva@redhat.com>
* configure.in (qCXX_FOR_TARGET): Use echo instead of expr.

2000-07-31  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (qCXX_FOR_TARGET): Quote `&' characters in
	CXX_FOR_TARGET for sed.

2000-07-30  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (CC_FOR_TARGET, CHILL_FOR_TARGET, CXX_FOR_TARGET):
	Do not override if already set in the environment or in configure.
	Don't duplicate $(FLAGS_FOR_TARGET) if it already appears in them.
	(FLAGS_FOR_TARGET): Don't use host directories on Canadian crosses.
2000-08-02 18:56:20 +00:00
Christopher Faylor c1efa78572 * regexp/regexp.c: Add winsup.h. 2000-08-02 17:21:27 +00:00
DJ Delorie 4c8d72ded5 * winsup.h: take out protections of environ, errno, allow C use
* *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__);
use cur_environ() instead of just environ
* times.cc: remove import protections
* glob.c: add winsup.h
* localtime.c: ditto
* smallprint.c: ditto
* Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
2000-08-02 16:28:18 +00:00
Christopher Faylor ad8dea13f0 * include/sys/strace.h: Fix strace definition. 2000-08-02 15:24:45 +00:00
Christopher Faylor a5a965ff62 * strace.h: Add kludgy workarounds to avoid using deprecated methods for
variable argument macros when possible.
* sigproc.cc: Throughout, use sigproc_printf rather than sip_printf.
* strace.cc (strace::prntf): Remove 'active' check, since callers are supposed
to ensure this.
(__system_printf): Remove.  Subsumed by strace::prntf.
* winsup.h: Define "NEW_MACRO_VARARGS" to indicate when to use new macro
varargs capability.
2000-08-02 03:42:31 +00:00
DJ Delorie 749d9bcd4b * libc/include/sys/config.h: define __IMPORT appropriately
* libc/include/ctype.h (_ctype_): use __IMPORT
* libc/include/math.h (__infinity, signam, _LIB_VERSION): ditto
* libc/include/math.h (__mb_cur_max): ditto
* libc/include/time.h (_timezone, _daylight, _tzname): ditto
* libc/include/unctrl.h (__unctrl, __unctrllen): ditto
* libc/include/errno.h (_sys_errlist, _sys_nerr): ditto
* libc/include/unistd.h (environ): ditto
2000-08-01 20:51:51 +00:00
Corinna Vinschen deb2b467e9 * passwd.c (main): Initialize oldpwd before beeing used. 2000-07-31 13:35:39 +00:00
Christopher Faylor a9867e1b58 * fhandler_console.cc: Remove VK_DIVIDE detection.
(get_nonascii_key): Simplify previous patch to return ascii char if it is
non-zero.  Add a second "temporary buffer" argument to help with thread safety.
* select.cc (peek_console): Pass a temporary buffer argument to
get_nonascii_key.
2000-07-30 17:58:48 +00:00
Nick Clifton f0a69f46bb Fix formatting
Add copyright notice
2000-07-29 19:37:30 +00:00
Christopher Faylor 751669bbb0 * fhandler_console.cc: Add VK_DIVIDE detection. Return virtual keycode if it
is not detected and it is less than ' '.
2000-07-29 19:07:15 +00:00
Christopher Faylor af5153a036 * path.cc (chdir): Avoid trailing dot calculation when chdir == '/' or we end
up with an empty string.
2000-07-29 17:36:05 +00:00
Christopher Faylor cc631726d3 * kill.cc (main): Add '-f' option to force termination of a process.
(forcekill): New function.
* ps.cc (main): Add '-W' option to list Windows pids as well as Cygwin pids.
(dummyprocessmodules): New function.
(GetModuleFileNameEx95): New function.
(init_win): New function.
(to_time_t): New function.
2000-07-29 16:26:37 +00:00
Christopher Faylor 84c7d40932 * include/cygwin/version.h: Bump DLL minor version number to 5 due to all of
the changes below.  Redefine process structure to avoid a fixed size table.
Redefine pinfo/_pinfo classes.  Use these throughout.
* dcrt0.cc (dll_crt0_1): Accomodate set_myself argument change.
(__api_fatal): Accomodate _pinfo::record_death argument change.
* exceptions.cc (really_exit): Ditto.
(sig_handle_tty_stop): Use pinfo constructor to access process info.
(events_init): Don't create pinfo_mutex since it is no longer required.
* external.cc (fillout_pinfo): Use winpids class to iterate over all system
pids.
(cygwin_internal): lock_pinfo_for_update and unlock_pinfo are now noops.
* fhandler_termios.cc (fhandler_termios::set_ctty): Use pinfo constructor to
access process info.
* fork.cc (fork): Reorganize to initialize child info after the child has
started since that is when we know the child's winpid, which is necessary to
allocate the pinfo shared memory.
* mmap.cc (recreate_mmaps_after_fork): Change arg type to _pinfo.
* pinfo.cc: Rename pinfo methods to _pinfo throughout.  Eliminate pinfo_list
stuff.
(set_myself): Accept a pid argument now.  Call pinfo initializer to initialize
myself.  Detect when this is an "execed" process and create an "indirect" pid
block.
(pinfo_init): Accomodate set_myself arg change.
(procinfo): Remove.
(pinfo::lock_pinfo): Remove.
(pinfo::unlock_pinfo): Remove.
(pinfo::init): New method.  Allocates shared memory space for process pinfo
structure.
(pinfo::record_death): Don't call locking functions.
(cygwin_winpid_to_pid): Simplify by using new pinfo constructor.
(EnumProcessesW95): New function for iterating over processes on Windows 95.
(winpids::winpids): New constructor for winpids class.  Sets up a list of
process ids.
(enum_init): Initialize w95/wnt pid enumerators.
* shared.cc (shared-info::initialize): Remove pid initialization.
* shared.h: Move pinfo stuff into pinfo.h.
(class shared_info): Remove pinfo_list element.
* signal.cc (kill_worker): Use pinfo constructor to access process info.
(kill_pgrp): Ditto.  Use winpids methods to access list of processes.
* sigproc.cc: Throughout, modify to use _pinfo where appropriate.
(proc_exists (pid_t)): New function.  Determines if a process exists based on
the pid.
(proc_exists (_pinfo *p): Use new proc_exists function above.
(proc_subproc): Copy pinfo stuff around rather than _pinfo pointers.  Try to be
careful about releasing shared memory when we don't need it anymore.  Remove
pinfo locks.
(remove_zombies): Remove pinfo memory when zombie is going away.
* sigproc.h: Reflect _pinfo/pinfo changes in sigproc.cc.
* spawn.cc (spawn_guts): Eliminate pinfo *child argument.  Reorganize to only
initialize child pinfo after process has been started and we know the windows
pid.
(_spawnve): Reflect spawn_guts changes.
* syscalls.cc (setpgid): Use pinfo constructor to access process info.
(getpgid): Ditto.
(internal_getlogin): Use _pinfo.
* winsup.h: Eliminate pinfo_mutex.  Eliminate spawn_guts declaration since it
is static now.  Reflect set_myself argument change.
* include/sys/cygwin.h: Add some PID_* enums to accomodate new pinfo stuff.
* include/cygwin/version.h: Update minor version for cygdrive changes below.
2000-07-29 16:24:59 +00:00
Christopher Faylor 53211514a0 * environ.cc (parse_thing): Make binmode a DWORD.
* hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to determine
default open mode.
* winsup.h: Declare binmode.
2000-07-29 16:01:23 +00:00
Christopher Faylor 9eef1530d5 * include/cygwin/cygwin_dll.h: Update for modern compilers.
* lib/cygwin_crt0.c: Inexplicably need to define alloca for newer compilers.
* fhandler.h (fhandler_console): Add new method.
* fhandler.cc (fhandler_console::set_cursor_maybe): New method.
(fhandler_console::read): Set cursor if it has moved to make it visible.
2000-07-29 04:19:24 +00:00