Jeff Johnston [Mon, 24 Jun 2002 20:03:38 +0000 (20:03 +0000)]
2002-06-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Remove <sys/types.h>.
(__dmath): Use __ULong instead of _uint32_t.
* libc/include/sys/reent.h: If long or int is not 32-bits,
include <sys/types.h> to get definitions for _int32_t and _uint32_t.
* libc/stdlib/mprec.h: Include <sys/types.h> to get integer defs.
* libm/common/fdlibm.h: Ditto.
Ben Elliston [Mon, 24 Jun 2002 17:41:28 +0000 (17:41 +0000)]
2002-06-24 Ben Elliston <bje@redhat.com>
* configure.in (host_tools): Remove cgen.
* Makefile.in (all-cgen): Remove; runs from its source directory.
(check-cgen, install-cgen, clean-cgen): Likewise.
(all-opcodes): No not depend on all-cgen.
(all-sim): Likewise.
Corinna Vinschen [Mon, 24 Jun 2002 15:40:57 +0000 (15:40 +0000)]
* uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
of user.real_uid and user.real_gid.
(uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
for gid.
* security.cc (get_group_sidlist): Add pw argument and use pw->pw_name in call
to get_supplementary_group_sidlist.
(create_token): Add pw argument and use it in call to get_group_sidlist.
* security.h: Add pw argument in declaration of create_token.
* syscalls.cc (seteuid32): Add pw argument in call to create_token.
Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
* sys/ipc.h: Remove.
* sys/shm.h: Remove.
* cygwin_ipc.h: New file.
* cygwin_shm.h: New file.
* cygwin.sc: Add recent changes from ld sources.
* winsup.h: Move #ifdef EXPCGF code into "winbase.h".
* winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
Robert Collins [Sun, 23 Jun 2002 07:36:21 +0000 (07:36 +0000)]
2002-06-12 Thomas Pfaff <tpfaff@gmx.net>
* thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to
cleanup_stack.
* thread.cc (pthread::pthread): Ditto.
(pthread::create): Fixed mutex verification.
(pthread::push_cleanup_handler): Renamed cleanup_handlers to
cleanup_stack.
Mutex calls removed, used InterlockedExchangePointer instead.
(pthread::pop_cleanup_handler): Renamed cleanup_handlers to
cleanup_stack.
(pthread::pop_all_cleanup_handlers): Ditto.
(__pthread_once): Check state first and return if already done.
(__pthread_join): DEADLOCK test reverted to __pthread_equal
call.
(__pthread_detach): Unlock mutex before deletion.
Jeff Johnston [Fri, 21 Jun 2002 18:29:23 +0000 (18:29 +0000)]
2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdio.h (__getline, __getdelim): New prototypes.
* libc/include/time.h [HAVE_GETDATE](getdate, getdate_r): Ditto.
[HAVE_GETDATE](getdate_err): New error code.
* libc/stdio/Makefile.am: Add support for getline.c and getdelim.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/getdelim.c: New file.
* libc/stdio/getline.c: Ditto.
* libc/sys/linux/Makefile.am: Add support for getdate.c, getdate_err.c
and ntp_gettime.c. Also add AM_CFLAGS to point to libc/stdio.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/getdate.c: New file.
* libc/sys/linux/getdate_err.c: Ditto.
* libc/sys/linux/ntp_gettime.c: Ditto.
* libc/sys/linux/time.c (adjtimex, ntp_adjtime): New functions.
* libc/sys/linux/sys/stdio.h (getline, getdelim): New macros.
Jeff Johnston [Fri, 21 Jun 2002 18:15:56 +0000 (18:15 +0000)]
2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Add <sys/types.h> to get _uint32_t definition.
* libc/include/machine/types.h: Skip __off_t, __pid_t, and
__loff_t definitions if special _HAVE_SYSTYPES macro defined.
* libc/include/sys/config.h: Removed _uint*, _int* definitions.
* libc/include/sys/param.h: Remove i386 case which is handled
by default case.
(BIG_ENDIAN, LITTLE_ENDIAN): Protect
definitions in case they are already defined.
(BYTE_ORDER): Add default case using _IEEE_BIG_ENDIAN and
_IEEE_LITTLE_ENDIAN flags.
* libc/include/sys/reent.h: Change __uint32_t references to
use _ULong instead.
(_REENT_GETDATE_REENT_P): New macro.
* libc/include/sys/types.h (__int16_t, __uint16_t): Added.
(__int32_t, __uint32_t, __int64_t, __uint64_t): Ditto.
* libc/search/hash.h: Add default setting of BYTE_ORDER,
LITTLE_ENDIAN, and BIG_ENDIAN, if not already defined.
* libc/sys/linux/sys/types.h: Include <sys/_types.h>. Define
ssize_t based on _ssize_t. Remove __socklen_t, __uintptr_t,
pid_t, off_t, loff_t, caddr_t, and daddr_t type
definitions which are done by subsequent glibc headers.
Add macro definitions to prevent subsequent header files from
defining pid_t, off_t, ssize_t, and key_t. Move uintptr_t and
intptr_t to after glibc definitions of types they are based on.
Corinna Vinschen [Fri, 21 Jun 2002 12:37:51 +0000 (12:37 +0000)]
* security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
Check uid for current user first and use SIDs from cygheap if so.
Set errno to EINVAL if user SID isn't retrievable. Just print user SID
as debug output.
Don't bail out if group SID isn't retrievable. Change debug output
appropriately.
* uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
(cygheap_user::env_logsrv): Verify env_domain is valid.
* environ.cc: Include child_info.h and keep spenvs[] sorted.
(environ_init): Check child_proc_info instead of myself->ppid_handle.
* Makefile.am (LIB_OBJECTLISTS): Add
libc/search/objectlist.awk.in.
* libc/Makefile.am (SUBDIRS): Add search.
(SUBLIBS): Add search/libsearch.la.
* libc/configure.in (AC_OUTPUT): Add search/Makefile.
* libc/search: New directory.
* libc/search/Makefile.am: New file.
* libc/search/extern.h: New file.
* libc/search/hash.c: New file.
* libc/search/hash.h: New file.
* libc/search/hash_bigkey.c: New file.
* libc/search/hash_buf.c: New file.
* libc/search/hash_func.c: New file.
* libc/search/hash_log2.c: New file.
* libc/search/hash_page.c: New file.
* libc/search/hcreate.3: New file.
* libc/search/hcreate.c: New file.
* libc/search/hcreate.c~: New file.
* libc/search/hcreate_r.c: New file.
* libc/search/ndbm.c: New file.
* libc/search/page.h: New file.
* libc/search/tdelete.c: New file.
* libc/search/tdestroy.c: New file.
* libc/search/tfind.c: New file.
* libc/search/tsearch.3: New file.
* libc/search/tsearch.c: New file.
* libc/search/twalk.c: New file.
* libc/include/db.h: New file.
* libc/include/ndbm.h: New file.
* libc/include/search.h: New file.
* libc/include/sys/queue.h: New file.
* libc/include/sys/cdefs.h: New file.
* libc/include/sys/param.h
[__IEEE_LITTLE_ENDIAN,__IEEE_BIG_ENDIAN]: Set BYTE_ORDER to
LITTLE_ENDIAN or BIG_ENDIAN.
* libc/include/sys/errno.h (EFTYPE): New macro.
* libc/search/bsearch.c: Move from libc/stdlib.
* libc/search/qsort.c: Likewise.
* libc/stdlib/Makefile.am (LIB_SOURCES): Remove bsearch.c and
qsort.c.
(CHEWOUT_FILES): Remove bsearch.def and qsort.def.
* libc/stdlib/stdlib.tex: Remove references to bsearch and qsort.
Use hMainProc where appropriate, throughout.
* environ.cc (spenv::retrieve): Add debugging statements.
* pinfo.cc (set_myself): Don't call strace.hello if already stracing.
* strace.cc (strace): Move NO_COPY keyword so that it will actually take
effect.
* testsuite/lib/passfail.exp (newlib_pass_fail_all): New
procedure.
(newlib_pass_fail): Change to compile and run only one file.
* testsuite/newlib.locale/locale.exp: Use new
newlib_pass_fail_all procedure.
* testsuite/newlib.string/string.exp: Likewise.
Dave Brolley [Tue, 18 Jun 2002 21:19:17 +0000 (21:19 +0000)]
2002-06-18 Dave Brolley <brolley@redhat.com>
From Catherine Moore, Michael Meissner, Richard Sandiford:
* configure.in: Support frv*-*-*.
* frv/Makefile.in: New file.
* frv/configure: New file.
* frv/configure.in: New file.
* frv/crt0.S: New file.
* frv/fstat.c: New file.
* frv/getpid.c: New file.
* frv/isatty.c: New file.
* frv/kill.c: New file.
* frv/print.c: New file.
* frv/putnum.c: New file.
* frv/sbrk.c: New file.
* frv/sim-close.S: New file.
* frv/sim-exit.S: New file.
* frv/sim-inbyte.c: New file.
* frv/sim-lseek.S: New file.
* frv/sim-open.S: New file.
* frv/sim-read.S: New file.
* frv/sim-time.c: New file.
* frv/sim-unlink.S: New file.
* frv/sim-write.S: New file.
* frv/stat.c: New file.
Danny Smith [Tue, 18 Jun 2002 20:48:57 +0000 (20:48 +0000)]
* include/tchar.h (_getts): Define as _getws for _UNICODE.
(_putts): Define as _putws for _UNICODE.
Thanks to: Tomasz Pona <cochisek@poczta.onet.pl> for report.
Jeff Johnston [Tue, 18 Jun 2002 16:07:14 +0000 (16:07 +0000)]
2002-06-18 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/newlib.stdlib/atexit.c: New file.
* testsuite/newlib.stdlib/atexit.exp: Ditto.
* testsuite/newlib.string/tstring.c: Change default start size
to something more reasonable for embedded platforms.
* cygheap.h (cygheap_user::issetuid): New method.
* dtable.cc (dtable::vfork_child_dup): Use new method to determine if we are in
"setuid mode."
* fork.cc (fork_parent): Ditto.
* spawn.cc (spawn_guts): Ditto.
* syscalls.cc (seteuid32): Ditto.
(setegid32): Ditto.
* environ.cc (spenv::retrieve): (Suggested by Pierre Humblet) Do potential
recalculation of cygheap_user stuff when in setuid mode. Return special value
when environment variable exists but should not be added.
(build_env): Don't add retrieved value to dstp if it is 'dont_add'.
Changes suggested by Pierre Humblet.
* environ.cc (NL): New macro.
(conv_envvars): Use NL macro to fill in name and namelen.
(spenv::namelen): New field.
(spenvs): Use NL to fill in name and namelen.
(spenv::retrieve): Eliminate length argument. Instead, use namelen throughout.
(build_env): Don't calculate length of initial FOO= part of environment.
Accommodate spenv::retrive argument change.
* cygheap.h (cygheap_user::winname): New field.
* cygheap.cc (cygheap_user::set_name): Clear winname when name changes.
* uinfo.cc (cygheap_user::env_logsrv): Avoid calculating server when Windows
user == SYSTEM.
(cygheap_user::env_domain): Set winname here too.
(cygheap_user::env_userprofile): Eliminate superfluous tests.
(cygheap_user::env_name): Seed winname by calling env_domain().
* child_info.h (child_proc_info): Declare as base class.
(spawn_info): Declare as alias of child_proc_info to aid debugging.
(fork_info): Ditto.
* cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global rather than
parameter.
* cygheap.h (cygheap_fixup_in_child): Reflect above change in declaration.
* dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign child_proc_info.
(dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes.
* environ.cc (spenv::retrieve): Make regparm.
* environ.h (environ_init): Ditto.
(win_env::add_cache): Ditto.
(build_env): Ditto.
(getwinenv): Ditto.
* fork.cc (sync_with_parent): Use fork_info global.
(fork_child): Ditto.
* cygheap.h (cygheap_user::userprofile_env_buf): New static member.
* environ.cc (build_env): Add debugging statement.
(spenvs): Switch functions for USERDOMAIN and USERNAME.
* spawn.cc (spawn_guts): Move environment initialization prior to
cygheap_setup_for_child or environment info will never be copied to child.
* libc/argz: New directory.
* libc/argz/*: New files.
* libc/argz/argz_add.c: New file.
* libc/argz/argz_add_sep.c: New file.
* libc/argz/argz_append.c: New file.
* libc/argz/argz_count.c: New file.
* libc/argz/argz_create.c: New file.
* libc/argz/argz_create_sep.c: New file.
* libc/argz/argz_delete.c: New file.
* libc/argz/argz_extract.c: New file.
* libc/argz/argz_insert.c: New file.
* libc/argz/argz_next.c: New file.
* libc/argz/argz_replace.c: New file.
* libc/argz/argz_stringify.c: New file.
* libc/argz/buf_findstr.c: New file.
* libc/argz/envz_add.c: New file.
* libc/argz/envz_entry.c: New file.
* libc/argz/envz_get.c: New file.
* libc/argz/envz_merge.c: New file.
* libc/argz/envz_remove.c: New file.
* libc/argz/envz_strip.c: New file.
* libc/include/argz.h: New file.
* libc/include/envz.h: New file.
* Makefile.am (LIBC_OBJECTLISTS): Add
libc/argz/objectlist.awk.in.
* libc/Makefile.am (SUBDIRS): Add argz.
(SUBLIBS): Add argz/libargz.la.
* libc/configure.in (AC_OUTPUT): Add argz/Makefile.
* libc/include/errno.h: Add error_t typedef.
* cygheap.h (cygheap_user): Add static members to hold home{drive,path} info.
* uinfo.cc (cygheap_user::ontherange): Use static class members for local HOME*
storage.
* cygheap.cc (cygheap_user::set_logsrv): Remove.
(cygheap_user::set_domain): Ditto.
* cygheap.h (cygheap_user::set_logsrv): Remove declaration.
(cygheap_user::set_domain): Ditto.
(cygheap_user::env_domain): Declare new method.
(cygheap_user::env_name): Ditto.
* environ.cc (spenvs): Add two environment variables.
* spawn.cc (spawn_guts): Call build_env after RevertToSelf. Always set
ciresrv.mount_h.
(cygheap_user::ontherange): Recalculate homedrive/homepath if they are empty.
Use env_logsrv to get logon server.
(cygheap_user::env_logsrv): Calculate server name here rather than relying on
it having been previously calculated.
(cygheap_user::env_domain): Ditto for domain name.
(cygheap-user::env_name): New method.
* syscalls.cc (seteuid32): Do not get or set the environment. Do not call
LookupAccountSid nor internal_getlogin. Set cygheap->user name and sid from
the passwd entry.
* uinfo.cc (uinfo_init): Only call internal_getlogin when starting from a non
Cygwin process and use the values returned in user.
(internal_getlogin): Simplify to case where starting from a non Cygwin process.
Store return values in user and return void. Do not set the Windows default
environment.
* dcrt0.cc (dll_crt0_1): Call uinfo_init only when needed. Do not set
myself->uid nor reset user.sid.
* spawn.cc (spawn_guts): Get the sid from cygheap->user. Always
RevertToSelf(). Don't set uid in impersonated case.
* cygheap.cc (cygheap_user::set_sid): Do not set orig_sig.
(cygheap_user::set_orig_sid): New.
* cygheap.h: Declare cygheap_user::set_sid.
* winsup.h: Add argument to uinfo_init().
Earnie Boyd [Fri, 14 Jun 2002 13:46:12 +0000 (13:46 +0000)]
* include/w32api.h: Change to version 2.0 to reflect the change
in the license.
* README: Renamed.
* README.w32api: Renamed from README. Modified license to remove
the restriction of notifying the author based on the fact that the
author is unreachable at the notified address.
* Makefile.in (VERSION): Change to 2.0.
Corinna Vinschen [Fri, 14 Jun 2002 11:31:33 +0000 (11:31 +0000)]
* passwd.c: Rearrange includes to avoid unnecessary warnings.
(GetPW): Add parameter to (dis)allow printing of Windows username.
Use defines instead of numerical constants where possible.
Try avoiding impersonation problem. Rearrange to print Windows
username only if it's different from Cygwin username.
(ChangePW): Use defines instead of numerical constants where possible.
(main): Call GetPW with additional parameter. Change error text.
* passwd.c (GetPW): Handle case of user-edited /etc/passwd
with cygwin_internal (CW_EXTRACT_DOMAIN_AND_USER, ...).
Jeff Johnston [Thu, 13 Jun 2002 23:03:01 +0000 (23:03 +0000)]
2002-06-13 Stephen L. Moshier <steve@moshier.net>
* libm/math/e_pow.c (__ieee754_pow): Fix case whereby
x is close to -1.0 and y is very large to use ax (absolute value)
instead of x.
* libm/math/ef_pow.c (__ieee754_powf): Ditto.