Change existing guards to use the above macro names as appropriate.
* include/basetyps.h (__int32, __int16, __int8, small, hyper): Define.
Note: Also added to mingw/include/_mingw.h.
Corinna Vinschen [Mon, 30 Jun 2003 13:07:36 +0000 (13:07 +0000)]
* cygheap.h (enum impersonation): New enum.
(cygheap_user::token): Delete.
(cygheap_user::impersonated): Delete.
(cygheap_user::external_token): New member.
(cygheap_user::internal_token): New member.
(cygheap_user::impersonation_state): New member.
(cygheap_user::issetuid): Modify.
(cygheap_user::token): New method.
(cygheap_user::deimpersonate): New method.
(cygheap_user::reimpersonate): New method.
(cygheap_user::has_impersonation_tokens): New method.
(cygheap_user::close_impersonation_tokens): New method.
* dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
* fhandler_socket.cc (fhandler_socket::dup): Ditto.
* fork.cc (fork_child): Ditto.
(fork_parent): Ditto.
* grp.cc (internal_getgroups): Ditto.
* security.cc (verify_token): Ditto.
(check_file_access): Ditto.
(cygwin_set_impersonation_token): Detect conflicts. Set
user.external_token.
* spawn.cc (spawn_guts): Use new cygheap_user methods.
* syscalls.cc (seteuid32): Rearrange to use the two tokens
in cygheap_user.
(setegid32): Use new cygheap_user methods.
* uinfo.cc: (internal_getlogin): Ditto.
Thomas Pfaff [Tue, 24 Jun 2003 20:14:01 +0000 (20:14 +0000)]
* thread.cc (MTinterface::fixup_after_fork): Fix thread list after fork.
(pthread::threads): Instantiate.
(pthread::pthread): Initialize running and suspendend.
Initialize next with NULL.
Add thread to thread list if it is not the null_pthread.
(pthread::~pthread): Remove thread from thread list if it is not the null_pthread.
(pthread::postcreate): Set running flag.
(pthread::exit): Reset running flag.
(pthread::cancel): Try to cancel thread only if still running.
(pthread::_fixup_after_fork): Implement.
(pthread::detach): Check if thread is still running before detach.
* thread.h (pthread::running): New member.
(pthread::next): Ditto.
(pthread::fixup_after_fork): New static method.
(pthread::threads): New static method.
(pthread::_fixup_after_fork): New method.
* gas/i386/prescott.d: New file.
* gas/i386/prescott.s: Likewise.
include/opcode/
2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
* i386.h (i386_optab): Support Intel Precott New Instructions.
opcodes/
2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (PNI_Fixup): New. Fix up "mwait" and "monitor" in
Intel Precott New Instructions.
(PREGRP27): New. Added for "addsubpd" and "addsubps".
(PREGRP28): New. Added for "haddpd" and "haddps".
(PREGRP29): New. Added for "hsubpd" and "hsubps".
(PREGRP30): New. Added for "movsldup" and "movddup".
(PREGRP31): New. Added for "movshdup" and "movhpd".
(PREGRP32): New. Added for "lddqu".
(dis386_twobyte): Use PREGRP30 to replace the "movlpX" entry.
Use PREGRP31 to replace the "movhpX" entry. Use PREGRP28 for
entry 0x7c. Use PREGRP29 for entry 0x7d. Use PREGRP27 for
entry 0xd0. Use PREGRP32 for entry 0xf0.
(twobyte_has_modrm): Updated.
(twobyte_uses_SSE_prefix): Likewise.
(grps): Use PNI_Fixup in the "sidtQ" entry.
(prefix_user_table): Add PREGRP27, PREGRP28, PREGRP29, PREGRP30,
PREGRP31 and PREGRP32.
(float_mem): Use "fisttp{l||l|}" in entry 1 in opcode 0xdb.
Use "fisttpll" in entry 1 in opcode 0xdd.
Use "fisttp" in entry 1 in opcode 0xdf.
Jeff Johnston [Fri, 20 Jun 2003 23:57:48 +0000 (23:57 +0000)]
2003-06-20 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/reent.h (_REENT_INIT_PTR): Fix macros
to handle latest on_exit change.
* libc/sys/linux/Makefile.am: Remove special compilation
for malloc.c and mcheck.c.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/mntent.c: Add definition of _LIBC flag
after including <features.h>.
* libc/sys/linux/mcheck.c: Ditto.
* libc/sys/linux/malloc.c: Ditto plus define _GNU_SOURCE
for <features.h>.
* libc/sys/linux/intl/Makefile.am: Remove -D_LIBC and
add -DNOT_IN_libc to C flags.
* libc/sys/linux/intl/Makefile.in: Regenerated.
* libc/sys/linux/intl/config.h: Add definition of _LIBC.
* libc/sys/linux/linuxthreads/semaphore.h: Include
<bits/pthreadtypes.h>.
* libc/sys/linux/sys/dirent.h: Define _LIBC and NOT_IN_libc after
including <features.h>.
* libc/sys/linux/sys/lock.h: Ditto.
Earnie Boyd [Wed, 18 Jun 2003 13:54:47 +0000 (13:54 +0000)]
* include/dirent.h (dirent): Make d_name and array instead of a pointer.
* mingwex/dirent.c: Modifications througout to fill d_name array.
* Makefile.in (LIBS): Add new MSVCRT libraries libmsvcr70 and
libmsvcr71, including debug versions.
(msvcr70.def, msvcr70d.def, msvcr71.def, msvcr71.def): New targets.
Throughout, remove "include <errno.h>" from files which already include
cygerrno.h.
* include/cygwin/config.h (__DYNAMIC_REENT__): Define.
* include/cygwin/version.h: Bump API minor version.
* cygwin.din: Export __getreent
* cygerrno.h: Include errno.h. Fix places where _impure_ptr is used directly
to store the errno value.
* debug.cc (__set_errno): Ditto.
* errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
* signal.cc: Rename _reent_clib to _REENT throughout.
* thread.h (reent_clib): Remove prototype.
* thread.cc (reent_clib): Rename reent_clib to __getreent. Return _impure_ptr
until MTinterface is initialized.
(reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL instead.
* MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to keep
signal handling running when fork is called from a thread other than the
mainthread.
Thomas Pfaff [Thu, 12 Jun 2003 18:15:34 +0000 (18:15 +0000)]
* thread.cc (pthread_attr_init): Revert change from 2003-06-11
to return 0 if attribute is already initialized back to EBUSY.
(pthread_condattr_init): Ditto.
(pthread_rwlockattr_init): Ditto.
(pthread_mutexattr_init): Ditto.
Thomas Pfaff [Wed, 11 Jun 2003 19:08:42 +0000 (19:08 +0000)]
* thread.cc (pthread_attr_init): Return 0 if attribute is already initialized.
Fix return code if out of memory.
(pthread_condattr_init): Ditto.
(pthread_rwlockattr_init): Ditto.
(pthread_mutexattr_init): Return 0 if attribute is already initialized.
* libc/sys/h8300hms/setarch.h: New file.
* libc/sys/h8300hms/close.S, libc/sys/h8300hms/fstat.S,
libc/sys/h8300hms/lseek.S, libc/sys/h8300hms/open.S,
libc/sys/h8300hms/read.S, libc/sys/h8300hms/stat.S,
libc/sys/h8300hms/write.S, libc/sys/h8300hms/crt0.S: Use it.
include/opcode/
* h8300.h (IMM4_NS, IMM8_NS): New.
(h8_opcodes): Replace IMM4 with IMM4_NS in mov.b and mov.w entries.
Likewise IMM8 for mov.w and mov.l. Likewise IMM16U for mov.l.
gas/testsuite
* gas/h8300/h8sx_mov_imm.[sd]: New test.
* gas/h8300/h8300.exp: Run it.
* spawn.cc (spawn_guts): Call CreateProcess while impersonated,
when the real {u,g}ids and the groups are original.
Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
* uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
while impersonated, preserve the uids and gids and call
ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.
* exceptions.cc (error_start_init): Quote the pgm in the command.
Thomas Pfaff [Sat, 7 Jun 2003 11:05:35 +0000 (11:05 +0000)]
* fhandler_socket.cc (fhandler_socket::connect): Change error
handling for nonblocking connects to return EALREADY when
connect is called more than once for the same socket.
Nick Clifton [Fri, 6 Jun 2003 15:36:31 +0000 (15:36 +0000)]
New structure containing fields used by the on_exit() function.
(struct _atexit): Include struct _on_exit_args. For _REENT_SMALL do his via a
pointer that is initialised when needed.
* cygwin.din: Add vsyslog.
* fhandler.cc (fhandler_base::write): Only make file sparse if the
seeked area is >= 128K.
* syslog.cc (vsyslog): New function, overtaking functionality from
syslog.
(syslog): Just call vsyslog.
* include/cygwin/version.h: Bump API minor.
* include/sys/syslog.h: Add vsyslog declaration.
Michael Snyder [Thu, 5 Jun 2003 18:47:12 +0000 (18:47 +0000)]
2003-06-03 Michael Snyder <msnyder@redhat.com>
* h8sx.h (enum h8_model): Add AV_H8S to distinguish from H8H.
(ldc): Split ccr ops from exr ops (which are only available
on H8S or H8SX).
(stc): Ditto.
(andc, orc, xorc): Ditto.
(ldmac, stmac, clrmac, mac): Change access to AV_H8S.
Pierre Humblet [Wed, 4 Jun 2003 01:57:44 +0000 (01:57 +0000)]
2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
as non-executable if the file cannot be opened for read. Retry query
open only if errno is EACCES. Never change the mode, even if it is 000
when query open() fails.