Jeff Johnston [Thu, 29 Aug 2002 15:32:08 +0000 (15:32 +0000)]
2002-08-29 Jeff Johnston <jjohnstn@redhat.com>
* libc/locale/locale.c (_setlocale_r)[MB_CAPABLE]: Fix so
default locale "" is accepted for LC_CTYPE or LC_MESSAGES
and is treated as if "C" was specified.
* cygthread.cc (hthreads): Remove unneeded global.
(cygthread::simplestub): New static member function.
(cygthread::runner): Don't set hthreads.
(cygthread::freerange): New member function.
(cygthread::operator new): Call freerange if all cygwin slots are used up.
(cygthread::exit_thread): Don't mess with event if freerange thread.
(cygthread::detach): Ditto.
* cygthread.h (class cygthread): Declare new member functions and variables.
Jeff Johnston [Thu, 29 Aug 2002 00:22:10 +0000 (00:22 +0000)]
2002-08-28 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am (install-data-local): Move install of build
newlib.h after installing headers in libc/include so as to
overwrite default newlib.h.
* Makefile.in: Regenerated.
Corinna Vinschen [Wed, 28 Aug 2002 10:18:20 +0000 (10:18 +0000)]
* fhandler_socket.cc (fhandler_socket::recvfrom): Eliminate flags
not understood by WinSock.
(fhandler_socket::sendto): Ditto. If WinSock sendto() returns
WSAESHUTDOWN, change errno to EPIPE and raise SIGPIPE if MSG_NOSIGNAL
isn't set in flags.
* include/cygwin/socket.h: Define MSG_WINMASK and MSG_NOSIGNAL.
* include/cygwin/version.h: Bump API minor number.
Jeff Johnston [Tue, 27 Aug 2002 20:30:15 +0000 (20:30 +0000)]
2002-08-27 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: Remove _ELIX_LEVEL flag setting.
* Makefile.am(stmp-targ-include): Copy newlib.h to targ-include.
(install-data-local): Install newlib.h.
* Makefile.in: Regenerated.
* aclocal.m4: Ditto.
* configure: Ditto.
* configure.in: Add AM_CONFIG_HEADER to generate newlib.h based on
newlib.hin. Add AC_DEFINE_UNQUOTED entries for _ELIX_LEVEL
and _NEWLIB_VERSION to fill in newlib.h header file entries.
In AC_OUTPUT statement, unset ac_file so multilib support does
not use last ac_file temporary used in newlib.h configuration.
* libc/include/_ansi.h: Include <newlib.h>.
* newlib.hin: New template file for newlib.h.
* stamp-h.in: New file.
Jeff Johnston [Tue, 27 Aug 2002 20:27:35 +0000 (20:27 +0000)]
2002-08-27 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am(stmp-targ-include): Copy newlib.h to targ-include.
(install-data-local): Install newlib.h.
* Makefile.in: Regenerated.
* aclocal.m4: Ditto.
* configure: Ditto.
* configure.in: Add AM_CONFIG_HEADER to generate newlib.h based on
newlib.hin. Add AC_DEFINE_UNQUOTED entries for _ELIX_LEVEL
and _NEWLIB_VERSION to fill in newlib.h header file entries.
In AC_OUTPUT statement, unset ac_file so multilib support does
not use last ac_file temporary used in newlib.h configuration.
* libc/include/_ansi.h: Include <newlib.h>.
* newlib.hin: New template file for newlib.h.
* stamp-h.in: New file.
* child_info.h: Add _PROC_WHOOPS enum value.
(CURR_CHILD_INFO_MAGIC): Update.
(child_info::magic): Make 'long'.
* cygheap.h: Export _cygheap_start.
* cygheap.cc: Don't declare _cygheap_start.
* cygmagic: Use cksum to produce checksums. Append 'U' to end of checksum.
* dcrt0.cc (initial_env): Calculate sleep ms before reusing buffer.
(_dll_crt0): Detect cygheap mismatch as indicative of different cygwin version.
Set child_proc_info to NULL when _PROC_WHOOPS.
(multiple_cygwin_problem): If child_info specific problem, then set
child_proc_info type to _PROC_WHOOPS.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(CURR_SHARED_MAGIC): Ditto.
* include/winsock2.h (SOCKET_ADDRESS): Define if
__CSADDR_T_DEFINED is not defined (copied from nspapi.h)
(CSADDR_INFO): Ditto.
(nspapi.h) : Don't include. Removed FIXME comment.
* include/nspapi.h (SOCKET_ADDRESS) Only define if
__CSADDR_T_DEFINED is not defined.
(CSADDR_INFO): Ditto.
(BLOB): Added structure and typedef if not already defined.
(NS_*): Add defines.
(SERVICE_*): Ditto.
(SERVICE_ADDRESS): Add structure and typedefs.
(SERVICE_ADDRESSES): Ditto.
(SERVICE_INFO[AW]): Ditto, and add UNICODE mappings.
(LPSERVICE_ASYNC_INFO): Add typedef.
(SetService[AW], GetAddressByName[AW]): Add prototypes and UNICODE
mappings.
* include/wsipx.h: New file.
* include/svcguid.h: New file.
* lib/test.c: Include wspix.h and svcguid.h.
Corinna Vinschen [Mon, 26 Aug 2002 09:56:06 +0000 (09:56 +0000)]
* sec_acl.cc (getacl): Check ace_sid == well_known_world_sid
before owner_sid and group_sid so that well_known_world_sid
means "other" even when owner_sid and/or group_sid are Everyone.
* security.cc (get_attribute_from_acl): Created from code common
to get_nt_attribute() and get_nt_object_attribute(), with same
reordering as in getacl() above.
(get_nt_attribute): Call get_attribute_from_acl().
(get_nt_object_attribute): Ditto.
* libc/include/malloc.h: On cygwin, define malloc _r functions as wrapper
macros to standard malloc functions.
* libc/include/stdlib.h: Ditto.
* configure.host: Always define MALLOC_PROVIDED on cygwin.
* Makefile.in (cygcheck.exe): Make a -mno-cygwin program.
* cygrun.c (main): Export CYGWIN=ntsec unless otherwise set.
* shared.cc (shared_name): Only add build date to shared name when
*testing*.
* Makefile.in (RUNTEST): Use Makefile's srcdir and bupdir* macros, where
appropriate.
* winsup.api/winsup.exp: Use -nodefaultlibs when linking executable to avoid
potentially linking installed dll.
* Makefile.in (DLL_IMPORTS): Move libuuid.a and libshell32.a to list rather
than referring to them via -l. Add DLL imports last in link line for
new-cygwin.dll and cygrun.exe.
Jeff Johnston [Tue, 20 Aug 2002 01:40:39 +0000 (01:40 +0000)]
2002-08-19 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/types.h: Support __need_inttypes macro
that only sets the __intxx and __uintxx types.
* libc/machine/powerpc/Makefile.am: Add stdlib to include directories
to get mprec.h.
* libc/machine/powerpc/Makefile.in: Regenerated.
* libc/machine/powerpc/vfprintf.c: Fix state variable type.
* libc/machine/powerpc/vfscanf.c: Fix state variable type. Remove
redundant fixed-point conversion prototypes.
* libc/machine/powerpc/machine/stdlib.h[__SPE__]: Include <sys/types.h>
after setting __need_inttypes.
Elena Zannoni [Mon, 19 Aug 2002 20:55:48 +0000 (20:55 +0000)]
2002-08-19 Elena Zannoni <ezannoni@redhat.com>
From matthew green <mrg@redhat.com>
* ppc.h (PPC_OPCODE_SPE): New opcode flag for Powerpc e500
instructions.
(PPC_OPCODE_ISEL, PPC_OPCODE_BRLOCK, PPC_OPCODE_PMR,
PPC_OPCODE_CACHELCK, PPC_OPCODE_RFMCI): New opcode flags for the
e500x2 Integer select, branch locking, performance monitor,
cache locking and machine check APUs, respectively.
(PPC_OPCODE_EFS): New opcode type for efs* instructions.
(PPC_OPCODE_CLASSIC): New opcode type for Classic PowerPC instructions.
* pinfo.h (pinfo::remember): Arrange for destructor call if proc_subproc
returns error.
* sigproc.cc (zombies): Store 1 + total zombies since proc_subproc uses
NZOMBIES element.
* fhandler.h (fhandler_console::send_winch_maybe): New method.
* fhandler_console.cc (set_console_state_for_spawn): Remove if 0'ed code.
(fhandler_console::send_winch_maybe): Define new method.
(fhandler_console::read): Use send_winch_maybe where appropriate.
(fhandler_console::init): Just call all tcsetattr rather than output_tcsetattr.
* select.cc (peek_console): Reorganize so that send_winch_maybe is called for
everything but keyboard input.
* perthread.h (vfork_save): Add ctty, sid, pgid, exitval fields.
(vfork_save::restore_pid): New method.
(vfork_save::restore_exit): New method.
* fork.cc (vfork): Save ctty, sid, pgid and restore them when returning to
"parent". Use exitval field if exiting but never created a new process.
* syscalls.cc (setsid): Detect when in "vfork" and force an actual fork so that
pid will be allocated (UGLY!).
(getsid): New function.
* dcrt0.cc (do_exit): Use vfork_save::restore_exit method for returning from a
vfork.
* spawn.cc (spawnve): Use vfork_save::{restore_pid,restore_exit} methods for
returning from vfork.
* cygwin.din: Export getsid.
* include/cygwin/version.h: Bump api minor number.
* malloc.cc: #ifdef sYSTRIm for when MORECORE_CANNOT_TRIM is true.
* sigproc.cc (sigCONT): Define.
* sigproc.h (sigCONT): Declare.
(wait_sig): Create sigCONT event here.
* exceptions.cc (sig_handle_tty_stop): Wait for sigCONT event rather than
stopping thread.
(sig_handle): Set sigCONT event as appropriate on SIGCONT rather than calling
ResumeThread.
Jeff Johnston [Sat, 17 Aug 2002 05:19:18 +0000 (05:19 +0000)]
2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am: Move cmath stuff into libc/sys/linux.
* Makefile.in: Regenerated.
* configure.host: Default -DMB_CAPABLE for x86-linux.
* libc/include/reent.h: Define _sbrk to take signed int argument.
* libc/include/sys/unistd.h: Ditto for _sbrk_r and sbrk.
* libc/locale/locale.c[MB_CAPABLE]: Add LC_MESSAGES support and
make locale name checking more efficient. Also allow "C-ISO-8859-1"
locale for LC_CTYPE and LC_MESSAGES.
* libc/reent/sbrkr.c: Change prototype to take ptrdiff_t.
* libc/sys/linux/brk.c: Change sbrk prototype.
* libc/sys/linux/include/time.h: Remove Cygwin stuff and
include <sys/features.h>.
(CLOCK_THREAD_CPUTIME): Renamed to CLOCK_THREAD_CPUTIME_ID.
(CLOCK_PROCESS_CPUTIME): Renamed to CLOCK_PROCESS_CPUTIME_ID.
* libc/sys/linux/sys/cdefs.h: Replace with glibc sys/cdefs.h
with a few local additions.
* libc/sys/linux/sys/features.h: New file.
* libc/sys/linux/sys/unistd.h: Change _sbrk_r and sbrk prototypes
to take signed argument.
* libc/syscalls/syssbrk.c: Change sbrk, _sbrk_r, and _sbrk
prototypes to take signed size argument.
* Makefile.in: Add support for new malloc.o and renamed malloc_wrapper.o. Use
-fomit-frame-pointer for malloc.o compilation.
* malloc_wrapper.cc: New file. Rename from malloc.cc. Add support for more
malloc functions. Eliminate export_* calls. Just use straight malloc names.
Remove unused argument from malloc lock functions.
* cygwin.din: Just export straight malloc names. Add malloc_stats,
malloc_trim, malloc_usable_size, mallopt, memalign, valloc.
* dcrt0.cc (__cygwin_user): Eliminate export_* malloc entries.
* fork.cc (fork_parent): Remove unused argument from malloc_lock argument.
* malloc.cc: New file. Doug Lea's malloc v2.7.1.
* cygmalloc.h: New file.
* include/cygwin/version.h: Bump API_MINOR.
* sync.h (muto::acquire): Use appropriate number for regparm attribute.
(muto::reset): Ditto.
(muto::release): Ditto.
Stephane Carrez [Tue, 13 Aug 2002 13:02:25 +0000 (13:02 +0000)]
* m68hc11.h (E_M68HC12_BANKS, E_M68HC11_I32, E_M68HC11_F64,
EF_M68HC11_ABI): Define for ABI specification.
(STO_M68HC12_FAR, STO_M68HC12_INTERRUPT): Symbol flags for
linker and debugger.
(R_M68HC11_24, R_M68HC11_LO16, R_M68HC11_PAGE): New relocs.
(R_M68HC11_RL_JUMP, R_M68HC11_RL_GROUP): New reloc for linker
relaxation.
Jeff Johnston [Tue, 13 Aug 2002 00:11:51 +0000 (00:11 +0000)]
2002-08-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/machine/i386/crt0.c (__bss_start,_end):
Declare as extern chars and use the address operator to
properly use values set in linker script.
* assert.cc (__assert): Call debugger on assertion failure if debugging.
* dcrt0.cc (dll_crt0_1): Just wait for signal thread to go live rather than
going through the overhead of invoking it.
* fork.cc (fork_child): Ditto.
* exceptions.cc (signal_fixup_after_fork): Call sigproc_init here.
* sigproc.cc (proc_can_be_signalled): Assume that the signal thread is live.
(sig_dispatch): Ditto.
(sig_send): Ditto.
(wait_for_sigthread): Renamed from "wait_for_me". Assume that wait_sig_inited
has been set and that this function is only called from the main thread.
* winsup.h (wait_for_sigthread): Declare new function.