Commit Graph

4534 Commits

Author SHA1 Message Date
Christopher Faylor 6688a0618e * grp.cc (getgrent32): Only refresh group entries when at beginning.
(internal_getgrsid): Only refresh if uninitialized.
(internal_getgrent): Ditto.
* passwd.cc (getpwent): Only refresh passwd entries when at beginning.
(pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
(internal_getpwsid): Only refresh if uninitialized.
(getpass): No need to refresh passwd data here.
* pwdgrp.h (refresh): Eliminate default.
2003-02-01 18:41:29 +00:00
Danny Smith 05d2a9a4fb * include/commctrl.h (TCM_*): Add missing defines. 2003-02-01 11:38:31 +00:00
Danny Smith 93dfea5667 2003-02-01 Jesus Alvarez <jesus_alvarez@users.sourceforge.net>
Danny Smith  <dannysmith@users.sourceforge.net>

	* include/prsht.h (PSP_*, PSH_*): Add missing defines.
	(PROPSHEETPAGE[AW]): Add pszHeaderTitle, pszHeaderSubTitle
	for (_WIN32_IE >= 0x0400).
	(PROPSHEETHEADER[AW]): Add hplWatermark and anonymous union
	fields for (_WIN32_IE >= 0x0400).
2003-02-01 08:53:17 +00:00
Christopher Faylor a5a93a62b2 * dlfcn.cc (dlerror): Only report load errors once per error. 2003-02-01 05:00:15 +00:00
Christopher Faylor b0a82a859d * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting of res.
* termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
* fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking so that
if any Win32 SetComm*() calls fail, errno gets set to EINVAL and tcsetattr()
returns -1.  Catch invalid bitrates, mostly.  If baud rate setting is B0, just
drop DTR and leave Win32 DCB bitrate as-is since 0 is not a valid Win32
setting.
(fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as B0,
otherwise get it from the DCB.
2003-02-01 04:48:03 +00:00
John David Anglin aa0a224816 * hppa.h (ldwa, ldda): Add ordered opcodes. 2003-01-31 21:24:32 +00:00
Jeff Johnston a74181ee01 2003-01-31 Michael Snyder <msnyder@redhat.com>
* libc/sys/h8300hms/_exit.c (_exit, __exit):  Slip a magic cookie
	into registers r1 and r2, so that the simulator can distinguish
	this trap from a breakpoint trap.  Copied from libgloss.
2003-01-31 20:44:26 +00:00
Jeff Johnston b85498d44c 2003-01-31 Michael Snyder <msnyder@redhat.com>
* libc/sys/h8300hms/crt0.S (_start): Change local label
	from .loop to .Loop, so that ld and gdb will ignore it.
2003-01-31 20:35:24 +00:00
Frank Ch. Eigler 7a94fe2a0f 2003-01-31 Frank Ch. Eigler <fche@redhat.com>
* Makefile.tpl (all-sid): Add libiberty/bfd/opcodes dependencies.
	* Makefile.in: Regenerated.
2003-01-31 19:09:32 +00:00
Christopher Faylor 949c3da11a * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from Pierre
Humblet).
* pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already have
lock since that means we are in the process of reading the file.
2003-01-31 17:00:42 +00:00
Christopher Faylor 485d85bfa7 * shared.cc (shared_info::heap_chunk_size): Use correct variable when reading
HKLM.
2003-01-31 15:02:40 +00:00
Danny Smith 28c098e3f4 2003-01-31 Danny Smith <dannysmith@users.sourceforge.net>
* include/winbase.h (CreateFiber): Change first parameter
	to SIZE_T.
	(CreateJobObject[AW], CreateHardLink[AW]): Guard with
	(_WIN32_WINNT >= 0x0500).

2003-01-31  Bang Jun-Young  <junyoung@netbsd.org>

	* include/winbase.h (PWIN32_FIND_DATAA, PWIN32_FIND_DATAW):
	Add missing typedefs.
	(CreateFiberEx, CreateJobObjectA,CreateJobObjectW): Add missing
	prototypes.
	(CreateHardLinkA, CreateHardLinkW): Return BOOL, not HANDLE.
2003-01-31 08:28:44 +00:00
Christopher Faylor 704ce46198 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one error when
inspecting path.
2003-01-30 23:15:15 +00:00
Alexandre Oliva ca8def3d9a * config.if: Copy from GCC. 2003-01-30 11:59:17 +00:00
Christopher Faylor ba6e108396 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT behavior. 2003-01-30 01:14:30 +00:00
Jeff Johnston 4700b8293a 2003-01-29 Jason Tishler <jason@tishler.net>
* libc/include/time.h: Declare nanosleep() under Cygwin.
2003-01-29 23:29:30 +00:00
Corinna Vinschen 01e3c89709 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
set connection state of returned socket to CONNECTED.
2003-01-28 15:33:50 +00:00
Alexandre Oliva 6816724d0d * mips.h (EF_MIPS_XGOT): Define. 2003-01-28 00:01:08 +00:00
Danny Smith 500acc57eb 2003-01-27 Krzysztof Nikiel <kni@poczta.onet.pl>
* include/mmsystem.h (MIXERCONTROL_CONTROLF_MULTIPLE): Correct
	define.
	* lib/largeint.c (LargeIntegerAdd): Add, don't multiply.
2003-01-27 23:11:13 +00:00
Alexandre Oliva 70f15185be * configure.in: Revert 24Jan change.
* configure:  Regenerate.
2003-01-27 19:47:23 +00:00
Christopher Faylor dfb366da5a * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about non-numeric
fields.
2003-01-27 17:00:17 +00:00
Christopher Faylor ca6018a0d3 fix typo 2003-01-27 15:58:15 +00:00
Danny Smith d2f9f641d9 2003-01-27 Danny Smith <dannysmith@users.sourceforge.net>
* include/rpcnterr.h (RPC_X_INVALID_PIPE_OPERATION): Add
	define.
	* include/winbase.h (WAIT_TIMEOUT): Guard against prior
	definition.
	(WAIT_FAILED): Cast to DWORD.
	* include/winerror.h (WAIT_TIMEOUT): Guard against prior
	definition.

2003-01-27  Bang Jun-Young  <junyoung@netbsd.org>

	* include/winerror.h: Protect against multiple
	definition of WSA* error codes.
	* include/winsock.h: Likewise.
	* include/winsock2.h: Likewise.

2003-01-27  Bang Dong-Heui
	    Bang Jun-Young  <junyoung@netbsd.org>

	* include/winerror.h (ERROR_*, SEC_E_*,RPC_S_*, FRS_ERR_*,
	DNS_*, WSA*, WAIT_TIMEOUT): Add missing error codes.
	(RPC_X_INVALID_PIPE_OPERATION): Remove define.
2003-01-27 07:15:17 +00:00
Christopher Faylor 03dba1defa * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no longer a
valid return from next_str.
(pwdgrp::add_line): Duh.  Revert to use strchr.
2003-01-27 00:31:30 +00:00
Christopher Faylor fea48988ea * strings.h (strechr): New function.
* uinfo.cc (pwdgrp::next_str): Search only for input char in string.  Return
EOS on failure.  Don't check for NULL since it shouldn't be possible.
(pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
(pwdgrp::next_num): Pass explicit separator character to next_str.
* grp.cc (pwdgrp::parse_group): Ditto.
* passwd.cc (pwdgrp::parse_passwd): Ditto.  Revamp test for garbage input.
* pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
2003-01-27 00:16:01 +00:00
Daniel Jacobowitz 285d6b97b1 include/
* hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
	(struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
	(htab_create_alloc_ex): New prototype.
	(htab_set_functions_ex): New prototype.
libiberty/
	* hashtab.c (htab_create_alloc_ex): New function.
	(hatab_set_functions_ex): New function.
	(htab_delete, htab_expand): Support alternate allocation functions.
2003-01-26 07:33:29 +00:00
Danny Smith 232cca6b0c * include/math.h (tgamma): Correct typo in comment. 2003-01-26 07:04:04 +00:00
Christopher Faylor 9a75162166 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
CreateFile failure.
2003-01-26 06:42:40 +00:00
Danny Smith 989c97fe14 * mingwex/mingw-fseek.c (INLINE): Remove define.
(__mingw_is_win9x): Remove static inline function.
	(_mingw_fwrite): Use _osver instead of __mingw_is_win9x.
2003-01-26 06:38:43 +00:00
Christopher Faylor 5da947eaca Fix typo. 2003-01-26 06:27:26 +00:00
Christopher Faylor bdbd7fb6b9 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The structure
should always be completely filled out.
* grp.cc (pwdgrp::parse_group): Ditto.
* grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
2003-01-26 06:02:34 +00:00
Christopher Faylor c913339563 * pwdgrp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating gr_mem. 2003-01-26 05:55:29 +00:00
Christopher Faylor 6503705696 * include/sys/strace.h (paranoid_printf): Define as not being part of "all"
output.
* pwdgrp.h (pwdgrp::next_num): Rename from next_int.  Returns true/false if
parse operation succeeded.
(pwdgrp::reparse): Remove.
(pwdgrp::raw_ptr): New function.  Returns pointer in line.
(pwdgrp::next_num): New functions for parsing other than unsigned long.
* grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.  Don't
fill in fields with NULL and assign empty gr_mem to known pointer rather than
doing a pointless calloc.  Streamline gr_mem parsing.  Don't increment
curr_lines here.
* passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.  Don't
increment curr_lines here.
* uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
(pwdgrp::reparse): Remove.
(pwdgrp::next_num): Rename from next_int.  Return bool indicating success of
parse, argument returns value parsed.
(pwdgrp::add_line): Increment curr_lines here on successful parse.
(pwdgrp::load): (from Pierre Humblet) Don't return status.  Just report it
here.
2003-01-26 05:38:38 +00:00
Christopher Faylor c9b99d0d2a clarify 2003-01-25 16:38:56 +00:00
Christopher Faylor a53ddfe6c2 * pwdgrp.cc (pwdgrp::reparse): Declare.
* uinfo.cc (pwdgrp::reparse): Define.
* grp.cc (pwdgrp::parse_group): Use.
2003-01-25 16:34:32 +00:00
Corinna Vinschen 4f7e12dd26 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
update the euid and call cygheap->user.set_name. Remove special
	handling of ILLEGAL_UID.
	(setgid32): Add a debug_printf. On Win95, always set the egid.
	Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
	* child_info.h (class cygheap_exec_info): Remove uid.
	* spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
	* dcrto.cc (dll_crt0_1): Always call uinfo_init.
	* uinfo.cc (uinfo_init): Reorganize and close handle if needed.
	(cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
2003-01-25 10:36:46 +00:00
Christopher Faylor 45dbfc2611 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset scroll region
if size changes.
2003-01-25 01:17:51 +00:00
Danny Smith 81632e9e55 * include/ras.h (RASCONN[AW]): Add dwSessionId for
(WINVER >= 0x501).
2003-01-25 00:47:25 +00:00
Danny Smith bb9f07bc54 * include/ras.h (RASCONN[AW]): Guard szDeviceType,
szDeviceName fields with WINVER >= 0x400. Add dwFlags, luid
	fields for WINVER >= 0x501.
2003-01-25 00:41:45 +00:00
Jakub Jelinek 3b64773bfc bfd/
* elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
	(elf32_sparc_rev32_howto): New variable.
	(sparc_reloc_map): Add TLS relocs.
	(elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
	Handle REV32.
	(sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
	New functions.
	(struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
	struct elf32_sparc_link_hash_table):
	New structures.
	(elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
	elf32_sparc_hash_table): Define.
	(link_hash_newfunc, elf32_sparc_link_hash_table_create,
	create_got_section, elf32_sparc_create_dynamic_sections,
	elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
	functions.
	(elf32_sparc_check_relocs): Handle TLS relocs.  Add dynamic reloc
	reference counting.
	(elf32_sparc_gc_sweep_hook): Likewise.
	(elf32_sparc_adjust_dynamic_symbol): Likewise.
	(elf32_sparc_size_dynamic_sections): Likewise.
	(elf32_sparc_relocate_section): Likewise.
	(allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
	New functions.
	(elf32_sparc_object_p): Allocate backend private object data.
	(bfd_elf32_bfd_link_hash_table_create,
	elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
	elf_backend_can_refcount): Define.
	(elf_backend_create_dynamic_sections): Define to
	elf32_sparc_create_dynamic_sections.
	* reloc.c: Add SPARC TLS relocs.
	* bfd-in2.h, libbfd.h: Rebuilt.
	* elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
	(sparc_reloc_map): Likewise.
gas/
	* config/tc-sparc.c (sparc_ip): Handle TLS % operators.
	(tc_gen_reloc): Handle TLS relocs.
	(sparc_cons, cons_fix_new_sparc): Handle %r_tls_dtpoff.
	* config/tc-sparc.h (tc_fix_adjustable): Don't adjust TLS
	relocs.
	* config/obj-elf.c (obj_elf_section_word): Handle tls.
	(obj_elf_type): Handle tls_object.
include/
	* elf/sparc.h: Add TLS relocs.  Move R_SPARC_REV32 to 252.
ld/testsuite/
	* ld-sparc/sparc.exp: New.
	* ld-sparc/tlsg32.s: New test.
	* ld-sparc/tlsg32.sd: Likewise.
	* ld-sparc/tlsg64.s: Likewise.
	* ld-sparc/tlsg64.sd: Likewise.
	* ld-sparc/tlslib.s: Likewise.
	* ld-sparc/tlsnopic.s: Likewise.
	* ld-sparc/tlspic.s: Likewise.
	* ld-sparc/tlssunbin32.dd: Likewise.
	* ld-sparc/tlssunbin32.rd: Likewise.
	* ld-sparc/tlssunbin32.s: Likewise.
	* ld-sparc/tlssunbin32.sd: Likewise.
	* ld-sparc/tlssunbin32.td: Likewise.
	* ld-sparc/tlssunbin64.dd: Likewise.
	* ld-sparc/tlssunbin64.rd: Likewise.
	* ld-sparc/tlssunbin64.s: Likewise.
	* ld-sparc/tlssunbin64.sd: Likewise.
	* ld-sparc/tlssunbin64.td: Likewise.
	* ld-sparc/tlssunbinpic32.s: Likewise.
	* ld-sparc/tlssunbinpic64.s: Likewise.
	* ld-sparc/tlssunnopic32.dd: Likewise.
	* ld-sparc/tlssunnopic32.rd: Likewise.
	* ld-sparc/tlssunnopic32.s: Likewise.
	* ld-sparc/tlssunnopic32.sd: Likewise.
	* ld-sparc/tlssunnopic64.dd: Likewise.
	* ld-sparc/tlssunnopic64.rd: Likewise.
	* ld-sparc/tlssunnopic64.s: Likewise.
	* ld-sparc/tlssunnopic64.sd: Likewise.
	* ld-sparc/tlssunpic32.dd: Likewise.
	* ld-sparc/tlssunpic32.rd: Likewise.
	* ld-sparc/tlssunpic32.s: Likewise.
	* ld-sparc/tlssunpic32.sd: Likewise.
	* ld-sparc/tlssunpic32.td: Likewise.
	* ld-sparc/tlssunpic64.dd: Likewise.
	* ld-sparc/tlssunpic64.rd: Likewise.
	* ld-sparc/tlssunpic64.s: Likewise.
	* ld-sparc/tlssunpic64.sd: Likewise.
	* ld-sparc/tlssunpic64.td: Likewise.
2003-01-24 23:44:45 +00:00
Martin Schwidefsky b5edcf2be2 * s390.h: Add s390 TLS relocations. 2003-01-24 17:15:29 +00:00
Nick Clifton 0127ae4041 Add sh2e support 2003-01-24 15:46:04 +00:00
Corinna Vinschen 8bbcd9a1a5 * libc/include/sys/unistd.h: Add setregid and setreuid declarations
for Cygwin.
2003-01-24 15:25:24 +00:00
Corinna Vinschen 7d33eefa7b * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
* syscalls.cc (setreuid32): New function.
	(setreuid): Ditto.
	(setregid32): Ditto.
	(setregid): Ditto.
	* include/cygwin/version.h: Bump API minor number.
2003-01-24 15:23:15 +00:00
Christopher Faylor ac4133746e * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
* grp.cc (pwdgrp::parse_group): Eliminate arg and use class member instead.
Use next_str and next_int to parse arguments.
* passwd.cc (pwdgrp::parse_passwd): Ditto.
(grab_string): Eliminate.
(grab_int): Ditto.
* pwdgrp.h (pwdgrp::parse): Eliminate input arg.
(pwdgrp::parse_passwd): Reflect above change.
(pwdgrp::parse_group): Reflect above change.
(pwdgrp::next_str): New function.
(pwdgrp::next_int): Ditto.
(pwdgrp::gets): Eliminate.
* uinfo.cc (pwdgrp::next_str): New function.
(pwdgrp::next_int): Ditto.
(pwdgrp::add_line): Subsume gets.
(pwdgrp::gets): Eliminate.
(pwdgrp::load): Just call add_line to parse input buffer.
2003-01-24 03:53:46 +00:00
Christopher Faylor 09a8842674 Add missing entry. 2003-01-24 02:41:28 +00:00
Christopher Faylor b831fc4446 * libltp/include/usctest.h: Add externs to some variables that need it.
* winsup.api/ltp/mmap05.c (main): Make file_content volatile to avoid
optimization glitch.
2003-01-24 01:51:39 +00:00
Christopher Faylor 8e61c0495e * winsup.api/mmaptest03.c (main): Mark variables as volatile to avoid
optimization induced problems.
2003-01-24 01:41:30 +00:00
Christopher Faylor 23a30ba8d9 * Makefile (check): Add cygrun.exe dependency. 2003-01-24 01:30:43 +00:00
Christopher Faylor 31d7abadfe Perform more C warning fixup on all C source files and headers. 2003-01-24 01:09:40 +00:00