Jeff Johnston [Thu, 27 Jun 2002 22:48:05 +0000 (22:48 +0000)]
2002-06-27 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/_types.h: Define _ssize_t as int if int is
32-bits, otherwise define it as long.
* libc/include/sys/types.h: Include <_ansi.h> and <sys/_types.h>
and define ssize_t as _ssize_t.
* libc/reent/readr.c: Change return type to _ssize_t.
* libc/reent/writer.c: Ditto.
* libc/sys/linux/Makefile.am: Add aio.c.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/aio.c: New file.
* libc/sys/linux/sys/cdefs.h: Add __restrict_arr definition.
* libm/common/fdlibm.h: Undef __P before defining it.
* libm/mathfp/s_pow.c (pow): Fix checks on variable k. Add
exponent_is_even_int variable. Handle case where x is
negative, and y is an odd integer.
* libm/mathfp/sf_pow.c (powf): Likewise.
Corinna Vinschen [Thu, 27 Jun 2002 16:01:38 +0000 (16:01 +0000)]
* dcrt0.cc (dll_crt0_1): Let __progname point to the applications
basename. Move eliminating ".exe" suffix from argv[0] so that it
always also affects __progname.
* cygheap.cc (cygheap_user::set_name): Avoid clearing things when just setting
name to itself or during first time initialization.
* environ.cc (check_case_init): Make case insensitive.
* winsup.h: Minor cleanup.
* path.h (path_conv::[]): New operator.
* syscalls.cc (_link): Use path_conv operators rather than methods, where
appropriate. Minor white space cleanup.
* include/cygwin/version.h: Bump DLL minor number.
* dcrt0.cc (sm): Make NO_COPY.
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'.