* dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate name
change from __ino32 to __invalid_ino32.
* include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't define
unused d_type macros.
Corinna Vinschen [Wed, 18 Jan 2006 18:24:33 +0000 (18:24 +0000)]
* autoload.cc (rresvport): Remove.
* net.cc (last_used_rrecvport): New global shared variable.
(cygwin_rresvport): Implement rresvport without using rresvport from
wsock32.
Corinna Vinschen [Sun, 15 Jan 2006 09:29:02 +0000 (09:29 +0000)]
* Makefile.in (cygcheck.exe): Do not link against libwininet.a.
* cygcheck.cc (pInternetCloseHandle): Define global function pointer.
(display_internet_error): Use it.
(package_grep): Attempt to load wininet.dll at runtime. Call WinInet
API through function pointers throughout.
Corinna Vinschen [Fri, 13 Jan 2006 13:39:05 +0000 (13:39 +0000)]
* cygcheck.cc (dump_sysinfo): Convert osname to const and remove casts
in subsequent assignments. Recognize Longhorn/Vista and report as not
yet supported. Recognize when running under WOW64 and report native
CPU type. Slightly rearrange \n printing.
Corinna Vinschen [Fri, 13 Jan 2006 10:18:31 +0000 (10:18 +0000)]
* net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
Windows 2000 and above. Clarify the comment about IP_TOS and move
to the place where the magic happens.
(get_ifconf): Remove unused code.
* wincap.h (wincaps::has_disabled_user_tos_setting): New element.
* wincap.cc: Implement above element throughout.
* fhandler.h (set_console_state_for_spawn): Whackamole the argument back to a
bool.
* spawn.cc (spawn_guts): Ditto, i.e., once again call
set_console_state_for_spawn with an indication of whether we're about to start
a cygwin process.
* fhandler_console.cc (set_console_state_for_spawn): Don't set the console
state if we know we're starting a cygwin process or if we're using a "real"
tty.
Corinna Vinschen [Tue, 10 Jan 2006 18:11:32 +0000 (18:11 +0000)]
* dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
* init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
Call wincap.init here before doing anything else. Use wincap.is_wow64
to determine if we're running in a WOW64 emulator.
* mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
apparently not supported.
(mmap64): Don't create mappings beyond EOF, which would need to use
AT_ROUND_TO_PAGE, on WOW64.
* wincap.cc (wincap): Throw into the .cygwin_dll_common section.
(wincapc::init): Determine if running in WOW64 and set wow_64 flag.
* wincap.h (class wincapc): Add wow64 member.
(wincapc::is_wow64): New method.
Jeff Johnston [Tue, 10 Jan 2006 16:51:58 +0000 (16:51 +0000)]
2006-01-10 Jeff Johnston <jjohnstn@redhat.com>
* libm/mathfp/s_frexp.c: Check for special values on
the original input, not the manipulated output value.
* libm/mathfp/sf_frexp.c: Ditto.
* libm/mathfp/s_atangent.c: Don't use local value branch
when checking for quadrant.
* libm/mathfp/sf_atangent.c: Ditto.
* spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is done prior
to check for command.com/cmd.com. Don't bother setting CREATE_SUSPENDED flag
for a MS-DOS process since it doesn't work anyway. Avoid calling remember()
when the child process has already exited.
(av::fixup): Explicitly set cygexec flag to falseon a 16 bit process.
Check FreeBSD upstream changes and apply important patches.
* sysv_sem.cc (__semctl): Check copyin return value (from 1.76).
* sysv_shm.cc (shminit): Actually use the iterating variable in the
for loop when trying to avoid overflow (from 1.102).
* fhandler.h (set_console_state_for_spawn): Eliminate argument from
declaration.
* fhandler.cc (set_console_state_for_spawn): Eliminate argument from
definition. Always check for invisible console.
(fhandler_console::need_invisible): Don't do anything if the windows station is
already not visible.
* spawn.cc (spawn_guts): Accommodate change of argument to
set_console_state_for_spawn.
* sigproc.cc (no_signals_available): Use existence of signal thread handle to
figure out if we can actually send signals rather than relying on my_sendsig.
(hwait_sig): Make static.
(sigproc_init): Don't set my_sendsig to anything special. Use new global
static hwait_sig.
(wait_sig): Set hwait_sig to NULL when we are exiting.
(fix ChangeLog and check in remaining files)
* sigproc.cc (sigproc_init): Move clearing of sync_startup here to lessen the
likelihood of trying to deal with non-cygwin threads in dll_entry.
* fhandler_console: Fix set_console_state_for_spawn comment.
* fhandler_console.cc (fhandler_console::need_invisible): Only try to open
"CygwinInvisible" windows station if opening of default station fails. Use
CloseWindowStation to close window station handle.
Paolo Bonzini [Wed, 4 Jan 2006 13:11:22 +0000 (13:11 +0000)]
2006-01-04 Paolo Bonzini <bonzini@gnu.org>
Sync from gcc:
2006-01-04 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/24252
* Makefile.def (flags_to_pass): Add STAGE1_CFLAGS and STAGE1_LANGUAGES.
* Makefile.tpl (OBJDUMP): New.
(EXTRA_HOST_FLAGS): Add it.
(EXTRA_GCC_FLAGS): Remove flags already specified in flags_to_pass.
* Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try
to use symbolic links between directories. Avoid race conditions
or make them harmless.
* configure.in: Do not try to use symbolic links between directories.
* Makefile.def (LEAN): Pass.
* Makefile.tpl (LEAN): Define.
(stage[+id+]-start): Accept that the previous directory does not
exist, if the bootstrap is lean.
(stage[+id+]-bubble): Invoke lean bootstrap commands after
stage[+id+]-start. Use a makefile variable and an `if' instead of a
configure substitution.
([+compare-target+]): Likewise.
([+bootstrap-target+]-lean): New.
* configure.in: Remove lean bootstrap support from here.
* fhandler_console.cc (beep): Use MB_OK which is documented as using the
default bell rather than -1 which seems to behave differently on different
versions of Windows.
* fhandler_process.cc (fhandler_process::readdir): Add missing argument to
syscall_printf.
* fhandler_console.cc (fhandler_console::need_invisible): Use made-up name for
windows station rather than asking Windows to create one for us.
* spawn.cc (spawn_guts): Don't mess with console if we're detaching.
* dir.cc (readdir_worker): Minor code cleanup.
* fhandler_console.cc (beep): Use a more Windows-generic wav file if the beep
is missing. Use a more foolproof way to find out whether we should be
recreating the missing key.
* registry.h (reg_key::_disposition): New field.
(reg_key::created): New function.
* registry.cc (reg_key::reg_key): Set _disposition to zero by default.
(reg_key::build_key): Fill in _disposition field.
* syslog.cc: Include sys/un.h instead of sys/socket.h.
(syslogd_inited): Convert to enum type noting the exact result of
trying to connect to syslog daemon. Use this way throughout.
(connect_syslogd): New static function taking over the task to
connect to syslog socket. Use correct struct sockaddr_un instead of
struct sockaddr.
(try_connect_syslogd): Call connect_syslogd. If write fails on
connection oriented socket, try to reconnect to syslog socket and
try to write again.
* cygload/README: Delete.
* cygload/cygload.cc: Move to winsup.api. Add comments from README.
* cygload/cygload.h: Move to winsup.api.
* cygload/cygload.exp: Move to winsup.api.
* Makefile.in: Remove cygload.
* winsup.api/winsup.exp: If a .exp file is detected, run it rather than using
standard compile.
* winsup.api/resethand.c (main): Use printf to print status or expect thinks
something is wrong.
Corinna Vinschen [Sat, 31 Dec 2005 13:07:43 +0000 (13:07 +0000)]
* include/cygwin/in.h: Drop including stdint.h. Move definition
of in_port_t and in_addr_t to top of file and use throughout. Use
sa_family_t type where appropriate.
(struct in6_addr): Change `unsigned char' to `uint8_t'.
(struct sockaddr_in6): Add sin6_scope_id member. Add comments.
* include/cygwin/socket.h: Include stdint.h. Move definition of
socklen_t to top of file. Define sa_family_t. Define struct
sockaddr_storage as per SUSv3.
* include/sys/un.h: Include cygwin/socket.h. Use sa_family_t type.