summaryrefslogtreecommitdiffstats
path: root/winsup
diff options
context:
space:
mode:
Diffstat (limited to 'winsup')
-rw-r--r--winsup/ChangeLog10
-rw-r--r--winsup/Makefile.common6
-rw-r--r--winsup/cygserver/ChangeLog4
-rw-r--r--winsup/cygserver/woutsup.h17
-rw-r--r--winsup/cygwin/ChangeLog1232
-rw-r--r--winsup/cygwin/DevNotes385
-rw-r--r--winsup/cygwin/Makefile.in22
-rw-r--r--winsup/cygwin/advapi32.cc5
-rw-r--r--winsup/cygwin/child_info.h6
-rw-r--r--winsup/cygwin/cygheap.cc127
-rw-r--r--winsup/cygwin/cygheap.h11
-rw-r--r--winsup/cygwin/cygserver_ipc.h2
-rw-r--r--winsup/cygwin/cygthread.cc2
-rw-r--r--winsup/cygwin/cygtls.cc98
-rw-r--r--winsup/cygwin/cygtls.h60
-rw-r--r--winsup/cygwin/cygwait.cc106
-rw-r--r--winsup/cygwin/cygwait.h60
-rw-r--r--winsup/cygwin/cygwin.din2
-rw-r--r--winsup/cygwin/cygwin.sc1
-rw-r--r--winsup/cygwin/dcrt0.cc37
-rw-r--r--winsup/cygwin/devices.cc11
-rw-r--r--winsup/cygwin/devices.in11
-rw-r--r--winsup/cygwin/dll_init.cc9
-rw-r--r--winsup/cygwin/dtable.cc41
-rw-r--r--winsup/cygwin/dtable.h1
-rw-r--r--winsup/cygwin/environ.cc1
-rw-r--r--winsup/cygwin/exceptions.cc248
-rw-r--r--winsup/cygwin/external.cc8
-rwxr-xr-xwinsup/cygwin/fenv.cc6
-rw-r--r--winsup/cygwin/fhandler.cc3
-rw-r--r--winsup/cygwin/fhandler.h24
-rw-r--r--winsup/cygwin/fhandler_clipboard.cc129
-rw-r--r--winsup/cygwin/fhandler_console.cc158
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc30
-rw-r--r--winsup/cygwin/fhandler_dsp.cc9
-rw-r--r--winsup/cygwin/fhandler_fifo.cc17
-rw-r--r--winsup/cygwin/fhandler_mem.cc4
-rw-r--r--winsup/cygwin/fhandler_nodevice.cc6
-rw-r--r--winsup/cygwin/fhandler_procnet.cc10
-rw-r--r--winsup/cygwin/fhandler_registry.cc3
-rw-r--r--winsup/cygwin/fhandler_serial.cc35
-rw-r--r--winsup/cygwin/fhandler_socket.cc73
-rw-r--r--winsup/cygwin/fhandler_tape.cc20
-rw-r--r--winsup/cygwin/fhandler_termios.cc10
-rw-r--r--winsup/cygwin/fhandler_tty.cc156
-rw-r--r--winsup/cygwin/fhandler_virtual.cc1
-rw-r--r--winsup/cygwin/fhandler_windows.cc62
-rw-r--r--winsup/cygwin/flock.cc4
-rw-r--r--winsup/cygwin/fork.cc4
-rwxr-xr-xwinsup/cygwin/gendef71
-rwxr-xr-xwinsup/cygwin/gentls_offsets4
-rw-r--r--winsup/cygwin/globals.cc2
-rw-r--r--winsup/cygwin/heap.cc11
-rw-r--r--winsup/cygwin/hookapi.cc26
-rw-r--r--winsup/cygwin/include/cygwin/if.h2
-rw-r--r--winsup/cygwin/include/cygwin/in.h4
-rw-r--r--winsup/cygwin/include/cygwin/socket.h7
-rw-r--r--winsup/cygwin/include/cygwin/version.h6
-rw-r--r--winsup/cygwin/include/elf.h48
-rw-r--r--winsup/cygwin/include/inttypes.h183
-rw-r--r--winsup/cygwin/include/machine/elf.h117
-rw-r--r--winsup/cygwin/include/mntent.h1
-rw-r--r--winsup/cygwin/include/netdb.h2
-rw-r--r--winsup/cygwin/include/stdint.h132
-rw-r--r--winsup/cygwin/include/sys/elf.h41
-rw-r--r--winsup/cygwin/include/sys/elf32.h119
-rw-r--r--winsup/cygwin/include/sys/elf64.h114
-rw-r--r--winsup/cygwin/include/sys/elf_common.h1145
-rw-r--r--winsup/cygwin/include/sys/elf_generic.h53
-rw-r--r--winsup/cygwin/include/sys/wait.h6
-rw-r--r--winsup/cygwin/kernel32.cc7
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc3
-rw-r--r--winsup/cygwin/lib/crt0.h2
-rw-r--r--winsup/cygwin/libc/inet_addr.c3
-rw-r--r--winsup/cygwin/libc/inet_network.c3
-rw-r--r--winsup/cygwin/libc/minires-os-if.c17
-rw-r--r--winsup/cygwin/libc/minires.h6
-rw-r--r--winsup/cygwin/libc/rcmd.cc1
-rw-r--r--winsup/cygwin/miscfuncs.cc2
-rw-r--r--winsup/cygwin/miscfuncs.h4
-rw-r--r--winsup/cygwin/mmap.cc3
-rw-r--r--winsup/cygwin/mount.cc30
-rw-r--r--winsup/cygwin/mount.h2
-rw-r--r--winsup/cygwin/net.cc133
-rw-r--r--winsup/cygwin/ntdll.h86
-rw-r--r--winsup/cygwin/passwd.cc60
-rw-r--r--winsup/cygwin/path.cc168
-rw-r--r--winsup/cygwin/path.h2
-rw-r--r--winsup/cygwin/pinfo.cc20
-rw-r--r--winsup/cygwin/pipe.cc27
-rw-r--r--winsup/cygwin/poll.cc4
-rw-r--r--winsup/cygwin/posix.sgml2
-rw-r--r--winsup/cygwin/posix_ipc.cc9
-rw-r--r--winsup/cygwin/pseudo-reloc.cc8
-rw-r--r--winsup/cygwin/regex/regcomp.c3
-rw-r--r--winsup/cygwin/registry.cc2
-rw-r--r--winsup/cygwin/release/1.7.10126
-rw-r--r--winsup/cygwin/release/1.7.1129
-rw-r--r--winsup/cygwin/release/1.7.1221
-rw-r--r--winsup/cygwin/sched.cc2
-rw-r--r--winsup/cygwin/sec_helper.cc74
-rw-r--r--winsup/cygwin/security.cc14
-rw-r--r--winsup/cygwin/security.h21
-rw-r--r--winsup/cygwin/select.cc363
-rw-r--r--winsup/cygwin/select.h20
-rw-r--r--winsup/cygwin/shared.cc4
-rw-r--r--winsup/cygwin/signal.cc60
-rw-r--r--winsup/cygwin/sigproc.cc38
-rw-r--r--winsup/cygwin/sigproc.h38
-rw-r--r--winsup/cygwin/smallprint.cc35
-rw-r--r--winsup/cygwin/spawn.cc55
-rw-r--r--winsup/cygwin/strace.cc4
-rw-r--r--winsup/cygwin/strfuncs.cc22
-rw-r--r--winsup/cygwin/syscalls.cc190
-rw-r--r--winsup/cygwin/syslog.cc8
-rw-r--r--winsup/cygwin/thread.cc145
-rw-r--r--winsup/cygwin/thread.h25
-rw-r--r--winsup/cygwin/tlsoffsets.h146
-rw-r--r--winsup/cygwin/wait.cc5
-rw-r--r--winsup/cygwin/winbase.h48
-rw-r--r--winsup/cygwin/wincap.cc143
-rw-r--r--winsup/cygwin/wincap.h6
-rw-r--r--winsup/cygwin/winlean.h65
-rw-r--r--winsup/cygwin/winsup.h26
-rw-r--r--winsup/doc/ChangeLog82
-rwxr-xr-xwinsup/doc/configure4192
-rw-r--r--winsup/doc/cygwinenv.sgml5
-rw-r--r--winsup/doc/faq-programming.xml70
-rw-r--r--winsup/doc/faq-using.xml10
-rw-r--r--winsup/doc/new-features.sgml62
-rw-r--r--winsup/doc/overview2.sgml7
-rw-r--r--winsup/doc/pathnames.sgml30
-rw-r--r--winsup/doc/setup-net.sgml1
-rw-r--r--winsup/doc/using.sgml2
-rw-r--r--winsup/lsaauth/ChangeLog8
-rw-r--r--winsup/lsaauth/Makefile.in6
-rw-r--r--winsup/lsaauth/cyglsa.c46
-rw-r--r--winsup/lsaauth/cyglsa64.dllbin8704 -> 8704 bytes
-rw-r--r--winsup/lsaauth/make-64bit-version-with-mingw-w64.sh6
-rw-r--r--winsup/mingw/ChangeLog65
-rwxr-xr-xwinsup/mingw/configure2
-rw-r--r--winsup/mingw/configure.in2
-rw-r--r--winsup/mingw/include/_mingw.h25
-rw-r--r--winsup/mingw/include/excpt.h23
-rw-r--r--winsup/mingw/include/inttypes.h39
-rw-r--r--winsup/mingw/include/limits.h4
-rw-r--r--winsup/mingw/include/process.h22
-rw-r--r--winsup/mingw/include/stdint.h1
-rw-r--r--winsup/mingw/include/stdio.h8
-rw-r--r--winsup/mingw/include/stdlib.h9
-rw-r--r--winsup/mingw/include/sys/param.h4
-rw-r--r--winsup/mingw/include/wchar.h4
-rw-r--r--winsup/mingw/mingwex/Makefile.in6
-rw-r--r--winsup/mingw/mingwex/gdtoa/gd_qnan.h8
-rw-r--r--winsup/mingw/mingwex/membarrier.c19
-rwxr-xr-xwinsup/mingw/mingwex/tsearch.c26
-rw-r--r--winsup/mingw/profile/Makefile.in4
-rw-r--r--winsup/testsuite/ChangeLog4
-rw-r--r--winsup/testsuite/configure4190
-rw-r--r--winsup/utils/ChangeLog60
-rw-r--r--winsup/utils/Makefile.in2
-rw-r--r--winsup/utils/bloda.cc93
-rw-r--r--winsup/utils/cygcheck.cc14
-rw-r--r--winsup/utils/cygpath.cc51
-rw-r--r--winsup/utils/dump_setup.cc18
-rw-r--r--winsup/utils/dumper.cc3
-rw-r--r--winsup/utils/locale.cc4
-rw-r--r--winsup/utils/mkgroup.c36
-rw-r--r--winsup/utils/mkpasswd.c45
-rw-r--r--winsup/utils/ps.cc6
-rw-r--r--winsup/utils/regtool.cc4
-rw-r--r--winsup/utils/strace.cc10
-rw-r--r--winsup/w32api/ChangeLog68
-rw-r--r--winsup/w32api/include/sdkddkver.h141
-rw-r--r--winsup/w32api/include/setupapi.h12
-rw-r--r--winsup/w32api/include/shobjidl.h143
-rw-r--r--winsup/w32api/include/winbase.h12
-rw-r--r--winsup/w32api/include/windows.h2
-rw-r--r--winsup/w32api/include/winnt.h13
-rw-r--r--winsup/w32api/include/winsock.h4
-rw-r--r--winsup/w32api/include/winsock2.h4
-rw-r--r--winsup/w32api/include/winuser.h4
-rw-r--r--winsup/w32api/include/winver.h4
-rw-r--r--winsup/w32api/include/wtsapi32.h52
-rw-r--r--winsup/w32api/lib/Makefile.in13
-rw-r--r--winsup/w32api/lib/kernel32.def6
-rw-r--r--winsup/w32api/lib/shobjidl-uuid.c13
-rwxr-xr-xwinsup/w32api/lib/wtsapi32.def1
188 files changed, 6051 insertions, 11500 deletions
diff --git a/winsup/ChangeLog b/winsup/ChangeLog
index 440d75414..09a3436b1 100644
--- a/winsup/ChangeLog
+++ b/winsup/ChangeLog
@@ -1,13 +1,3 @@
-2012-07-30 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * Makefile.common (CFLAGS_COMMON): Add temporary define to work around
- w32api problem.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.common (ALL_CFLAGS): Change := to = to allow overriding in
- dependent Makefiles.
-
2012-01-09 Corinna Vinschen <corinna@vinschen.de>
* Makefile.common (MINGW_LDFLAGS): Correctly use -L rather than -B here.
diff --git a/winsup/Makefile.common b/winsup/Makefile.common
index 1917e3d21..d496fb8d6 100644
--- a/winsup/Makefile.common
+++ b/winsup/Makefile.common
@@ -1,6 +1,6 @@
# Makefile.common - common definitions for the winsup directory
#
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2012 Red Hat, Inc.
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
#
# This file is part of Cygwin.
#
@@ -10,7 +10,7 @@
# This makefile requires GNU make.
-CFLAGS_COMMON:=-Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -D_SDKDDKVER_H
+CFLAGS_COMMON:=-Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0# -finline-functions
MALLOC_DEBUG:=#-DMALLOC_DEBUG -I/cygnus/src/uberbaum/winsup/cygwin/dlmalloc
MALLOC_OBJ:=#/cygnus/src/uberbaum/winsup/cygwin/dlmalloc/malloc.o
@@ -113,7 +113,7 @@ LIBC:=$(newlib_build)/libc/libc.a
LIBM:=$(newlib_build)/libm/libm.a
CRT0:=$(cygwin_build)/crt0.o
-ALL_CFLAGS=$(DEFS) $(MALLOC_DEBUG) $(CFLAGS) $(GCC_DEFAULT_OPTIONS)
+ALL_CFLAGS:=$(DEFS) $(MALLOC_DEBUG) $(CFLAGS) $(GCC_DEFAULT_OPTIONS)
ALL_CXXFLAGS=$(DEFS) $(MALLOC_DEBUG) $(CXXFLAGS) $(GCC_DEFAULT_OPTIONS)
ifndef PREPROCESS
diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog
index c3731f710..6740069ca 100644
--- a/winsup/cygserver/ChangeLog
+++ b/winsup/cygserver/ChangeLog
@@ -1,7 +1,3 @@
-2012-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * woutsup.h: Just include winlean.h.
-
2012-03-19 Christopher Faylor <me.cygwin2012@cgf.cx>
* client.cc: Revert sigproc.h inclusion since it was fixed elsewhere.
diff --git a/winsup/cygserver/woutsup.h b/winsup/cygserver/woutsup.h
index 5598c11c2..b262ae2a1 100644
--- a/winsup/cygserver/woutsup.h
+++ b/winsup/cygserver/woutsup.h
@@ -23,7 +23,22 @@ details. */
#define _WIN32_WINNT 0x0500
#endif
-#include "winlean.h"
+#define WIN32_LEAN_AND_MEAN 1
+#define _WINGDI_H
+#define _WINUSER_H
+#define _WINNLS_H
+#define _WINVER_H
+#define _WINNETWK_H
+#define _WINSVC_H
+#include <windows.h>
+#include <wincrypt.h>
+#include <lmcons.h>
+#undef _WINGDI_H
+#undef _WINUSER_H
+#undef _WINNLS_H
+#undef _WINVER_H
+#undef _WINNETWK_H
+#undef _WINSVC_H
#include "bsd_helper.h"
#include "bsd_log.h"
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e6b69ccd2..58e139679 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,1231 +1,3 @@
-2012-08-09 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000014.
- * cygheap.cc (tls_sentry): Move here, rename from 'sentry' in cygtls.cc
- (tls_sentry::lock): Ditto.
- (nthreads): Move from cygtls.cc
- (THREADLIST_CHUNK): Ditto.
- (cygheap_init): Call init_tls_list().
- (init_cygheap::init_tls_list): Define new function.
- (init_cygheap::add_tls): Ditto.
- (init_cygheap::remove_tls): Ditto.
- (init_cygheap::find_tls): Ditto. Semi-resurrect from
- _cygtls::find_tls.
- * cygheap.h (init_cygheap::init_tls_list): Declare new function.
- (init_cygheap::add_tls): Ditto.
- (init_cygheap::remove_tls): Ditto.
- (init_cygheap::find_tls): Ditto.
- * cygtls.cc (sentry): Delete.
- (sentry::lock): Ditto.
- (nthreads): Ditto.
- (THREADLIST_CHUNK): Ditto.
- (_cygtls::init): Delete definition.
- (_cygtls::init_thread): Call cygheap->add_tls() to add thread to global
- list.
- (_cygtls::remove): cygheap->remove_tls() to remove thread from global
- list.
- * cygtls.h (_cygtls::init): Delete declaration.
- * dcrt0.cc (dll_crt0_0): Delete call to _cygtls::init().
- * exceptions.cc (sigpacket::process): When no thread is specified, try
- to find one via cygheap->find_tls.
-
-2012-08-08 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/wait.h (_wait): Define when building newlib.
-
-2012-08-07 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * signal.cc (sigwaitinfo): Change cw_sig to the correct cw_sig_eintr.
-
-2012-08-03 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * exceptions.cc (sigdelayed): Simplify declaration.
- (_cygtls::call_signal_handler): Fix test for when to pop signal stack.
- Only do it exactly when what is on the stack is a no-op.
-
-2012-08-03 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * spawn.cc (child_info_spawn::worker): Put back a minor variation of
- Corinna's test for detecting a background process when starting a
- non-cygwin process.
-
-2012-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h (MSG_BCAST): Define.
- (MSG_MCAST): Define.
-
-2012-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::recv_internal): Add bool parameter.
- Add regparm attribute.
- * fhandler_socket.cc (fhandler_socket::read): Call recv_internal with
- second parameter set to false.
- (fhandler_socket::readv): Ditto.
- (fhandler_socket::recvfrom): Ditto.
- (fhandler_socket::recv_internal): Convert use_recvmsg from local
- variable to parameter. Use as request for using WSARecvMsg. Only
- fail if WSARecvMsg can't be loaded and wsamsg->Control.len > 0,
- otherwise use WSARecv{From}. Restrict dwFlags to MSG_PEEK when using
- WSARecvMsg.
- (fhandler_socket::recvmsg): Prefer using WSARecvMsg. Change priority
- of tests for not using WSARecvMsg. Call recv_internal with second
- parameter set accordingly.
-
-2012-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Semi-revert patch from 2012-07-01, assuming the previous
- patch to etc::dir_changed fixes the underlying issue.
-
-2012-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (etc::dir_changed): Revert muto changes since function is
- called under lock condition anyway.
-
-2012-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (etc::dir_changed): Change `io' to a static NO_COPY
- variable. Explain why. Add a muto to guard overwriting the changed_h
- handle by multiple concurrent threads.
- * path.h (class etc): Drop unused changed_h member.
-
-2012-07-30 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * winlean.h: Define constant which will be needed eventually. Remove
- hack in favor of another hack.
- * lib/crt0.h: Use "winlean.h".
-
-2012-07-30 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * winlean.h: Add temporary define.
- * winsup.h: Remove ancient debugging defines.
-
-2012-07-29 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygwait.cc (cancelable_wait): Add some debugging-only output.
- * exceptions.cc (sig_handle_tty_stop): Make sure that incyg is cleared
- when exiting if we have no parent process. Only wait for signal_arrived.
- (sigpacket::process): Make continue_now a bool. Delay sending
- signal_arrived until the end. Make code more defensive to avoid
- calling signal handler when stopped. Only set signal_arrived when
- stopped.
- * sigproc.cc (sig_hold): Rename from sigCONT. Make static.
- (sig_send): Accommodate sigCONT -> sig_hold rename.
- (wait_sig): Ditto.
- * sigproc.h (sigCONT): Delete declaration.
-
- * fhandler_console.cc (fhandler_console::write): Use new '%0c' facility
- to print characters. Change to paranoid to avoid excessive strace
- output.
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Make frequent
- strace printf "paranoid" to help cut down on strace output size.
-
- * signal.cc (sigsuspend): Add standard syscall strace output.
- (sigpause): Ditto.
- (pause): Ditto.
-
-2012-07-29 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygtls.h (_cygtls::reset_signal_arrived): New function.
- (set_signal_arrived::~set_signal_arrived): Use reset_signal_arrived to
- reset state.
- * exceptions.cc (sig_handle_tty_stop): Use WAIT_SIGNALED rather than
- assume we know the return from cancelable_wait.
- (_cygtls::interrupt_setup): Modify to allow calling when executing in
- non-cygwin code via sigdelayed. Always reset signal_arrived.
- * gendef: Throughout use start_offset rather than the completely wrong
- sizeof__cygtls.
- (_sigdelayed): Rewrite to avoid duplication when calling the signal
- handler.
- (sigreturn): Delete.
- * gentls_offsets: Define start_offset rather than sizeof__cygtls.
- * tlsoffsets.h: Regenerate.
-
-2012-07-29 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Use special case
- '%0c' handling to print non-printable characters using hex notation.
- * smallprint.cc (__small_vsprintf): Semi-reimplement printing of
- non-printable characters in hex but only when padding is specified.
-
- * dcrt0.cc (dll_crt0_0): Remove tty_list initialization.
- * shared.cc (memory_init): Initialize tty_list here.
-
- * path.cc (path_conv::check): Remove unneeded parentheses from if
- check.
-
-2012-07-28 Corinna Vinschen <corinna@vinschen.de>
-
- * include/inttypes.h: Add x86_64 target considerations throughout.
- Define macros in C++ according to C99 requirements.
- * include/stdint.h: Ditto.
-
-2012-07-25 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * signal.cc (clock_nanosleep): Force return on signal rather than
- letting cancelable_wait loop on signal.
-
-2012-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (enum bin_status): Add dir_not_empty.
- (try_to_bin): Call NtQueryInformationFile(FileInternalInformation)
- with exact buffer size. Explain why.
- Ditto for NtSetInformationFile(FileRenameInformation).
- Handle race-condition which might lead to renaming a non-empty
- directory.
- (unlink_nt): Rearrange and partially rephrase comments related to the
- STATUS_SHARING_VIOLATION case. Fix condition under which a dir is
- tested for being non-empty. Handle dir_not_empty return code from
- try_to_bin. Gracefully handle disappearing directory in rm -r
- workaround. Fix typo in comment.
-
-2012-07-24 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.cc (wincapc::init): Drop memset call since it can result in
- a race condition. Drop all considerations for pre-Windows 2000 systems
- since Cygwin won't start on them anyway.
-
-2012-07-23 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- Change "set_thread_waiting" to "set_signal_arrived" throughout.
-
-2012-07-21 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000013.
- * cygserver_ipc.h (ipc_set_proc_info): Use _cygtls::ipc_set_proc_info
- to set per-thread signal arrived value.
- * cygthread.cc (cygthread::detach): Use per-thread signal_arrived via
- set_thread_waiting.
- * fork.cc (_cygtls::fixup_after_fork): Clear signal_arrived.
- (_cygtls::remove): Close any signal_arrived handle when thread exists.
- (_cygtls::find_tls): Remove unneeded function.
- * cygtls.h: Update copyright.
- (class _cygtls): Reorganize to help avoid rebuilding newlib when
- structure changes.
- (_cygtls::event): Delete.
- (_cygtls::threadkill): Ditto.
- (_cygtls::signal_waiting): Declare new bool.
- (_cygtls::find_tls): Delete declaration.
- (_cygtls::set_threadkill): Ditto.
- (_cygtls::reset_threadkill): Ditto.
- (_cygtls::set_signal_arrived): Declare new function.
- (class set_thread_waiting): Declare new class.
- * cygwait.cc (cw_nowait_storage): Define.
- (cygwait): Set per-thread signal_arrived via set_thread_waiting. Don't
- special-case _main_tls.
- * cygwait.h (cw_nowait): Define.
- (cw_infinite): Ditto.
- (cygwait): Redefine pathological wait-only case.
- * dcrt0.cc (dll_crt0_0): Remove call to now-defunct events_init().
- (dll_crt0_1): Remove call to now-defunct create_signal_arrived().
- * exceptions.cc: Reflect set_signal_mask() argument reordering
- throughout. Remove signal mask synchronization throughout.
- (events_init): Delete definition.
- (mask_sync): Delete now-unneeded mask synchronization.
- (set_signal_mask): Reverse order of arguments to "standard" to, from
- layout. Rename "newmask" argument to "setmask". Remove debugging.
- (sig_handle_tty_stop): Use cancelable_wait rather than WFMO.
- (_cygtls::interrupt_setup): Don't treat "threadkill" events specially.
- Conditionally set signal_arrived depending on whether the thread has
- created it or not.
- (sigpacket::process): Reorganize to reflect thread-specific sending of
- signals which is more in line with the way it was actually supposed to
- work.
- * fhandler_socket.cc (get_inet_addr): Use cancelable_wait rather than
- IsEventSignalled to avoid potential race.
- (fhandler_socket::wait_for_events): Set signal_arrived event using
- set_thread_waiting().
- (fhandler_socket::close): Use cygwait for the case of just
- waiting 10 ms for a signal.
- * fhandler_tape.cc (fhandler_dev_tape::_lock): Use cancelable_wait
- rather than WFMO. Redo switch/case tests accordingly.
- * fhandler_termios.cc (fhandler_termios::bg_check): Use cygwait for
- case of just waiting 0 ms for a potential signal.
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Use
- cancelable_wait rather than WFSO.
- * fhandler_windows.cc (fhandler_windows::read): Set per-thread
- signal_arrived via set_thread_waiting().
- * flock.cc (lf_setlock): Ditto.
- * select.cc (pselect): Ditto. Set per-thread signal_arrived using
- set_thread_waiting().
- * gendef: Don't special case handling of _cygtls::sig for threads.
- * gentls_offsets: Use #pragma once in tlsoffsets.h.
- * ntdll.h: Use #pragma once.
- * poll.cc: Reflect set_signal_mask() argument reordering.
- * posix_ipc.cc (ipc_mutex_lock): Use cancelable_wait rather than WFMO.
- (ipc_cond_timedwait): Set perl-thread signal arrived using
- set_thread_waiting().
- * security.h: Use #pragma once.
- * signal.cc (abort): Reflect set_signal_mask() argument reordering.
- (clock_nanosleep): Ditto. Change call to cancelable_wait to properly
- specify handling of cancel and interrupt.
- (sigwaitinfo): Remove handling of per-thread event in favor of
- per-thread signal_arrived. Use cancelable_wait rather than WFSO.
- * sigproc.cc (signal_arrived): Delete definition.
- (create_signal_arrived): Ditto.
- * sigproc.h (signal_arrived): Delete declaration.
- (set_signal_mask): Avoid defining as a "C" function. Don't
- conditionally declare.
- (create_signal_arrived): Delete declaration.
- * syscalls.cc (rename): Use cygwait() rather than WFSO.
- * thread.h (fast_mutex::lock): Use cw_infinite rather than LARGE_NULL.
- * wait.cc (wait4): Ditto.
- * thread.cc (pthread_mutex::lock): Ditto.
- (pthread::join): Ditto.
- (semaphore::_wait): Ditto.
- (pthread_kill): Remove set_threadkill() accommodation.
- * tlsoffsets.h: Regenerate.
-
-2012-07-21 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 17.
-
-2012-07-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * mount.cc (getmntent_r): Remove unused but set variable.
-
-2012-07-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * cygwin.din (getmntent_r): Export.
- * mount.cc (getmntent_r): New function.
- * posix.sgml (std-gnu): Add getmntent_r.
- * include/mntent.h (getmntent_r): Declare.
- * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
-
-2012-07-12 Corinna Vinschen <corinna@vinschen.de>
-
- * winlean.h: Make sure certain Windows macros are undefined again.
- Add comment to explain why.
- * winsup.h: Include winlean.h from C sources as well.
- * libc/minires-os-if.c: Drop including ntdef.h.
-
-2012-07-12 Corinna Vinschen <corinna@vinschen.de>
-
- * pseudo-reloc.cc: Drop including wchar.h and ntdef.h.
- (__report_error): Define module as WCHAR.
- * advapi.cc: Drop including wchar.h.
- * kernel32.cc: Ditto.
-
-2012-07-11 Corinna Vinschen <corinna@vinschen.de>
-
- * cygtls.cc (well_known_dlls): Add ole32.dll and wbemprox.dll.
-
-2012-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.sc (.rdata): Revert patch from 2012-07-06.
-
-2012-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc (getpass): Make check for closed stream more reliable.
- Check if setting tty attributes worked and only revert to old state
- if so.
-
-2012-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in, configure.in, mkvers.sh: Revert accidental checkin from
- 2012-07-06.
-
-2012-07-07 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * Makefile.in: Change mingw_lib (temporarily?) back to w32api_lib.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * winlean.h (__STRALIGN_H_): Drop definition.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_procnet.cc: Fix copyright.
- * syslog.cc: Ditto.
- * libc/minires-os-if.c: Ditto.
- * libc/minires.h: Ditto.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- In terms of network related functionality, rely on Winsock definitions
- as much as possible:
- * dtable.cc: Drop including sys/socket.h.
- * fhandler_procnet.cc: Change includes accordingly.
- * fhandler_socket.cc: Ditto.
- (fhandler_socket::listen): Avoid gcc error message initializing sin6.
- (LPFN_WSARECVMSG): Only define when building against w32api headers.
- * net.cc: Change includes accordingly. Define USE_SYS_TYPES_FD_SET
- and __WSA_ERR_MACROS_DEFINED. Define _INC_NETIOAPI temporarily and
- explain why.
- (struct _IP_ADAPTER_UNICAST_ADDRESS_LH): Only define when building
- against w32api headers.
- (struct _IP_ADAPTER_ADDRESSES_LH): Ditto.
- (SIO_GET_INTERFACE_LIST): Ditto.
- (ws_freeaddrinfo): Rename from freeaddrinfo so as not to collide with
- Winsock declaration. Change througout.
- (ws_getaddrinfo): Ditto.
- (ws_getnameinfo): Ditto.
- * select.cc: Include netdb.h after defining USE_SYS_TYPES_FD_SET.
- * syslog.cc: Drop including netinet/in.h. Define USE_SYS_TYPES_FD_SET
- and include ws2tcpip.h.
- * include/netdb.h (struct addrinfo): Don't define when building Cygwin.
- * include/cygwin/if.h: Don't declare if_xxx functions when building
- Cygwin.
- * include/cygwin/in.h: Disable most definitions when building Cygwin.
- * include/cygwin/socket.h: Disable sockaddr and sockaddr_storage
- definitions when building Cygwin. Same for MCAST_INCLUDE/MCAST_EXCLUDE.
- * libc/inet_addr.c: Don't define __INSIDE_CYGWIN__ nor
- __INSIDE_CYGWIN_NET__.
- * libc/inet_network.c: Ditto.
- * libc/minires.h: Drop redundant inclusion of netdb.h. Define
- __INSIDE_CYGWIN_NET__ only before including netdb.h and resolver
- headers.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * winbase.h: Throughout use LONG rather than long type to prepare for
- 64 bit.
- (InterlockedCompareExchangePointer): Define.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_registry.cc (RegOpenUserClassesRoot): Only define when
- building against w32api headers.
- (RegOpenCurrentUser): Ditto.
- * fhandler_tty.cc (GetNamedPipeClientProcessId): Ditto.
- * ntdll.h (enum _PROCESSINFOCLASS): Add ProcessImageFileName.
- (RtlInitAnsiString): Declare.
- (RtlUnicodeStringToAnsiSize): Declare.
- * sched.cc (GetForegroundWindow): Ditto.
- * sec_helper.cc (SECURITY_NT_NON_UNIQUE): Define as
- SECURITY_NT_NON_UNIQUE_RID when building against w32api headers.
- (cygsid::get_sid): Use SECURITY_NT_NON_UNIQUE rather than
- SECURITY_NT_NON_UNIQUE_RID.
- (__sec_user): Use PISECURITY_DESCRIPTOR rather than PSECURITY_DESCRIPTOR
- to allow valid pointer arithmetic.
- (_recycler_sd): Ditto.
- (_everyone_sd): Ditto.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * advapi32.cc (_ADVAPI32_): Drop definition.
- * kernel32.cc (_KERNEL32_): Ditto.
- * winlean.h: Add definitions required to use Mingw64 headers.
- (FILE_SHARE_VALID_FLAGS): Drop definition.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (_WIN32_WINNT): Define. Explain why.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/rcmd.cc: Don't undef __INSIDE_CYGWIN_NET__.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.sc (.rdata): Include all sections starting with .rdata.
- (.debug_pubtypes): Make sure section is loaded at the end like all other
- debug sections.
-
-2012-07-04 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * dcrt0.cc (build_argv): Guard against NULL pointer dereference found
- by Clang.
-
-2012-07-04 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * exceptions.cc (setup_handler): Remove unneeded assignment found by
- Clang.
-
-2012-07-04 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * hookapi.cc (find_first_notloaded_dll): Remove unused assignment of
- importRVASize found by Clang.
-
-2012-07-04 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler_tty.cc (fhandler_pty_slave::read): Remove duplicate
- assignment to bytes_in_pipe found by Clang.
-
-2012-07-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * exceptions.cc (exception::handle): Use error_code in klog, as
- intended. Found by Clang.
-
-2012-07-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_clipboard): Remove member eof.
- * fhandler_clipboard.cc: Throughout remove handling of eof member.
- (fhandler_dev_clipboard::write): Handle EOF condition immediately,
- rather than pushing it erroneously to the next read call. Rearrange
- code. Fix bug in CF_UNICODETEXT case which potentially dropped single
- bytes at the end of the buffer. Add comment.
- * strfuncs.cc (sys_cp_wcstombs): Allow returning non-NUL-terminated
- buffer if dst != NULL and len == (size_t) -1. Extend leading comment
- to explain what's returned in more detail.
-
-2012-07-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler_virtual.cc (fhandler_virtual::opendir): Eliminate duplicate
- assignment found by Clang.
-
-2012-07-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler_registry.cc (fhandler_registry::open): Handle missing EROFS
- error condition pointed to by Clang.
-
-2012-07-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * pinfo.cc (_pinfo::commune_request): Eliminate unneeded assignment
- found by Clang.
-
-2012-07-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * external.cc (fillout_pinfo): Return NULL rather than 0.
- (exit_process): Guard against NULL pointer dereference found by Clang.
-
-2012-07-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * mount.cc (mount_info::conv_to_win32_path): Eliminate unneeded
- assignment found by Clang.
-
-2012-07-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * path.cc (symlink_info::check): Remove unneeded/unused variable found
- by Clang.
-
-2012-07-02 Corinna Vinschen <corinna@vinschen.de>
-
- * dll_init.cc (dll_list::alloc): Take long UNC paths into account.
-
-2012-07-01 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * Makefile.in: Add some more optimization flags for cygwait, malloc and
- path. Explain why -fomit-frame-pointer doesn't work right for passwd.o
- and path.o. Add -static to link command line for cygwin0.dll.
-
- * fhandler_disk_file.cc (fhandler_disk_file::facl): Reorganize slightly
- to silence compiler warning when compiling with -fstack-check.
- * net.cc (inet_ntop6): Initialize structure members to silence compiler
- warning when compiling with -fstack-check.
-
- * pseudo-reloc.cc (_pei386_runtime_relocator): Make this a C function.
- Detect NULL u.
- * winsup.h (_pei386_runtime_relocator): Declare this as extern "C".
- * lib/_cygwin_crt0_common.cc (_pei386_runtime_relocator): Call with
- NULL argument.
-
- * signal.cc (sigaction_worker): Eliminate last argument. Let callers
- report their own strace info. Regparmize.
- (sigaction): Reflect sigaction_worker changes.
- (siginterrupt): Ditto.
-
- * exceptions.cc: Update copyright.
-
-2012-07-01 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * path.cc: Perform some whitespace fixups throughout.
-
-2012-06-28 Corinna Vinschen <corinna@vinschen.de>
-
- * kernel32.cc (_KERNEL32_): Define. Explain why.
- (CreateFileMappingW): Drop undocumented flProtect flags.
-
-2012-06-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc: Fix includes for IOCTL codes to support Mingw64.
- * fhandler_tape.cc: Ditto.
- * flock.cc (allow_others_to_sync): Use PISECURITY_DESCRIPTOR since
- PSECURITY_DESCRIPTOR is supposed to be the opaque type.
- * ntdll.h: Remove CreateDisposition flags again, now that they are
- defined in Mingw64's ntdef.h. Ditto for Create/Open flags.
-
-2012-06-28 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (RtlUnwind): Align declaration with MSDN.
- * ntdll.h: Define CreateDisposition Flags. Add comments.
- * winlean.h: Define FILE_SHARE_VALID_FLAGS if using Mingw64 headers.
-
-2012-06-27 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygwait.h (cancelable_wait): Make extern to avoid always including.
- * select.cc (allocfd_set): Try to make a little more efficient.
- (cygwin_select): Break into two functions to avoid what seems to be a
- strange compiler problem with alloca and sel constructor.
- (select): New function. Always honor return from call_signal_handler.
- (select_stuff::wait): Always honor return from call_signal_handler.
- * select.h (select_stuff::select_stuff): Use NULL to initialize
- pointers rather than 0.
-
-2012-06-27 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (exception::handle): Cast exception code to NTSTATUS
- for comparison.
- * ntdll.h: Drop defining NT status codes in favor of including
- ntstatus.h.
-
-2012-06-27 Corinna Vinschen <corinna@vinschen.de>
-
- * miscfuncs.cc (WritePipeOverlapped): Define second parameter LPCVOID,
- rather than PCVOID.
- * miscfuncs.h (WritePipeOverlapped): Ditto.
-
-2012-06-27 Corinna Vinschen <corinna@vinschen.de>
-
- * advapi32.cc (_ADVAPI32_): Define. Explain why.
- (ImpersonateNamedPipeClient): Add missing WINAPI.
- * ntdll.h (STATUS_INVALID_PARAMETER): Only define if it isn't already.
- (STATUS_DLL_NOT_FOUND): Ditto.
- (STATUS_ENTRYPOINT_NOT_FOUND): Ditto.
- (enum _EVENT_TYPE): Guard against redefinition since it's already
- defined in Mingw64's ntdef.h.
- (enum _TIMER_TYPE): Ditto.
- (enum _SECTION_INHERIT): Define if using Mingw64 headers since it's
- missing in Mingw64's ntdef.h.
- * winlean.h (__STRALIGN_H_): Define before including windows.h.
-
-2012-06-26 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (GetLastError): Drop redundant definition.
-
-2012-06-25 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygwait.cc (cancelable_wait): Make sure that timer is cancelled
- before cancelling thread.
-
-2012-06-25 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygwait.h (cancelable_wait): Need to force time to negative to
- indicate relative time.
-
-2012-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (realpath): Fix comment.
-
-2012-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (realpath): Call mount_info::conv_to_posix_path rather than
- mount_info::cygdrive_posix_path to convert DOS paths to POSIX paths.
- Add comment to explain why that's necessary at all.
-
-2012-06-18 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygwait.h (LARGE_NULL): Define.
- (cancelable_wait): Define variant which accepts DWORD time argument.
- (cygwait): Use cancelable_wait with DWORD argument.
- (cygwait): Use cancelable_wait with DWORD argument and cw_sig_eintr for
- timeout-only case.
- * exceptions.cc (handle_sigsuspend): Use LARGE_NULL as second argument
- to distinguish between cancelable_wait variants.
- * thread.cc (pthread_mutex::lock): Ditto.
- (pthread::join): Ditto.
- (semaphore::_timedwait): Ditto.
- * thread.h (fast_mutex::lock): Ditto.
- * wait.cc (wait4): Ditto.
-
-2012-06-18 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygwait.cc (cancelable_wait): Mimic old cygwait behavior more closely
- wrt handling of call_signal_handler.
- * cygwait.h (WAIT_CANCELED): Move here and redefine.
- (WAIT_SIGNALED): Ditto.
- * thread.h (WAIT_CANCELED): Delete.
- (WAIT_SIGNALED): Ditto.
-
-2012-06-18 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (init_cygheap::init_installation_root): Rearrange code
- creating valid native NT installation_root path. Only strip last
- backslash from path if the result is a valid NT path. Explain why.
-
-2012-06-17 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- Add '#include "cygwait.h"' throughout, where appropriate.
- * DevNotes: Add entry cgf-000012.
- * Makefile.in (DLL_OFILES): Add cygwait.o.
- * sigproc.h: Remove cygwait definitions.
- * cygwait.h: New file. Define/declare Cygwin waitfor functions.
- * cygwait.cc: Ditto.
- * exceptions.cc: Include cygwait.h.
- (handle_sigsuspend): Accommodate change in cancelable_wait arguments.
- (sigpacket::process): Display thread tls in debugging output.
- * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use symbolic
- names for signal and cancel return.
- * fhandler_console.cc (fhandler_console::read): Ditto.
- (fhandler_dev_dsp::Audio_out::waitforspace): Ditto.
- fhandler_dev_dsp::Audio_in::waitfordata): Ditto.
- * fhandler_fifo.cc (fhandler_fifo::wait): Ditto.
- * fhandler_serial.cc (fhandler_serial::raw_read): Ditto.
- * fhandler_tty.cc (fhandler_pty_slave::read): Ditto.
- * select.cc (cygwin_select): Ditto.
- * wait.cc (wait4): Ditto.
- * thread.cc (cancelable_wait): Move definition to cygwait.h.
- (pthread_cond::wait): Accommodate change in cancelable_wait arguments.
- (pthread_mutex::lock): Ditto.
- (pthread_spinlock::lock): Ditto.
- (pthread::join): Ditto.
- (pthread::thread_init_wrapper): Display tls in debugging output.
- (semaphore::_timedwait): Ditto.
- * thread.h (cw_sig_wait): Move to cygwait.h.
- (cw_cancel_action): Delete.
- (cancelable_wait): Move declaration to cygwait.h.
-
-2012-06-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * regex/regcomp.c (p_ere): Allow vertical-line following
- left-parenthesis in ERE, as in glibc.
-
-2012-06-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * include/sys/elf_common.h (R_386_16): Define.
- (R_386_PC16): Define.
- (R_386_8): Define.
- (R_386_PC8): Define.
-
-2012-06-09 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * select.cc (cygwin_select): Remove select_timeout test.
- (select_stuff::wait): Return select_set_zero on timeout.
- (thread_socket): Report timeout when debugging.
-
-2012-06-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * include/elf.h: Update from FreeBSD.
- * include/machine/elf.h: New header, from FreeBSD.
- * include/sys/elf.h: Ditto.
- * include/sys/elf32.h: Update from FreeBSD.
- * include/sys/elf64.h: Ditto.
- * include/sys/elf_common.h: Ditto.
- (R_IA64_*): Define Linux-style names as aliases to R_IA_64_*.
- (R_SH_*): Define, based on sh-4 psABI.
- (R_390_*): Define, based on s390x psABI.
- * include/sys/elf_generic.h: Ditto.
-
-2012-06-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::link ): Translate
- STATUS_NOT_SUPPORTED to EPERM as well.
-
-2012-06-03 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * dtable.cc (dtable::dup3): Only return with lock set when O_EXCL flag
- is passed in.
- * syscalls.cc (dup_finish): Pass O_EXCL in flags to dtable::dup3.
-
-2012-06-03 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000011.
- * fhandler.h (fhandler_base::refcnt): Delete.
- (fhandler_base::inc_refcnt): New function.
- (fhandler_base::dec_refcnt): New function.
- * cygheap.h (cygheap_fdnew::~cygheap_fdnew): Accommodate split of
- refcnt to inc_refcnt/dec_refcnt.
- (cygheap_fdget::cygheap_fdget): Ditto.
- (cygheap_fdget::~cygheap_fdget::cygheap_fdget): Ditto.
- * dtable.cc (dtable::release): Ditto.
- (cygwin_attach_handle_to_fd): Ditto.
- (dtable::init_std_file_from_handle): Ditto.
- (dtable::dup3): On success, return with fdtab locked.
- * dtable.h (dtable): Add dup_finish as a friend.
- * syscalls.cc (dup_finish): Define new function. Increment refcnt
- while fdtab is locked.
- (dup2): Use common dup_finish() to perform dup operation.
- (dup3): Ditto.
-
-2012-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * globals.cc (ro_u_refs): New R/O unicode string.
- * mount.cc (fs_info::update): Recognize ReFS.
- * mount.h (enum fs_info_type): Add refs.
- (class fs_info): Add refs flag and accessor methods.
- * ntdll.h (RtlAddAccessAllowedAceEx): Declare.
- (RtlAddAccessDeniedAceEx): Declare.
- * path.h (path_conv::fs_is_refs): Define.
- * sec_helper.cc (_recycler_sd): New function to create security
- descriptors suitable for the recycler bin starting with Vista.
- * security.cc (add_access_allowed_ace): Use RtlAddAccessAllowedAceEx
- and drop code to set AceFlags explicitely.
- (add_access_denied_ace): Use RtlAddAccessDeniedAceEx and drop code to
- set AceFlags explicitely.
- * security.h (_recycler_sd): Declare.
- (recycler_sd): Define.
- * syscalls.cc (desktop_ini): Change formatting.
- (desktop_ini_ext): Define third line of recycler desktop.ini file
- since Vista,
- (try_to_bin): Handle ReFS just like NTFS. Write Vista and later
- Recycler in all uppercase, just like shell32 does when recreating it.
- Fix comments to include ReFS. Don't implicitely reuse object
- attributes from earlier NtOpenFile call, rather recreate it for safety.
- Use recycler_sd call when creating security descriptor for Recycler
- dirs and files on Vista and later. Write third line of desktop.ini
- when on Vista and later.
-
-2012-06-03 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * winbase.h: Add missing copyright date.
-
-2012-06-03 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * select.cc (cygwin_select): Make sure that we only return -1 as an
- error return.
- (select_stuff::wait): Semi-revert to previous method for filling out
- w4.
-
-2012-06-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * select.cc (cygwin_select): Add some comments.
- (select_stuff::wait): Ditto.
-
-2012-06-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000010.
- * select.cc (set_handle_or_return_if_not_open): Remove unneeded final
- backslash from definition.
- (cygwin_select): Reorganize to incorporate outer retry loop. Move
- remaining time recalculation here for retry case. Use
- select_stuff::wait_states for loop control.
- (select_stuff::cleanup): Avoid unneeded initialization.
- (select_stuff::wait): Modify definition to return
- select_stuff::wait_states. Eliminate is_cancelable. Don't inspect
- element 1 of an array if it is a cancel handle. Remove loop. Rely on
- being called from enclosing loop in cygwin_select. Remove time
- recalculation when restarting. Try harder to always return from the
- bottom.
- * select.h (select_stuff::wait_state): New enum.
- (select_stuff::wait): Modify declaration to return
- select_stuff::wait_states.
-
-2012-06-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * exceptions.cc (setup_handler): Make debugging output a little more
- verbose.
-
-2012-06-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygtls.h (_cygtls::protect_linked_list): Delete unused field.
-
-2012-05-30 Corinna Vinschen <corinna@vinschen.de>
-
- * hookapi.cc (find_first_notloaded_dll): Extend comment. Fix usage of
- mapped memory. Shorten static library name buffer to MAX_PATH. Use
- strlcpy to copy library name to buffer. Only Unmap "map" if it has been
- Mapped before.
- * pinfo.cc (status_exit): Drop unneeded declaration of
- find_first_notloaded_dll in favor of the declaration in winsup.h.
-
-2012-05-30 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc: Remove temporary newlib workaround, now that newlib
- handles thread cancellation by itself.
- (class __cygwin_lock_handler): Remove.
- (__cygwin_lock_cleanup): Remove.
- (__cygwin_lock_lock): Revert newlib workaround,
- (__cygwin_lock_trylock): Ditto.
- (__cygwin_lock_unlock): Ditto.
- (pthread::pop_cleanup_handler): Ditto.
-
-2012-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (select_stuff::wait): Temporarily disable restarting
- entirely.
-
-2012-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (cygsidlist::+=): Correctly copy well_known_sid info from
- source cygsid.
-
-2012-05-25 Corinna Vinschen <corinna@vinschen.de>
-
- * registry.cc (reg_key::build_reg): Fix typo in debug output.
-
-2012-05-25 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (select_stuff::wait): When not returning after receiving
- a signal, recalculate timeout. Apply temporary fix to avoid crashes
- after calling the signal handler. Explain.
-
-2012-05-25 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc (fhandler_serial::raw_read): Check for
- ERROR_OPERATION_ABORTED rather than ERROR_IO_INCOMPLETE after CancelIo.
-
-2012-05-25 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc (fhandler_serial::raw_read): Just call ReadFile
- directly in case of non-blocking I/O and handle result gracefully.
-
-2012-05-24 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (__cygwin_lock_lock): Replace null thread check with test
- for cygwin_finished_initializing to handle process startup.
- (__cygwin_lock_trylock): Ditto.
- (__cygwin_lock_unlock): Ditto.
-
-2012-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (__cygwin_lock_lock): Take null thread at process startup
- into account.
- (__cygwin_lock_trylock): Ditto.
- (__cygwin_lock_unlock): Ditto.
-
-2012-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread::cancel): Re-allow asynchronous cancellation from
- Cygwin code since it looks like the problem is Windows only.
-
-2012-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc: Add a temporary workaround to help Cygwin along while
- newlib doesn't install cleanup handlers. Explain the problem.
- (class __cygwin_lock_handler): New class.
- (__cygwin_lock_cleanup): New function.
- (__cygwin_lock_lock): Push __cygwin_lock_cleanup thread cleanup
- handler.
- (__cygwin_lock_trylock): Ditto.
- (__cygwin_lock_unlock): Pop thread cleanup handler.
- (pthread::pop_cleanup_handler): Temporarily allow cleanup function to
- destroy cleanup handler so we can pop in another function than we
- pushed in.
-
-2012-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread::cancel): Only allow asynchronous cancellation
- if the thread is not executing Cygwin or Windows code. Explain why.
-
-2012-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread::precreate): Make sure mutex is recursive.
- Explain why.
-
-2012-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread::pop_cleanup_handler): Move setting the cancelstate
- to PTHREAD_CANCEL_DISABLE from here...
- (pthread::pop_all_cleanup_handlers): ...to here, otherwise any explicit
- call to pthread_cleanup_pop disables cancellation for this thread.
-
-2012-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (refcnt): Add i interlocked. Explain why.
- * winbase.h (ilockadd): New function.
- (InterlockedAdd): Define as ilockadd.
-
-2012-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.in: Fix native name of /dev/kmem.
- * devices.cc: Regenerate.
- * dtable.cc (fh_alloc): Don't forget FH_KMEM.
- * fhandler_mem.cc (fhandler_dev_mem::open): Set errno to EACCES rather
- than ENOENT on systems not granting access to physical memory from
- user space.
-
-2012-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread::cancel): Set thread's cancel_event in
- PTHREAD_CANCEL_ASYNCHRONOUS case, too. Explain why.
-
-2012-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * strace.cc (strace::activate): Move printing heap size from here...
- * heap.cc (heap_init_info): ...to here. Explain why. Print heap
- size in hex and decimal.
-
-2012-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_recvfrom): Don't shortcircuit if len == 0. Add comment
- to explain why.
- (cygwin_recv): Ditto.
- (cygwin_recvmsg): Ditto.
-
-2012-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (path_conv::isgood_inode): Rearrange, take
- Samba versions >= 3.5.4 into account, add comments.
-
-2012-05-16 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000009.
- * smallprint.cc (__small_vsprintf): Always treat '%c' and '%C' as
- characters. Don't decode them if they are > 127.
- (__small_vswprintf): Ditto.
-
-2012-05-15 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000008.
- * fhandler_tty.cc (bytes_available): Simplify by returning the number
- of bytes available in the message unless that is zero.
-
-2012-05-14 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
-
-2012-05-14 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000007.
- * child_info.h (child_info_spawn::parent_winpid): Declare new field.
- (child_info_spawn::get_parent_handle): Declare new function.
- * dcrt0.cc (child_info_spawn::get_parent_handle): Define new function.
- (child_info_spawn::handle_spawn): Recreate parent handle if possible
- when dynamically loaded. Don't mess with parent handle if it's NULL.
- * spawn.cc (child_info_spawn::worker): Set parent_winpid appropriately.
-
-2012-05-12 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000006.
- * thread.cc (pthread::pop_cleanup_handler): Set cancel state to
- disabled to avoid recursively waiting for cancel.
-
-2012-05-12 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000005.
- * fhandler.h (PIPE_ADD_PID): Redefine to something we actually DON'T
- use.
- * pipe.cc (fhandler_pipe::create): Avoid clearing all open_mode bits
- when checking for PIPE_ADD_PID. Properly keep track of len so that
- passed in name is not overwritten.
-
-2012-05-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * cygwin.din (memrchr): Export.
- * posix.sgml (std-gnu): Add memrchr.
- * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
-
-2012-05-10 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 16.
-
-2012-05-08 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000004.
- * pinfo.cc (pinfo::init): Reuse shared memory if the state is marked
- with PID_REAPED.
- * spawn.cc (child_info_spawn::worker): Don't duplicate myself_pinfo
- into non-cygwin child.
-
- * fork.cc (frok::parent): Improve error output.
-
-2012-05-07 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000003.
- * cygheap.h (init_cygheap::pid_handle): Delete.
- * dcrt0.cc (child_info_spawn::handle_spawn): Keep parent open if we
- have execed.
- * pinfo.cc (pinfo::thisproc): Remove pid_handle manipulations.
- (pinfo::init): Don't consider a reaped process to be available.
- * spawn.cc (child_info_spawn::worker): Remove pid_handle manipulations.
- Make wr_proc_pipe and parent noninheritable when starting a program
- which doesn't use the Cygwin DLL. Conditionally reset wr_proc_pipe to
- inheritable if CreateProcess fails. Inject wr_proc_pipe handle into
- non-Cygwin process. Consider a non-cygwin process to be 'synced'.
-
-2012-05-03 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: Add entry cgf-000002.
- * fhandler_tty.cc (bytes_available): Revert to previous Oct-2011
- behavior where a dummy buffer is used to determine how many bytes will
- be read.
- (fhandler_pty_master::ioctl): Correct coercion in assignment.
-
-2012-05-03 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (get_adapters_addresses): Only create thread on affected
- systems. Change comment acordingly.
- * wincap.h (wincaps::has_gaa_largeaddress_bug): New element.
- * wincap.cc: Implement above element throughout.
- (wincap_8): New globale wincaps to support Windows 8.
- (wincapc::init): Take Windows 8 into account. Set new
- has_gaa_largeaddress_bug member to false on 32 bit systems.
-
-2012-05-02 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * DevNotes: New file. Add entry cgf-000001.
- * sigproc.cc (proc_terminate): Don't set parent pid of child to 1 if
- we've execed since the execed process is still considered the parent.
-
- * child_info.h: Bump copyright.
-
-2012-05-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fenv.cc (fesetround): Fix test for valid input parameter.
- (fesetprec): Ditto.
-
-2012-04-30 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler.h (PIPE_ADD_PID): Define new flag.
- * pipe.cc (fhandler_pipe::create): Don't indiscriminately add process
- id to every pipe since some pipe names (fifo, tty) don't need it.
- * sigproc.cc (sigproc_init): Pass PIPE_ADD_PID to fhandler_pipe::create
- to ensure that pid is always part of sigwait pipe name.
-
-2012-04-28 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * environ.cc (struct parse_thing): Add "pipe_byte" option.
- * globals.cc (pipe_byte): Declare.
- * pipe.cc (fhandler_pipe::create): Use current process id in pipe name
- rather than pid for simple name collision avoidance. Do this only once
- to avoid extra overhead when a busy pipe is found. Honor pipe_byte to
- create non-message pipes if set.
- * sigproc.cc (sigproc_init): Use a specific name for the signal pipe.
-
-2012-04-27 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (find_fast_cwd_pointer): Fix for W8 CP 32 bit.
-
-2012-04-25 Thomas Wolff <towo@towo.net>
-
- * fhandler.h (class dev_console): Add member ext_mouse_mode5.
- * fhandler_console.cc (fhandler_console::read): Implement extended
- mouse mode 1005 (xterm, mintty).
- Fix actual mouse reporting for large coordinates.
-
-2012-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 15.
-
-2012-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_console.cc (ALT_PRESSED): Define earlier, never undefine.
- (CTRL_PRESSED): Ditto.
- (fhandler_console::read): Simplify expressions testing for pressed ALT
- or CTRL modifier keys.
- (get_nonascii_key): Ditto.
-
-2012-04-24 Thomas Wolff <towo@towo.net>
-
- * fhandler.h (class dev_console): Add members ext_mouse_mode6 and
- ext_mouse_mode15.
- * fhandler_console.cc (fhandler_console::read): Implement extended
- mouse modes 1015 (urxvt, mintty, xterm) and 1006 (xterm). Recognize,
- but don't implement extended mouse mode 1005 (xterm, mintty).
- Support mouse coordinates greater than 222 (each axis). Fix formatting.
- (fhandler_console::char_command): Initialize enhanced mouse reporting
- modes.
-
-2012-04-21 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * dtable.cc (fh_alloc): Only disallow opening of nonexistent on-disk
- device.
- * path.cc (path_conv::check): Remove PATH_KEPT_HANDLE setting.
- * path.h (path_types): Remove PATH_KEPT_HANDLE.
- (path_conv::kept_handle): Delete now-unneeded function.
-
-2012-04-19 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * dtable.cc (fh_alloc): Keep fh which was flagged as error if it is for
- an on-disk device and we were stating it.
- * path.cc (path_conv::check): Set PATH_KEPT_HANDLE.
- * path.h (path_types): Add PATH_KEPT_HANDLE.
- (path_conv::kept_handle): Implement.
-
-2012-04-18 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler.h (fhandler_base::nohandle): Revert to standard
- implementation.
- * dtable.cc (dtable::fixup_after_exec): Specifically reject releasing
- nohandle() type fhandlers rather than relying on contents of io_handle.
- (dtable::fixup_after_fork): Ditto.
- * fhandler_termios.cc: Add includes necessary for definitions of
- have_execed and have_execed_cygwin.
- (fhandler_termios::sigflush): Don't flush console input when we've
- started a non-Cygwin process.
-
-2012-04-15 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * wincap.h: Rename assitant to assistant throughout.
- * wincap.cc: Ditto.
- * devices.in (exists_console): Use fhandler_console::exists () rather
- than raw test.
- * devices.cc: Regenerate.
- * fhandler.h (fhandler_console::exists): Define new function.
- * fhandler_console.cc (fhandler_console::need_invisible): Use
- fhandler_console::exists () rather than raw test.
- * spawn.cc: Rename assitant to assistant throughout.
- (child_info_spawn::worker): Simplify test for when to start a
- non-Cygwin process in its own process group. Just do it whenever we
- start a non-Cygwin process.
-
-2012-04-12 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * devices.in (exists_console): Allow /dev/con{sole,in,out} to be
- referenced if a console exists.
- * devices.cc: Regenerate.
- * fhandler_console.cc (fhandler_console::set_unit): Ditto.
-
-2012-04-11 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (fhandler_base::stat_fixup): Fix inode numbers of
- non-device files in virtual fileysystems.
-
-2012-04-07 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * dtable.cc (cygwin_attach_handle_to_fd): Defend against NULL return
- from build_fh_*.
- (dtable::init_std_file_from_handle): Ditto.
- * mmap.cc (mmap_record::alloc_fh): Ditto.
- * path.cc (path_conv::check): Ditto.
-
-2012-04-06 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler.h (fhandler_base::nohandle): Implement "by hand" rather than
- through macro. Set io_handle to INVALID_HANDLE_VALUE when setting flag
- to true.
-
-2012-04-06 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * path.c (path_conv::check): Avoid directly referencing fields of the
- dev structure when it can be easily avoided.
-
-2012-04-05 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 14.
-
-2012-04-05 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc (pwdgrp::read_passwd): Fix pretty_ls entry typo contain
- the required number of colons.
-
-2012-04-04 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * fhandler.h (fhandler_pty_common::bytes_available): Declare new
- function.
- (fhandler_pty_master::flush_to_slave): Ditto.
- * fhandler_tty.cc (bytes_available): Define new function.
- (fhandler_pty_common::bytes_available): Ditto.
- (handler_pty_master::flush_to_slave): Ditto.
- (fhandler_pty_master::process_slave_output): Call flush_to_slave ()
- here. Use bytes_available () rather than PeekNamedPipe. Clean up
- sloppy logic.
- (fhandler_pty_slave::read): Use bytes_available () rather than
- PeekNamedPipe.
- (fhandler_pty_slave::ioctl): Ditto.
- (fhandler_pty_master::ioctl): Ditto.
- (fhandler_pty_master::cleanup): Remove ancient #if 0.
- * select.cc (peek_pipe): Call flush_to_slave whenever we're checking
- for a pty master.
-
-2012-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_nodevice.cc (fhandler_nodevice::open): Convert EROFS to
- ENOENT if non-existent file got opened for reading only. Explain why.
- * path.cc (path_conv::check): Stick to ENOENT if file has been opened
- for informational purposes only. Add to comment.
-
-2012-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Convert device type to FH_FS for
- non-existent files on /dev, unless /dev itself doesn't exist on disk.
- Add comment to explain why.
-
-2012-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * hookapi.cc (rvadelta): Compute max_size using SizeOfRawData rather
- than VirtualSize.
-
-2012-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc (_getpass_close_fd): New static pthread cleanup handler.
- (getpass): Rework to use /dev/tty in the first place. Install
- _getpass_close_fd as pthread cleanup handler. Flush prompt explicitely.
- Lock input and switch off signal input handling when reading password.
-
-2012-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 13.
-
2012-04-03 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (fhandler_base::stat_fixup): Replace string comparison
@@ -2077,7 +849,7 @@
2012-02-13 Corinna Vinschen <corinna@vinschen.de>
- * Makefile.in (clean): Remove non-existent regexp dir.
+ * Makefile.in (clean): Remove non-existant regexp dir.
* collate.h: New header.
(__collate_range_cmp): Declare.
@@ -2354,7 +1126,7 @@
* fhandler.h (fhandler_fifo::arm): Declare new function.
* fhandler_fifo.cc (fhandler_fifo::arm): Define new function.
(fhandler_fifo::open): Fix handling of RDWR pipes to avoid opening a
- second handle. Use arm() function to set events.
+ second handle. Use arm() function to set events.
(fhandler_fifo::raw_read): Correctly go into "connect again logic" when
we detect another writer is available. Use arm() function to set event.
* pipe.cc (fhandler_pipe::create): Add more detail to debugging output.
diff --git a/winsup/cygwin/DevNotes b/winsup/cygwin/DevNotes
deleted file mode 100644
index 68d8320cd..000000000
--- a/winsup/cygwin/DevNotes
+++ /dev/null
@@ -1,385 +0,0 @@
-2012-08-09 cgf-000014
-
-So, apparently I got it somewhat right before wrt signal handling.
-Checking on linux, it appears that signals will be sent to a thread
-which can accept the signal. So resurrecting and extending the
-"find_tls" function is in order. This function will return the tls
-of any thread which 1) is waiting for a signal with sigwait*() or
-2) has the signal unmasked.
-
-In redoing this it became obvious that I had the class designation wrong
-for the threadlist handling so I moved the manipulation of the global
-threadlist into the cygheap where it logically belongs.
-
-2012-07-21 cgf-000013
-
-These changes reflect a revamp of the "wait for signal" functionality
-which has existed in Cygwin through several signal massages.
-
-We now create a signal event only when a thread is waiting for a signal
-and arm it only for that thread. The "set_signal_arrived" function is
-used to establish the event and set it in a location referencable by
-the caller.
-
-I still do not handle all of the race conditions. What happens when
-a signal comes in just after a WF?O succeeds for some other purpose? I
-suspect that it will arm the next WF?O call and the subsequent call to
-call_signal_handler could cause a function to get an EINTR when possibly
-it shouldn't have.
-
-I haven't yet checked all of the test cases for the URL listed in the
-previous entry.
-
-Baby steps.
-
-2012-06-12 cgf-000012
-
-These changes are the preliminary for redoing the way threads wait for
-signals. The problems are shown by the test case mentioned here:
-
-http://cygwin.com/ml/cygwin/2012-05/msg00434.html
-
-I've known that the signal handling in threads wasn't quite right for
-some time. I lost all of my thread signal tests in the great "rm -r"
-debacle of a few years ago and have been less than enthusiastic about
-redoing everything (I had PCTS tests and everything). But it really is
-time to redo this signal handling to make it more like it is supposed to
-be.
-
-This change should not introduce any new behavior. Things should
-continue to behave as before. The major differences are a change in the
-arguments to cancelable_wait and cygwait now uses cancelable_wait and,
-so, the returns from cygwait now mirror cancelable_wait.
-
-The next change will consolidate cygwait and cancelable_wait into one
-cygwait function.
-
-2012-06-02 cgf-000011
-
-The refcnt handling was tricky to get right but I had convinced myself
-that the refcnt's were always incremented/decremented under a lock.
-Corinna's 2012-05-23 change to refcnt exposed a potential problem with
-dup handling where the fdtab could be updated while not locked.
-
-That should be fixed by this change but, on closer examination, it seems
-like there are many places where it is possible for the refcnt to be
-updated while the fdtab is not locked since the default for
-cygheap_fdget is to not lock the fdtab (and that should be the default -
-you can't have read holding a lock).
-
-Since refcnt was only ever called with 1 or -1, I broke it up into two
-functions but kept the Interlocked* operation. Incrementing a variable
-should not be as racy as adding an arbitrary number to it but we have
-InterlockedIncrement/InterlockedDecrement for a reason so I kept the
-Interlocked operation here.
-
-In the meantime, I'll be mulling over whether the refcnt operations are
-actually safe as they are. Maybe just ensuring that they are atomically
-updated is enough since they control the destruction of an fh. If I got
-the ordering right with incrementing and decrementing then that should
-be adequate.
-
-2012-06-02 cgf-000010
-
-<1.7.16>
-- Fix emacs problem which exposed an issue with Cygwin's select() function.
- If a signal arrives while select is blocking and the program longjmps
- out of the signal handler then threads and memory may be left hanging.
- Fixes: http://cygwin.com/ml/cygwin/2012-05/threads.html#00275
-</1.7.16>
-
-This was try #4 or #5 to get select() signal handling working right.
-It's still not there but it should now at least not leak memory or
-threads.
-
-I mucked with the interface between cygwin_select and select_stuff::wait
-so that the "new" loop in select_stuff::wait() was essentially moved
-into the caller. cygwin_select now uses various enum states to decide
-what to do. It builds the select linked list at the beginning of the
-loop, allowing wait() to tear everything down and restart. This is
-necessary before calling a signal handler because the signal handler may
-longjmp away.
-
-I initially had this all coded up to use a special signal_cleanup
-callback which could be called when a longjmp is called in a signal
-handler. And cygwin_select() set up and tore down this callback. Once
-I got everything compiling it, of course, dawned on me that just because
-you call a longjmp in a signal handler it doesn't mean that you are
-jumping *out* of the signal handler. So, if the signal handler invokes
-the callback and returns it will be very bad for select(). Hence, this
-slower, but hopefully more correct implementation.
-
-(I still wonder if some sort of signal cleanup callback might still
-be useful in the future)
-
-TODO: I need to do an audit of other places where this problem could be
-occurring.
-
-As alluded to above, select's signal handling is still not right. It
-still acts as if it could call a signal handler from something other
-than the main thread but, AFAICT, from my STC, this doesn't seem to be
-the case. It might be worthwhile to extend cygwait to just magically
-figure this out and not even bother using w4[0] for scenarios like this.
-
-2012-05-16 cgf-000009
-
-<1.7.16>
-- Fix broken console mouse handling. Reported here:
- http://cygwin.com/ml/cygwin/2012-05/msg00360.html
-</1.7.16>
-
-I did a cvs annotate on smallprint.cc and see that the code to translate
-%characters > 127 to 0x notation was in the 1.1 revision. Then I
-checked the smallprint.c predecessor. It was in the 1.1 version of that
-program too, which means that this odd change has probably been around
-since <= 2000.
-
-Since __small_sprintf is supposed to emulate sprintf, I got rid of the
-special case handling. This may affect fhandler_socket::bind. If so, we
-should work around this problem there rather than keeping this strange
-hack in __small_printf.
-
-2012-05-14 cgf-000008
-
-<1.7.16>
-- Fix hang when zero bytes are written to a pty using
- Windows WriteFile or equivalent. Fixes:
- http://cygwin.com/ml/cygwin/2012-05/msg00323.html
-</1.7.16>
-
-cgf-000002, as usual, fixed one thing while breaking another. See
-Larry's predicament in: http://goo.gl/oGEr2 .
-
-The problem is that zero byte writes to the pty pipe caused the dread
-end-of-the-world-as-we-know-it problem reported on the mailing list
-where ReadFile reads zero bytes even though there is still more to read
-on the pipe. This is because that change caused a 'record' to be read
-and a record can be zero bytes.
-
-I was never really keen about using a throwaway buffer just to get a
-count of the number of characters available to be read in the pty pipe.
-On closer reading of the documentation for PeekNamedPipe it seemed like
-the sixth argument to PeekNamedPipe should return what I needed without
-using a buffer. And, amazingly, it did, except that the problem still
-remained - a zero byte message still screwed things up.
-
-So, we now detect the case where there is zero bytes available as a
-message but there are bytes available in the pipe. In that scenario,
-return the bytes available in the pipe rather than the message length of
-zero. This could conceivably cause problems with pty pipe handling in
-this scenario but since the only way this scenario could possibly happen
-is when someone is writing zero bytes using WriteFile to a pty pipe, I'm
-ok with that.
-
-2012-05-14 cgf-000007
-
-<1.7.16>
-- Fix invocation of strace from a cygwin process. Fixes:
- http://cygwin.com/ml/cygwin/2012-05/msg00292.html
-</1.7.16>
-
-The change in cgf-000004 introduced a problem for processes which load
-cygwin1.dll dynamically. strace.exe is the most prominent example of
-this.
-
-Since the parent handle is now closed for "non-Cygwin" processes, when
-strace.exe tried to dynamically load cygwin1.dll, the handle was invalid
-and child_info_spawn::handle_spawn couldn't use retrieve information
-from the parent. This eventually led to a strace_printf error due to an
-attempt to dereference an unavailable cygheap. Probably have to fix
-this someday. You shouldn't use the cygheap while attempting to print
-an error about the inavailability of said cygheap.
-
-This was fixed by saving the parent pid in child_info_spawn and calling
-OpenProcess for the parent pid and using that handle iff a process is
-dynamically loaded.
-
-2012-05-12 cgf-000006
-
-<1.7.16>
-- Fix hang when calling pthread_testcancel in a canceled thread.
- Fixes some of: http://cygwin.com/ml/cygwin/2012-05/msg00186.html
-</1.7.16>
-
-This should fix the first part of the reported problem in the above
-message. The cancel seemed to actually be working but, the fprintf
-eventually ended up calling pthread_testcancel. Since we'd gotten here
-via a cancel, it tried to recursively call the cancel handler causing a
-recursive loop.
-
-2012-05-12 cgf-000005
-
-<1.7.16>
-- Fix pipe creation problem which manifested as a problem creating a
-fifo. Fixes: http://cygwin.com/ml/cygwin/2012-05/msg00253.html
-</1.7.16>
-
-My change on 2012-04-28 introduced a problem with fifos. The passed
-in name was overwritten. This was because I wasn't properly keeping
-track of the length of the generated pipe name when there was a
-name passed in to fhandler_pipe::create.
-
-There was also another problem in fhandler_pipe::create. Since fifos
-use PIPE_ACCESS_DUPLEX and PIPE_ACCESS_DUPLEX is an or'ing of
-PIPE_ACCESS_INBOUND and PIPE_ACCESS_OUTBOUND, using PIPE_ACCESS_OUTBOUND
-as a "never-used" option for PIPE_ADD_PID in fhandler.h was wrong. So,
-fifo creation attempted to add the pid of a pipe to the name which is
-wrong for fifos.
-
-2012-05-08 cgf-000004
-
-The change for cgf-000003 introduced a new problem:
-http://cygwin.com/ml/cygwin/2012-05/msg00154.html
-http://cygwin.com/ml/cygwin/2012-05/msg00157.html
-
-Since a handle associated with the parent is no longer being duplicated
-into a non-cygwin "execed child", Windows is free to reuse the pid of
-the parent when the parent exits. However, since we *did* duplicate a
-handle pointing to the pid's shared memory area into the "execed child",
-the shared memory for the pid was still active.
-
-Since the shared memory was still available, if a new process reuses the
-previous pid, Cygwin would detect that the shared memory was not created
-and had a "PID_REAPED" flag. That was considered an error, and, so, it
-would set procinfo to NULL and pinfo::thisproc would die since this
-situation is not supposed to occur.
-
-I fixed this in two ways:
-
-1) If a shared memory region has a PID_REAPED flag then zero it and
-reuse it. This should be safe since you are not really supposed to be
-querying the shared memory region for anything after PID_REAPED has been
-set.
-
-2) Forego duping a copy of myself_pinfo if we're starting a non-cygwin
-child for exec.
-
-It seems like 2) is a common theme and an audit of all of the handles
-that are being passed to non-cygwin children is in order for 1.7.16.
-
-The other minor modification that was made in this change was to add the
-pid of the failing process to fork error output. This helps slightly
-when looking at strace output, even though in this case it was easy to
-find what was failing by looking for '^---' when running the "stv"
-strace dumper. That found the offending exception quickly.
-
-2012-05-07 cgf-000003
-
-<1.7.15>
-Don't make Cygwin wait for all children of a non-cygwin child program.
-Fixes: http://cygwin.com/ml/cygwin/2012-05/msg00063.html,
- http://cygwin.com/ml/cygwin/2012-05/msg00075.html
-</1.7.15>
-
-This problem is due to a recent change which added some robustness and
-speed to Cygwin's exec/spawn handling by not trying to force inheritance
-every time a process is started. See ChangeLog entries starting on
-2012-03-20, and multiple on 2012-03-21.
-
-Making the handle inheritable meant that, as usual, there were problems
-with non-Cygwin processes. When Cygwin "execs" a non-Cygwin process N,
-all of its N + 1, N + 2, ... children will also inherit the handle.
-That means that Cygwin will wait until all subprocesses have exited
-before it returns.
-
-I was willing to make this a restriction of starting non-Cygwin
-processes but the problem with allowing that is that it can cause the
-creation of a "limbo" pid when N exits and N + 1 and friends are still
-around. In this scenario, Cygwin dutifully notices that process N has
-died and sets the exit code to indicate that but N's parent will wait on
-rd_proc_pipe and will only return when every N + ... windows process
-has exited.
-
-The removal of cygheap::pid_handle was not related to the initial
-problem that I set out to fix. The change came from the realization
-that we were duping the current process handle into the child twice and
-only needed to do it once. The current process handle is used by exec
-to keep the Windows pid "alive" so that it will not be reused. So, now
-we just close parent in child_info_spawn::handle_spawn iff we're not
-execing.
-
-In debugging this it bothered me that 'ps' identified a nonactive pid as
-active. Part of the reason for this was the 'parent' handle in
-child_info was opened in non-Cygwin processes, keeping the pid alive.
-That has been kluged around (more changes after 1.7.15) but that didn't
-fix the problem. On further investigation, this seems to be caused by
-the fact that the shared memory region pid handles were still being
-passed to non-cygwin children, keeping the pid alive in a limbo-like
-fashion. This was easily fixed by having pinfo::init() consider a
-memory region with PID_REAPED as not available. A more robust fix
-should be considered for 1.7.15+ where these handles are not passed
-to non-cygwin processes.
-
-This fixed the problem where a pid showed up in the list after a user
-does something like: "bash$ cmd /c start notepad" but, for some reason,
-it does not fix the problem where "bash$ setsid cmd /c start notepad".
-That bears investigation after 1.7.15 is released but it is not a
-regression and so is not a blocker for the release.
-
-2012-05-03 cgf-000002
-
-<1.7.15>
-Fix problem where too much input was attempted to be read from a
-pty slave. Fixes: http://cygwin.com/ml/cygwin/2012-05/msg00049.html
-</1.7.15>
-
-My change on 2012/04/05 reintroduced the problem first described by:
-http://cygwin.com/ml/cygwin/2011-10/threads.html#00445
-
-The problem then was, IIRC, due to the fact that bytes sent to the pty
-pipe were not written as records. Changing pipe to PIPE_TYPE_MESSAGE in
-pipe.cc fixed the problem since writing lines to one side of the pipe
-caused exactly that the number of characters to be read on the other
-even if there were more characters in the pipe.
-
-To debug this, I first replaced fhandler_tty.cc with the 1.258,
-2012/04/05 version. The test case started working when I did that.
-
-So, then, I replaced individual functions, one at a time, in
-fhandler_tty.cc with their previous versions. I'd expected this to be a
-problem with fhandler_pty_master::process_slave_output since that had
-seen the most changes but was surprised to see that the culprit was
-fhandler_pty_slave::read().
-
-The reason was that I really needed the bytes_available() function to
-return the number of bytes which would be read in the next operation
-rather than the number of bytes available in the pipe. That's because
-there may be a number of lines available to be read but the number of
-bytes which will be read by ReadFile should reflect the mode of the pty
-and, if there is a line to read, only the number of bytes in the line
-should be seen as available for the next read.
-
-Having bytes_available() return the number of bytes which would be read
-seemed to fix the problem but it could subtly change the behavior of
-other callers of this function. However, I actually think this is
-probably a good thing since they probably should have been seeing the
-line behavior.
-
-2012-05-02 cgf-000001
-
-<1.7.15>
-Fix problem setting parent pid to 1 when process with children execs
-itself. Fixes: http://cygwin.com/ml/cygwin/2012-05/msg00009.html
-</1.7.15>
-
-Investigating this problem with strace showed that ssh-agent was
-checking the parent pid and getting a 1 when it shouldn't have. Other
-stuff looked ok so I chose to consider this a smoking gun.
-
-Going back to the version that the OP said did not have the problem, I
-worked forward until I found where the problem first occurred -
-somewhere around 2012-03-19. And, indeed, the getppid call returned the
-correct value in the working version. That means that this stopped
-working when I redid the way the process pipe was inherited around
-this time period.
-
-It isn't clear why (and I suspect I may have to debug this further at
-some point) this hasn't always been a problem but I made the obvious fix.
-We shouldn't have been setting ppid = 1 when we're about to pass off to
-an execed process.
-
-As I was writing this, I realized that it was necessary to add some
-additional checks. Just checking for "have_execed" isn't enough. If
-we've execed a non-cygwin process then it won't know how to deal with
-any inherited children. So, always set ppid = 1 if we've execed a
-non-cygwin process.
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 6e4282843..e65b44031 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -133,16 +133,16 @@ MALLOC_OFILES:=@MALLOC_OFILES@
DLL_IMPORTS:=$(w32api_lib)/libkernel32.a $(w32api_lib)/libntdll.a
MT_SAFE_OBJECTS:=
+# Please maintain this list in sorted order, with maximum files per 86 col line
#
DLL_OFILES:=advapi32.o assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o \
- cygthread.o cygtls.o cygwait.o cygxdr.o dcrt0.o debug.o devices.o \
- dir.o dlfcn.o dll_init.o dtable.o environ.o errno.o exceptions.o \
- exec.o external.o fcntl.o fenv.o fhandler.o fhandler_clipboard.o \
- fhandler_console.o fhandler_dev.o fhandler_disk_file.o fhandler_dsp.o \
- fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o fhandler_mem.o \
- fhandler_netdrive.o fhandler_nodevice.o fhandler_proc.o \
- fhandler_process.o fhandler_procnet.o fhandler_procsys.o \
- fhandler_procsysvipc.o fhandler_random.o fhandler_raw.o \
+ cygthread.o cygtls.o cygxdr.o dcrt0.o debug.o devices.o dir.o dlfcn.o \
+ dll_init.o dtable.o environ.o errno.o exceptions.o exec.o external.o \
+ fcntl.o fenv.o fhandler.o fhandler_clipboard.o fhandler_console.o \
+ fhandler_dev.o fhandler_disk_file.o fhandler_dsp.o fhandler_fifo.o \
+ fhandler_floppy.o fhandler_mailslot.o fhandler_mem.o fhandler_netdrive.o \
+ fhandler_nodevice.o fhandler_proc.o fhandler_process.o fhandler_procnet.o \
+ fhandler_procsys.o fhandler_procsysvipc.o fhandler_random.o fhandler_raw.o \
fhandler_registry.o fhandler_serial.o fhandler_socket.o fhandler_tape.o \
fhandler_termios.o fhandler_tty.o fhandler_virtual.o fhandler_windows.o \
fhandler_zero.o flock.o fnmatch.o fork.o fts.o ftw.o getopt.o glob.o \
@@ -237,7 +237,6 @@ ifneq "${filter -O%,$(CFLAGS)}" ""
cygheap_CFLAGS:=-fomit-frame-pointer
cygthread_CFLAGS:=-fomit-frame-pointer
cygtls_CFLAGS:=-fomit-frame-pointer
-cygwait_CFLAGS=-fomit-frame-pointer
delqueue_CFLAGS:=-fomit-frame-pointer
devices_CFLAGS:=-fomit-frame-pointer -Os
dir_CFLAGS:=-fomit-frame-pointer
@@ -271,12 +270,11 @@ fhandler_zero_CFLAGS:=-fomit-frame-pointer
flock_CFLAGS:=-fomit-frame-pointer
grp_CFLAGS:=-fomit-frame-pointer
libstdcxx_wrapper_CFLAGS:=-fomit-frame-pointer
-malloc_CFLAGS:=-fomit-frame-pointer -O3
+malloc_CFLAGS:=-fomit-frame-pointer
malloc_wrapper_CFLAGS:=-fomit-frame-pointer
miscfuncs_CFLAGS:=-fomit-frame-pointer
net_CFLAGS:=-fomit-frame-pointer
passwd_CFLAGS:=-fomit-frame-pointer
-path_CFLAGS=-fomit-frame-pointer
regcomp_CFLAGS=-fomit-frame-pointer
regerror_CFLAGS=-fomit-frame-pointer
regexec_CFLAGS=-fomit-frame-pointer
@@ -396,7 +394,7 @@ maintainer-clean realclean: clean
# Rule to build cygwin.dll
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(DLL_IMPORTS) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
- $(CXX) $(CXXFLAGS) -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
+ $(CXX) $(CXXFLAGS) -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) \
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
diff --git a/winsup/cygwin/advapi32.cc b/winsup/cygwin/advapi32.cc
index efc7c3873..47913a031 100644
--- a/winsup/cygwin/advapi32.cc
+++ b/winsup/cygwin/advapi32.cc
@@ -1,6 +1,6 @@
/* advapi32.cc: Win32 replacement functions.
- Copyright 2011, 2012 Red Hat, Inc.
+ Copyright 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -12,6 +12,7 @@ details. */
#include <winioctl.h>
#include "shared_info.h"
#include "ntdll.h"
+#include <wchar.h>
#define DEFAULT_NTSTATUS_TO_BOOL_RETURN \
if (!NT_SUCCESS (status)) \
@@ -88,7 +89,7 @@ ImpersonateLoggedOnUser (HANDLE tok)
DEFAULT_NTSTATUS_TO_BOOL_RETURN
}
-BOOL WINAPI
+BOOL
ImpersonateNamedPipeClient (HANDLE pipe)
{
IO_STATUS_BLOCK io;
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h
index eac40c247..36aac8ed1 100644
--- a/winsup/cygwin/child_info.h
+++ b/winsup/cygwin/child_info.h
@@ -1,6 +1,6 @@
/* child_info.h: shared child info for cygwin
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2011
Red Hat, Inc.
This file is part of Cygwin.
@@ -35,7 +35,7 @@ enum child_status
#define EXEC_MAGIC_SIZE sizeof(child_info)
/* Change this value if you get a message indicating that it is out-of-sync. */
-#define CURR_CHILD_INFO_MAGIC 0xf1378eabU
+#define CURR_CHILD_INFO_MAGIC 0xca644850U
#define NPROCS 256
@@ -66,7 +66,6 @@ public:
HANDLE subproc_ready; // used for synchronization with parent
HANDLE user_h;
HANDLE parent;
- DWORD parent_winpid;
DWORD cygheap_reserve_sz;
unsigned fhandler_union_cb;
DWORD exit_code; // process exit code
@@ -176,7 +175,6 @@ public:
lock->release ();
return !!hExeced;
}
- bool get_parent_handle ();
bool has_execed_cygwin () const { return iscygwin () && has_execed (); }
operator HANDLE& () {return hExeced;}
int worker (const char *, const char *const *, const char *const [], int,
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 639f4e662..bc96a5533 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -47,23 +47,6 @@ struct cygheap_entry
char data[0];
};
-class tls_sentry
-{
-public:
- static muto lock;
- int destroy;
- void init ();
- bool acquired () {return lock.acquired ();}
- tls_sentry () {destroy = 0;}
- tls_sentry (DWORD wait) {destroy = lock.acquire (wait);}
- ~tls_sentry () {if (destroy) lock.release ();}
-};
-
-muto NO_COPY tls_sentry::lock;
-static NO_COPY size_t nthreads;
-
-#define THREADLIST_CHUNK 256
-
#define NBUCKETS (sizeof (cygheap->buckets) / sizeof (cygheap->buckets[0]))
#define N0 ((_cmalloc_entry *) NULL)
#define to_cmalloc(s) ((_cmalloc_entry *) (((char *) (s)) - (unsigned) (N0->data)))
@@ -187,28 +170,18 @@ init_cygheap::init_installation_root ()
"GetModuleFileNameW(%p, %p, %u), %E",
cygwin_hmodule, installation_root, PATH_MAX);
PWCHAR p = installation_root;
- if (wcsncasecmp (p, L"\\\\", 2)) /* Normal drive letter path */
+ if (wcsncmp (p, L"\\\\?\\", 4)) /* No long path prefix. */
{
- p = wcpcpy (p, L"\\??\\");
- GetModuleFileNameW (cygwin_hmodule, p, PATH_MAX - 4);
- }
- else
- {
- bool unc = false;
- if (wcsncmp (p + 2, L"?\\", 2)) /* No long path prefix, so UNC path. */
+ if (!wcsncasecmp (p, L"\\\\", 2)) /* UNC */
{
p = wcpcpy (p, L"\\??\\UN");
GetModuleFileNameW (cygwin_hmodule, p, PATH_MAX - 6);
*p = L'C';
- unc = true;
}
- else if (!wcsncmp (p + 4, L"UNC\\", 4)) /* Native NT UNC path. */
- unc = true;
- if (unc)
+ else
{
- p = wcschr (p + 2, L'\\'); /* Skip server name */
- if (p)
- p = wcschr (p + 1, L'\\'); /* Skip share name */
+ p = wcpcpy (p, L"\\??\\");
+ GetModuleFileNameW (cygwin_hmodule, p, PATH_MAX - 4);
}
}
installation_root[1] = L'?';
@@ -227,13 +200,7 @@ init_cygheap::init_installation_root ()
if (!w)
api_fatal ("Can't initialize Cygwin installation root dir.\n"
"Invalid DLL path");
- /* If w < p, the Cygwin DLL resides in the root dir of a drive or network
- path. In that case, if we strip off yet another backslash, the path
- becomes invalid. We avoid that here so that the DLL also works in this
- scenario. The /usr/bin and /usr/lib default mounts will probably point
- to something non-existing, but that's life. */
- if (w > p)
- *w = L'\0';
+ *w = L'\0';
for (int i = 1; i >= 0; --i)
{
@@ -273,7 +240,6 @@ cygheap_init ()
cygheap->fdtab.init ();
if (!cygheap->sigs)
sigalloc ();
- cygheap->init_tls_list ();
}
/* Copyright (C) 1997, 2000 DJ Delorie */
@@ -563,84 +529,3 @@ cygheap_user::set_name (const char *new_name)
cfree_and_set (pdomain);
cfree_and_set (pwinname);
}
-
-void
-init_cygheap::init_tls_list ()
-{
- if (threadlist)
- memset (cygheap->threadlist, 0, cygheap->sthreads * sizeof (cygheap->threadlist[0]));
- else
- {
- sthreads = THREADLIST_CHUNK;
- threadlist = (_cygtls **) ccalloc_abort (HEAP_TLS, cygheap->sthreads,
- sizeof (cygheap->threadlist[0]));
- }
- tls_sentry::lock.init ("thread_tls_sentry");
-}
-
-void
-init_cygheap::add_tls (_cygtls *t)
-{
- cygheap->user.reimpersonate ();
- tls_sentry here (INFINITE);
- if (nthreads >= cygheap->sthreads)
- {
- threadlist = (_cygtls **)
- crealloc_abort (threadlist, (sthreads += THREADLIST_CHUNK)
- * sizeof (threadlist[0]));
- // memset (threadlist + nthreads, 0, THREADLIST_CHUNK * sizeof (threadlist[0]));
- }
-
- threadlist[nthreads++] = t;
-}
-
-void
-init_cygheap::remove_tls (_cygtls *t, DWORD wait)
-{
- tls_sentry here (wait);
- if (here.acquired ())
- {
- for (size_t i = 0; i < nthreads; i++)
- if (t == threadlist[i])
- {
- if (i < --nthreads)
- threadlist[i] = threadlist[nthreads];
- debug_only_printf ("removed %p element %d", this, i);
- break;
- }
- }
-}
-
-_cygtls *
-init_cygheap::find_tls (int sig)
-{
- debug_printf ("sig %d\n", sig);
- tls_sentry here (INFINITE);
-
- static int NO_COPY threadlist_ix;
-
- _cygtls *t = _main_tls;
-
- myfault efault;
- if (efault.faulted ())
- threadlist[threadlist_ix]->remove (INFINITE);
- else
- {
- threadlist_ix = -1;
- while (++threadlist_ix < (int) nthreads)
- if (sigismember (&(threadlist[threadlist_ix]->sigwait_mask), sig))
- {
- t = cygheap->threadlist[threadlist_ix];
- goto out;
- }
- threadlist_ix = -1;
- while (++threadlist_ix < (int) nthreads)
- if (!sigismember (&(threadlist[threadlist_ix]->sigmask), sig))
- {
- t = cygheap->threadlist[threadlist_ix];
- break;
- }
- }
-out:
- return t;
-}
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index e03774ffd..154ad6a84 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -390,16 +390,13 @@ struct init_cygheap: public mini_cygheap
struct _cygtls **threadlist;
size_t sthreads;
pid_t pid; /* my pid */
+ HANDLE pid_handle; /* handle for my pid */
struct { /* Equivalent to using LIST_HEAD. */
struct inode_t *lh_first;
} inode_list; /* Global inode pointer for adv. locking. */
hook_chain hooks;
void close_ctty ();
void init_installation_root ();
- void init_tls_list () __attribute__ ((regparm (1)));;
- void add_tls (_cygtls *) __attribute__ ((regparm (2)));
- void remove_tls (_cygtls *, DWORD) __attribute__ ((regparm (3)));
- _cygtls *find_tls (int) __attribute__ ((regparm (2)));
};
@@ -462,7 +459,7 @@ class cygheap_fdnew : public cygheap_fdmanip
~cygheap_fdnew ()
{
if (cygheap->fdtab[fd])
- cygheap->fdtab[fd]->inc_refcnt ();
+ cygheap->fdtab[fd]->refcnt (1);
}
void operator = (fhandler_base *fh) {cygheap->fdtab[fd] = fh;}
};
@@ -480,7 +477,7 @@ public:
this->fd = fd;
locked = lockit;
fh = cygheap->fdtab[fd];
- fh->inc_refcnt ();
+ fh->refcnt (1);
}
else
{
@@ -495,7 +492,7 @@ public:
}
~cygheap_fdget ()
{
- if (fh && fh->dec_refcnt () <= 0)
+ if (fh && fh->refcnt (-1) <= 0)
{
debug_only_printf ("deleting fh %p", fh);
delete fh;
diff --git a/winsup/cygwin/cygserver_ipc.h b/winsup/cygwin/cygserver_ipc.h
index 4dbc8212f..2f7c3531f 100644
--- a/winsup/cygwin/cygserver_ipc.h
+++ b/winsup/cygwin/cygserver_ipc.h
@@ -43,7 +43,7 @@ ipc_set_proc_info (proc &blk)
blk.gidcnt = 0;
blk.gidlist = NULL;
blk.is_admin = false;
- _my_tls.set_signal_arrived (true, blk.signal_arrived);
+ blk.signal_arrived = signal_arrived;
}
#endif /* __INSIDE_CYGWIN__ */
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index 5afc42954..4cbd3b064 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -377,7 +377,7 @@ cygthread::detach (HANDLE sigwait)
unsigned n = 2;
DWORD howlong = INFINITE;
w4[0] = sigwait;
- set_signal_arrived here (w4[1]);
+ w4[1] = signal_arrived;
/* For a description of the below loop see the end of this file */
for (int i = 0; i < 2; i++)
switch (res = WaitForMultipleObjects (n, w4, FALSE, howlong))
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index abda77c5f..9d5d4ab50 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -19,6 +19,39 @@ details. */
#include "sigproc.h"
#include "exception.h"
+class sentry
+{
+ static muto lock;
+ int destroy;
+public:
+ void init ();
+ bool acquired () {return lock.acquired ();}
+ sentry () {destroy = 0;}
+ sentry (DWORD wait) {destroy = lock.acquire (wait);}
+ ~sentry () {if (destroy) lock.release ();}
+ friend void _cygtls::init ();
+};
+
+muto NO_COPY sentry::lock;
+
+static size_t NO_COPY nthreads;
+
+#define THREADLIST_CHUNK 256
+
+void
+_cygtls::init ()
+{
+ if (cygheap->threadlist)
+ memset (cygheap->threadlist, 0, cygheap->sthreads * sizeof (cygheap->threadlist[0]));
+ else
+ {
+ cygheap->sthreads = THREADLIST_CHUNK;
+ cygheap->threadlist = (_cygtls **) ccalloc_abort (HEAP_TLS, cygheap->sthreads,
+ sizeof (cygheap->threadlist[0]));
+ }
+ sentry::lock.init ("sentry_lock");
+}
+
/* Two calls to get the stack right... */
void
_cygtls::call (DWORD (*func) (void *, void *), void *arg)
@@ -48,9 +81,7 @@ const wchar_t *well_known_dlls[] =
L"kernel32.dll",
L"mswsock.dll",
L"ntdll.dll",
- L"ole32.dll",
L"shlwapi.dll",
- L"wbemprox.dll",
L"ws2_32.dll",
};
@@ -134,7 +165,18 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
|| (void *) func == (void *) cygthread::simplestub)
return;
- cygheap->add_tls (this);
+ cygheap->user.reimpersonate ();
+
+ sentry here (INFINITE);
+ if (nthreads >= cygheap->sthreads)
+ {
+ cygheap->threadlist = (_cygtls **)
+ crealloc_abort (cygheap->threadlist, (cygheap->sthreads += THREADLIST_CHUNK)
+ * sizeof (cygheap->threadlist[0]));
+ memset (cygheap->threadlist + nthreads, 0, THREADLIST_CHUNK * sizeof (cygheap->threadlist[0]));
+ }
+
+ cygheap->threadlist[nthreads++] = this;
}
void
@@ -146,7 +188,6 @@ _cygtls::fixup_after_fork ()
sig = 0;
}
stacklock = spinning = 0;
- signal_arrived = NULL;
locals.select.sockevt = NULL;
locals.cw_timer = NULL;
wq.thread_ev = NULL;
@@ -171,13 +212,6 @@ _cygtls::remove (DWORD wait)
/* FIXME: Need some sort of atthreadexit function to allow things like
select to control this themselves. */
- if (signal_arrived)
- {
- HANDLE h = signal_arrived;
- signal_arrived = NULL;
- CloseHandle (h);
- }
-
/* Close handle and free memory used by select. */
if (locals.select.sockevt)
{
@@ -193,7 +227,22 @@ _cygtls::remove (DWORD wait)
free_local (hostent_buf);
/* Free temporary TLS path buffers. */
locals.pathbufs.destroy ();
- cygheap->remove_tls (this, wait);
+
+ do
+ {
+ sentry here (wait);
+ if (here.acquired ())
+ {
+ for (size_t i = 0; i < nthreads; i++)
+ if (this == cygheap->threadlist[i])
+ {
+ if (i < --nthreads)
+ cygheap->threadlist[i] = cygheap->threadlist[nthreads];
+ debug_printf ("removed %p element %d", this, i);
+ break;
+ }
+ }
+ } while (0);
remove_wq (wait);
}
@@ -203,6 +252,31 @@ _cygtls::push (__stack_t addr)
*stackptr++ = (__stack_t) addr;
}
+
+_cygtls *
+_cygtls::find_tls (int sig)
+{
+ static int NO_COPY threadlist_ix;
+
+ debug_printf ("signal %d\n", sig);
+ sentry here (INFINITE);
+
+ _cygtls *res = NULL;
+ threadlist_ix = -1;
+
+ myfault efault;
+ if (efault.faulted ())
+ cygheap->threadlist[threadlist_ix]->remove (INFINITE);
+
+ while (++threadlist_ix < (int) nthreads)
+ if (sigismember (&(cygheap->threadlist[threadlist_ix]->sigwait_mask), sig))
+ {
+ res = cygheap->threadlist[threadlist_ix];
+ break;
+ }
+ return res;
+}
+
void
_cygtls::set_siginfo (sigpacket *pack)
{
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
index d683cf837..d8940ac26 100644
--- a/winsup/cygwin/cygtls.h
+++ b/winsup/cygwin/cygtls.h
@@ -1,12 +1,13 @@
/* cygtls.h
- Copyright 2003, 2004, 2005, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ Copyright 2003, 2004, 2005, 2008, 2009, 2010, 2011 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#pragma once
+#ifndef _CYGTLS_H
+#define _CYGTLS_H
#include <signal.h>
#include <pwd.h>
@@ -157,7 +158,6 @@ typedef struct struct_waitq
/*gentls_offsets*/
#include "cygerrno.h"
-#include "security.h"
extern "C" int __sjfault (jmp_buf);
extern "C" int __ljfault (jmp_buf, int);
@@ -169,29 +169,27 @@ typedef __uint32_t __stack_t;
class _cygtls
{
public:
- /* Please keep these two declarations first */
- struct _local_storage locals;
- union
- {
- struct _reent local_clib;
- char __dontuse[8 * ((sizeof(struct _reent) + 4) / 8)];
- };
- /**/
void (*func) /*gentls_offsets*/(int)/*gentls_offsets*/;
int saved_errno;
int sa_flags;
sigset_t oldmask;
sigset_t deltamask;
+ HANDLE event;
int *errno_addr;
sigset_t sigmask;
sigset_t sigwait_mask;
siginfo_t *sigwait_info;
- HANDLE signal_arrived;
- bool signal_waiting;
struct ucontext thread_context;
DWORD thread_id;
+ unsigned threadkill;
siginfo_t infodata;
struct pthread *tid;
+ union
+ {
+ struct _reent local_clib;
+ char __dontuse[8 * ((sizeof(struct _reent) + 4) / 8)];
+ };
+ struct _local_storage locals;
class cygthread *_ctinfo;
class san *andreas;
waitq wq;
@@ -204,8 +202,11 @@ public:
unsigned initialized;
/*gentls_offsets*/
+ static CRITICAL_SECTION protect_linked_list;
+ static void init ();
void init_thread (void *, DWORD (*) (void *, void *));
static void call (DWORD (*) (void *, void *), void *);
+ static struct _cygtls *find_tls (int sig);
void remove (DWORD);
void push (__stack_t) __attribute__ ((regparm (2)));
__stack_t pop () __attribute__ ((regparm (1)));
@@ -229,30 +230,14 @@ public:
operator HANDLE () const {return tid->win32_obj_id;}
#endif
void set_siginfo (struct sigpacket *) __attribute__ ((regparm (3)));
+ void set_threadkill () {threadkill = true;}
+ void reset_threadkill () {threadkill = false;}
int call_signal_handler () __attribute__ ((regparm (1)));
void remove_wq (DWORD) __attribute__ ((regparm (1)));
void fixup_after_fork () __attribute__ ((regparm (1)));
void lock () __attribute__ ((regparm (1)));
void unlock () __attribute__ ((regparm (1)));
bool locked () __attribute__ ((regparm (1)));
- void set_signal_arrived (bool setit, HANDLE& h)
- {
- if (!setit)
- signal_waiting = false;
- else
- {
- if (!signal_arrived)
- signal_arrived = CreateEvent (&sec_none_nih, false, false, NULL);
- h = signal_arrived;
- signal_waiting = true;
- }
- }
- void reset_signal_arrived ()
- {
- if (signal_arrived)
- ResetEvent (signal_arrived);
- signal_waiting = false;
- }
private:
void call2 (DWORD (*) (void *, void *), void *, void *) __attribute__ ((regparm (3)));
/*gentls_offsets*/
@@ -320,15 +305,6 @@ public:
}
};
-class set_signal_arrived
-{
-public:
- set_signal_arrived (bool setit, HANDLE& h) { _my_tls.set_signal_arrived (setit, h); }
- set_signal_arrived (HANDLE& h) { _my_tls.set_signal_arrived (true, h); }
-
- operator int () const {return _my_tls.signal_waiting;}
- ~set_signal_arrived () { _my_tls.reset_signal_arrived (); }
-};
-
#define __getreent() (&_my_tls.local_clib)
-/*gentls_offsets*/
+
+#endif /*_CYGTLS_H*/ /*gentls_offsets*/
diff --git a/winsup/cygwin/cygwait.cc b/winsup/cygwin/cygwait.cc
deleted file mode 100644
index ee7a705ef..000000000
--- a/winsup/cygwin/cygwait.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-/* cygwait.h
-
- Copyright 2011, 2012 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include "sigproc.h"
-#include "cygwait.h"
-#include "ntdll.h"
-
-#define is_cw_cancel (mask & cw_cancel)
-#define is_cw_cancel_self (mask & cw_cancel_self)
-#define is_cw_sig (mask & cw_sig)
-#define is_cw_sig_eintr (mask & cw_sig_eintr)
-#define is_cw_sig_return (mask & cw_sig_return)
-
-#define is_cw_sig_handle (mask & (is_cw_sig | is_cw_sig_eintr))
-
-LARGE_INTEGER cw_nowait_storage;
-
-DWORD
-cancelable_wait (HANDLE object, PLARGE_INTEGER timeout, unsigned mask)
-{
- DWORD res;
- DWORD num = 0;
- HANDLE wait_objects[4];
- pthread_t thread = pthread::self ();
-
- /* Do not change the wait order.
- The object must have higher priority than the cancel event,
- because WaitForMultipleObjects will return the smallest index
- if both objects are signaled. */
- if (object)
- wait_objects[num++] = object;
-
- set_signal_arrived thread_waiting (is_cw_sig_handle, wait_objects[num]);
- debug_only_printf ("object %p, thread waiting %d, signal_arrived %p", object, (int) thread_waiting, _my_tls.signal_arrived);
- DWORD sig_n;
- if (!thread_waiting)
- sig_n = WAIT_TIMEOUT + 1;
- else
- sig_n = WAIT_OBJECT_0 + num++;
-
- DWORD cancel_n;
- if (!is_cw_cancel || !pthread::is_good_object (&thread) ||
- thread->cancelstate == PTHREAD_CANCEL_DISABLE)
- cancel_n = WAIT_TIMEOUT + 1;
- else
- {
- cancel_n = WAIT_OBJECT_0 + num++;
- wait_objects[cancel_n] = thread->cancel_event;
- }
-
- DWORD timeout_n;
- if (!timeout)
- timeout_n = WAIT_TIMEOUT + 1;
- else
- {
- timeout_n = WAIT_OBJECT_0 + num++;
- if (!_my_tls.locals.cw_timer)
- NtCreateTimer (&_my_tls.locals.cw_timer, TIMER_ALL_ACCESS, NULL,
- NotificationTimer);
- NtSetTimer (_my_tls.locals.cw_timer, timeout, NULL, NULL, FALSE, 0, NULL);
- wait_objects[timeout_n] = _my_tls.locals.cw_timer;
- }
-
- while (1)
- {
- res = WaitForMultipleObjects (num, wait_objects, FALSE, INFINITE);
- debug_only_printf ("res %d", res);
- if (res == cancel_n)
- res = WAIT_CANCELED;
- else if (res == timeout_n)
- res = WAIT_TIMEOUT;
- else if (res != sig_n)
- /* all set */;
- else if (is_cw_sig_eintr)
- res = WAIT_SIGNALED; /* caller will deal with signals */
- else if (_my_tls.call_signal_handler ())
- continue;
- break;
- }
-
- if (timeout)
- {
- TIMER_BASIC_INFORMATION tbi;
-
- NtQueryTimer (_my_tls.locals.cw_timer, TimerBasicInformation, &tbi,
- sizeof tbi, NULL);
- /* if timer expired, TimeRemaining is negative and represents the
- system uptime when signalled */
- if (timeout->QuadPart < 0LL)
- timeout->QuadPart = tbi.SignalState ? 0LL : tbi.TimeRemaining.QuadPart;
- NtCancelTimer (_my_tls.locals.cw_timer, NULL);
- }
-
- if (res == WAIT_CANCELED && is_cw_cancel_self)
- pthread::static_cancel_self ();
-
- return res;
-}
diff --git a/winsup/cygwin/cygwait.h b/winsup/cygwin/cygwait.h
deleted file mode 100644
index d52a145ae..000000000
--- a/winsup/cygwin/cygwait.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* cygwait.h
-
- Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#pragma once
-
-#define WAIT_CANCELED (WAIT_OBJECT_0 + 2)
-#define WAIT_SIGNALED (WAIT_OBJECT_0 + 1)
-
-enum cw_wait_mask
-{
- cw_cancel = 0x0001,
- cw_cancel_self = 0x0002,
- cw_sig = 0x0004,
- cw_sig_eintr = 0x0008
-};
-
-extern LARGE_INTEGER cw_nowait_storage;
-#define cw_nowait (&cw_nowait_storage)
-#define cw_infinite ((PLARGE_INTEGER) NULL)
-
-const unsigned cw_std_mask = cw_cancel | cw_cancel_self | cw_sig;
-
-DWORD cancelable_wait (HANDLE, PLARGE_INTEGER timeout = NULL,
- unsigned = cw_std_mask)
- __attribute__ ((regparm (3)));
-
-extern inline DWORD __attribute__ ((always_inline))
-cancelable_wait (HANDLE h, DWORD howlong, unsigned mask)
-{
- LARGE_INTEGER li_howlong;
- PLARGE_INTEGER pli_howlong;
- if (howlong == INFINITE)
- pli_howlong = NULL;
- else
- {
- li_howlong.QuadPart = -(10000ULL * howlong);
- pli_howlong = &li_howlong;
- }
- return cancelable_wait (h, pli_howlong, mask);
-}
-
-static inline DWORD __attribute__ ((always_inline))
-cygwait (HANDLE h, DWORD howlong = INFINITE)
-{
- return cancelable_wait (h, howlong, cw_cancel | cw_sig);
-}
-
-static inline DWORD __attribute__ ((always_inline))
-cygwait (DWORD howlong)
-{
- return cygwait (NULL, howlong);
-}
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
index acd043b30..22b4ea94a 100644
--- a/winsup/cygwin/cygwin.din
+++ b/winsup/cygwin/cygwin.din
@@ -738,7 +738,6 @@ _getlogin = getlogin NOSIGFE
getlogin_r NOSIGFE
getmntent SIGFE
_getmntent = getmntent SIGFE
-getmntent_r SIGFE
getmode SIGFE
_getmode = getmode SIGFE
getnameinfo = cygwin_getnameinfo SIGFE
@@ -1063,7 +1062,6 @@ memmove NOSIGFE
_memmove = memmove NOSIGFE
mempcpy NOSIGFE
__mempcpy = mempcpy NOSIGFE
-memrchr NOSIGFE
memset NOSIGFE
_memset = memset NOSIGFE
mkdir SIGFE
diff --git a/winsup/cygwin/cygwin.sc b/winsup/cygwin/cygwin.sc
index d5f79ab6c..966ea9733 100644
--- a/winsup/cygwin/cygwin.sc
+++ b/winsup/cygwin/cygwin.sc
@@ -134,5 +134,4 @@ SECTIONS
.debug_loc ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_loc) }
.debug_macinfo ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_macinfo) }
.debug_ranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_ranges) }
- .debug_pubtypes ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_pubtypes) }
}
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 0cda2e5d5..63eaa70dd 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -353,8 +353,7 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell)
}
}
- if (argv)
- argv[argc] = NULL;
+ argv[argc] = NULL;
debug_printf ("argc %d", argc);
}
@@ -626,24 +625,13 @@ child_info_fork::handle_fork ()
api_fatal ("recreate_mmaps_after_fork_failed");
}
-bool
-child_info_spawn::get_parent_handle ()
-{
- parent = OpenProcess (PROCESS_VM_READ, false, parent_winpid);
- moreinfo->myself_pinfo = NULL;
- return !!parent;
-}
-
void
child_info_spawn::handle_spawn ()
{
extern void fixup_lockf_after_exec ();
HANDLE h;
- if (!dynamically_loaded || get_parent_handle ())
- {
- cygheap_fixup_in_child (true);
- memory_init (false);
- }
+ cygheap_fixup_in_child (true);
+ memory_init (false);
if (!moreinfo->myself_pinfo ||
!DuplicateHandle (GetCurrentProcess (), moreinfo->myself_pinfo,
GetCurrentProcess (), &h, 0,
@@ -677,15 +665,10 @@ child_info_spawn::handle_spawn ()
ready (true);
- /* Keep pointer to parent open if we've execed so that pid will not be reused.
- Otherwise, we no longer need this handle so close it.
- Need to do this after debug_fixup_after_fork_exec or DEBUGGING handling of
+ /* Need to do this after debug_fixup_after_fork_exec or DEBUGGING handling of
handles might get confused. */
- if (type != _CH_EXEC && child_proc_info->parent)
- {
- CloseHandle (child_proc_info->parent);
- child_proc_info->parent = NULL;
- }
+ CloseHandle (child_proc_info->parent);
+ child_proc_info->parent = NULL;
signal_fixup_after_exec ();
fixup_lockf_after_exec ();
@@ -773,6 +756,12 @@ dll_crt0_0 ()
user_data->threadinterface->Init ();
+ _cygtls::init ();
+
+ /* Initialize events */
+ events_init ();
+ tty_list::init_session ();
+
_main_tls = &_my_tls;
/* Initialize signal processing here, early, in the hopes that the creation
@@ -837,6 +826,8 @@ dll_crt0_1 (void *)
strace.microseconds ();
#endif
+ create_signal_arrived (); /* FIXME: move into wait_sig? */
+
/* Initialize debug muto, if DLL is built with --enable-debugging.
Need to do this before any helper threads start. */
debug_init ();
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc
index e2a776a5b..1c4a851b9 100644
--- a/winsup/cygwin/devices.cc
+++ b/winsup/cygwin/devices.cc
@@ -6,10 +6,7 @@
#include "tty.h"
#include "pinfo.h"
#include "shared_info.h"
-#include "path.h"
-#include "fhandler.h"
#include "ntdll.h"
-
typedef const device *KR_device_t;
@@ -70,16 +67,18 @@ exists_ntdev_silent (const device& dev)
static int
exists_console (const device& dev)
{
+ if (!iscons_dev (myself->ctty))
+ return false;
int devn = *const_cast<device *> (&dev);
switch (devn)
{
case FH_CONSOLE:
case FH_CONIN:
case FH_CONOUT:
- return fhandler_console::exists ();
+ return true;
default:
/* Only show my own console device (for now?) */
- return iscons_dev (myself->ctty) && myself->ctty == devn;
+ return myself->ctty == devn;
}
}
@@ -244,7 +243,7 @@ const _RDATA device dev_storage[] =
{"/dev/fd14", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 14)), "\\Device\\Floppy14", exists_ntdev, S_IFBLK, true},
{"/dev/fd15", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 15)), "\\Device\\Floppy15", exists_ntdev, S_IFBLK, true},
{"/dev/full", BRACK(FH_FULL), "/dev/full", exists, S_IFCHR, true},
- {"/dev/kmem", BRACK(FH_KMEM), "/dev/kmem", exists, S_IFCHR, true},
+ {"/dev/kmem", BRACK(FH_KMEM), "/dev/mem", exists, S_IFCHR, true},
{"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\cygwin\\dev\\kmsg", exists_ntdev, S_IFCHR, true},
{"/dev/mem", BRACK(FH_MEM), "/dev/mem", exists, S_IFCHR, true},
{"/dev/nst0", BRACK(FHDEV(DEV_TAPE_MAJOR, 128)), "\\Device\\Tape0", exists_ntdev, S_IFBLK, true},
diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in
index 213226ae6..e5032f6ca 100644
--- a/winsup/cygwin/devices.in
+++ b/winsup/cygwin/devices.in
@@ -5,10 +5,7 @@
#include "tty.h"
#include "pinfo.h"
#include "shared_info.h"
-#include "path.h"
-#include "fhandler.h"
#include "ntdll.h"
-
typedef const device *KR_device_t;
}
%type KR_device_t
@@ -66,16 +63,18 @@ exists_ntdev_silent (const device& dev)
static int
exists_console (const device& dev)
{
+ if (!iscons_dev (myself->ctty))
+ return false;
int devn = *const_cast<device *> (&dev);
switch (devn)
{
case FH_CONSOLE:
case FH_CONIN:
case FH_CONOUT:
- return fhandler_console::exists ();
+ return true;
default:
/* Only show my own console device (for now?) */
- return iscons_dev (myself->ctty) && myself->ctty == devn;
+ return myself->ctty == devn;
}
}
@@ -157,7 +156,7 @@ const device dev_error_storage =
"/dev/random", BRACK(FH_RANDOM), "/dev/random", exists, S_IFCHR
"/dev/urandom", BRACK(FH_URANDOM), "/dev/urandom", exists, S_IFCHR, =urandom_dev
"/dev/mem", BRACK(FH_MEM), "/dev/mem", exists, S_IFCHR
-"/dev/kmem", BRACK(FH_KMEM), "/dev/kmem", exists, S_IFCHR
+"/dev/kmem", BRACK(FH_KMEM), "/dev/mem", exists, S_IFCHR
"/dev/clipboard", BRACK(FH_CLIPBOARD), "/dev/clipboard", exists, S_IFCHR
"/dev/port", BRACK(FH_PORT), "/dev/port", exists, S_IFCHR
"/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 - 1})), "\\??\\COM{$1}", exists_ntdev_silent, S_IFCHR
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
index 420f0d8f2..3b358d5a0 100644
--- a/winsup/cygwin/dll_init.cc
+++ b/winsup/cygwin/dll_init.cc
@@ -180,14 +180,7 @@ dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
GetModuleFileNameW (h, buf, sizeof (buf));
PWCHAR name = buf;
if (!wcsncmp (name, L"\\\\?\\", 4))
- {
- name += 4;
- if (!wcsncmp (name, L"UNC\\", 4))
- {
- name += 2;
- *name = L'\\';
- }
- }
+ name += 4;
DWORD namelen = wcslen (name);
PWCHAR modname = wcsrchr (name, L'\\') + 1;
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 2a9f8b078..15f4c0ce7 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -12,6 +12,7 @@ details. */
#define __INSIDE_CYGWIN_NET__
#include "winsup.h"
+#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@@ -242,7 +243,7 @@ dtable::release (int fd)
{
if (fds[fd]->need_fixup_before ())
dec_need_fixup_before ();
- fds[fd]->dec_refcnt ();
+ fds[fd]->refcnt (-1);
fds[fd] = NULL;
if (fd <= 2)
set_std_handle (fd);
@@ -255,10 +256,8 @@ cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
if (fd == -1)
fd = cygheap->fdtab.find_unused_handle ();
fhandler_base *fh = build_fh_name (name);
- if (!fh)
- return -1;
cygheap->fdtab[fd] = fh;
- cygheap->fdtab[fd]->inc_refcnt ();
+ cygheap->fdtab[fd]->refcnt (1);
fh->init (handle, myaccess, bin ?: fh->pc_binmode ());
return fd;
}
@@ -338,9 +337,6 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle)
else
fh = build_fh_name (name);
- if (!fh)
- return;
-
if (name[0])
{
bin = fh->pc_binmode ();
@@ -397,7 +393,7 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle)
fh->open_setup (openflags);
fh->usecount = 0;
cygheap->fdtab[fd] = fh;
- cygheap->fdtab[fd]->inc_refcnt ();
+ cygheap->fdtab[fd]->refcnt (1);
set_std_handle (fd);
paranoid_printf ("fd %d, handle %p", fd, handle);
}
@@ -529,7 +525,6 @@ fh_alloc (path_conv& pc)
fh = cnew (fhandler_dev_random);
break;
case FH_MEM:
- case FH_KMEM:
case FH_PORT:
fh = cnew (fhandler_dev_mem);
break;
@@ -607,15 +602,8 @@ fh_alloc (path_conv& pc)
fh = cnew (fhandler_nodevice);
else if (fh->dev () == FH_ERROR)
{
- if (!pc.isopen () && pc.dev.isfs ())
- fh->dev () = pc.dev; /* Special case: This file actually exists on
- disk and we're not trying to open it so just
- return the info from pc. */
- else
- {
- delete fh;
- fh = NULL;
- }
+ delete fh;
+ fh = NULL;
}
return fh;
}
@@ -712,15 +700,6 @@ dtable::dup3 (int oldfd, int newfd, int flags)
MALLOC_CHECK;
debug_printf ("dup3 (%d, %d, %p)", oldfd, newfd, flags);
lock ();
- bool do_unlock = true;
- bool unlock_on_return;
- if (!(flags & O_EXCL))
- unlock_on_return = true; /* Relinquish lock on return */
- else
- {
- flags &= ~O_EXCL;
- unlock_on_return = false; /* Return with lock set on success */
- }
if (not_open (oldfd))
{
@@ -772,12 +751,10 @@ dtable::dup3 (int oldfd, int newfd, int flags)
if ((res = newfd) <= 2)
set_std_handle (res);
- do_unlock = unlock_on_return;
done:
MALLOC_CHECK;
- if (do_unlock)
- unlock ();
+ unlock ();
syscall_printf ("%R = dup3(%d, %d, %p)", res, oldfd, newfd, flags);
return res;
@@ -881,7 +858,7 @@ dtable::fixup_after_exec ()
/* Close the handle if it's close-on-exec or if an error was detected
(typically with opening a console in a gui app) by fixup_after_exec.
*/
- if (fh->close_on_exec () || (!fh->nohandle () && !fh->get_io_handle ()))
+ if (fh->close_on_exec () || !fh->get_io_handle ())
fixup_close (i, fh);
else if (fh->get_popen_pid ())
close (i);
@@ -903,7 +880,7 @@ dtable::fixup_after_fork (HANDLE parent)
{
debug_printf ("fd %d (%s)", i, fh->get_name ());
fh->fixup_after_fork (parent);
- if (!fh->nohandle () && !fh->get_io_handle ())
+ if (!fh->get_io_handle ())
{
/* This should actually never happen but it's here to make sure
we don't crash due to access of an unopened file handle. */
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h
index 7b4cd5d62..288b4767f 100644
--- a/winsup/cygwin/dtable.h
+++ b/winsup/cygwin/dtable.h
@@ -89,7 +89,6 @@ public:
void fixup_before_fork (DWORD win_proc_id);
friend void dtable_init ();
friend void __stdcall close_all_files (bool);
- friend int dup_finish (int, int, int);
friend class fhandler_disk_file;
friend class cygheap_fdmanip;
friend class cygheap_fdget;
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index ae3944a6c..33289d2f5 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -117,7 +117,6 @@ static struct parse_thing
{"error_start", {func: error_start_init}, isfunc, NULL, {{0}, {0}}},
{"export", {&export_settings}, setbool, NULL, {{false}, {true}}},
{"glob", {func: glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
- {"pipe_byte", {&pipe_byte}, setbool, NULL, {{false}, {true}}},
{"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}},
{"reset_com", {&reset_com}, setbool, NULL, {{false}, {true}}},
{"tty", {func: tty_is_gone}, isfunc, NULL, {{0}, {0}}},
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 649574fc2..458029f35 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1,7 +1,7 @@
/* exceptions.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -19,8 +19,8 @@ details. */
#include <syslog.h>
#include <wchar.h>
-#include "cygtls.h"
#include "pinfo.h"
+#include "cygtls.h"
#include "sigproc.h"
#include "shared_info.h"
#include "perprocess.h"
@@ -37,13 +37,16 @@ details. */
char debugger_command[2 * NT_MAX_PATH + 20];
-extern "C" void sigdelayed ();
+extern "C" {
+extern void sigdelayed ();
+};
static BOOL WINAPI ctrl_c_handler (DWORD);
/* This is set to indicate that we have already exited. */
static NO_COPY int exit_already = 0;
+static muto NO_COPY mask_sync;
NO_COPY static struct
{
@@ -445,7 +448,7 @@ try_to_debug (bool waitloop)
return dbg;
}
-extern "C" void WINAPI RtlUnwind (void *, void *, PEXCEPTION_RECORD, void *);
+extern "C" DWORD __stdcall RtlUnwind (void *, void *, void *, DWORD);
static void __stdcall rtl_unwind (exception_list *, PEXCEPTION_RECORD) __attribute__ ((noinline, regparm (3)));
void __stdcall
rtl_unwind (exception_list *frame, PEXCEPTION_RECORD e)
@@ -660,7 +663,7 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
stackdump ((DWORD) ebp, in, e);
}
- if ((NTSTATUS) e->ExceptionCode == STATUS_ACCESS_VIOLATION)
+ if (e->ExceptionCode == STATUS_ACCESS_VIOLATION)
{
int error_code = 0;
if (si.si_code == SEGV_ACCERR) /* Address present */
@@ -672,7 +675,8 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
klog (LOG_INFO, "%s[%d]: segfault at %08x rip %08x rsp %08x error %d",
__progname, myself->pid,
e->ExceptionInformation[1], in->Eip, in->Esp,
- error_code);
+ ((in->Eip >= 0x61000000 && in->Eip < 0x61200000)
+ ? 0 : 4) | (e->ExceptionInformation[0] << 1));
}
/* Flag signal + core dump */
@@ -706,11 +710,11 @@ handle_sigsuspend (sigset_t tempmask)
{
sigset_t oldmask = _my_tls.sigmask; // Remember for restoration
- set_signal_mask (_my_tls.sigmask, tempmask);
+ set_signal_mask (tempmask, _my_tls.sigmask);
sigproc_printf ("oldmask %p, newmask %p", oldmask, tempmask);
pthread_testcancel ();
- cancelable_wait (NULL, cw_infinite, cw_cancel | cw_cancel_self | cw_sig_eintr);
+ cancelable_wait (signal_arrived);
set_sig_errno (EINTR); // Per POSIX
@@ -733,29 +737,31 @@ sig_handle_tty_stop (int sig)
/* Silently ignore attempts to suspend if there is no accommodating
cygwin parent to deal with this behavior. */
if (!myself->cygstarted)
- myself->process_state &= ~PID_STOPPED;
- else
{
- myself->stopsig = sig;
- myself->alert_parent (sig);
- sigproc_printf ("process %d stopped by signal %d", myself->pid, sig);
- /* FIXME! This does nothing to suspend anything other than the main
- thread. */
- DWORD res = cancelable_wait (NULL, cw_infinite, cw_sig_eintr);
- switch (res)
- {
- case WAIT_SIGNALED:
- myself->stopsig = SIGCONT;
- myself->alert_parent (SIGCONT);
- break;
- default:
- api_fatal ("WaitSingleObject returned %d", res);
- break;
- }
+ myself->process_state &= ~PID_STOPPED;
+ return;
+ }
+
+ myself->stopsig = sig;
+ myself->alert_parent (sig);
+ sigproc_printf ("process %d stopped by signal %d", myself->pid, sig);
+ HANDLE w4[2];
+ w4[0] = sigCONT;
+ w4[1] = signal_arrived;
+ switch (WaitForMultipleObjects (2, w4, TRUE, INFINITE))
+ {
+ case WAIT_OBJECT_0:
+ case WAIT_OBJECT_0 + 1:
+ myself->stopsig = SIGCONT;
+ myself->alert_parent (SIGCONT);
+ break;
+ default:
+ api_fatal ("WaitSingleObject failed, %E");
+ break;
}
_my_tls.incyg = 0;
}
-} /* end extern "C" */
+}
bool
_cygtls::interrupt_now (CONTEXT *cx, int sig, void *handler,
@@ -798,11 +804,20 @@ _cygtls::interrupt_setup (int sig, void *handler, struct sigaction& siga)
this->sig = sig; // Should always be last thing set to avoid a race
- if (incyg && signal_arrived)
- SetEvent (signal_arrived);
+ if (!event)
+ threadkill = false;
+ else
+ {
+ HANDLE h = event;
+ event = NULL;
+ SetEvent (h);
+ }
+ /* Clear any waiting threads prior to dispatching to handler function */
+ int res = SetEvent (signal_arrived); // For an EINTR case
proc_subproc (PROC_CLEARWAIT, 1);
- sigproc_printf ("armed signal_arrived %p, signal %d", signal_arrived, sig);
+ sigproc_printf ("armed signal_arrived %p, signal %d, res %d", signal_arrived,
+ sig, res);
}
extern "C" void __stdcall
@@ -850,7 +865,7 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
If the thread is already suspended (which can occur when a program
has called SuspendThread on itself) then just queue the signal. */
- sigproc_printf ("suspending thread, tls %p, _main_tls %p", tls, _main_tls);
+ sigproc_printf ("suspending thread");
res = SuspendThread (hth);
/* Just set pending if thread is already suspended */
if (res)
@@ -865,7 +880,7 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
interrupted = tls->interrupt_now (&cx, sig, handler, siga);
tls->unlock ();
- ResumeThread (hth);
+ res = ResumeThread (hth);
if (interrupted)
goto out;
@@ -1006,7 +1021,7 @@ ctrl_c_handler (DWORD type)
extern "C" void __stdcall
set_process_mask (sigset_t newmask)
{
- set_signal_mask (_my_tls.sigmask, newmask);
+ set_signal_mask (newmask, _my_tls.sigmask);
}
extern "C" int
@@ -1019,9 +1034,11 @@ sighold (int sig)
syscall_printf ("signal %d out of range", sig);
return -1;
}
+ mask_sync.acquire (INFINITE);
sigset_t mask = _my_tls.sigmask;
sigaddset (&mask, sig);
- set_signal_mask (_my_tls.sigmask, mask);
+ set_signal_mask (mask, _my_tls.sigmask);
+ mask_sync.release ();
return 0;
}
@@ -1035,9 +1052,11 @@ sigrelse (int sig)
syscall_printf ("signal %d out of range", sig);
return -1;
}
+ mask_sync.acquire (INFINITE);
sigset_t mask = _my_tls.sigmask;
sigdelset (&mask, sig);
- set_signal_mask (_my_tls.sigmask, mask);
+ set_signal_mask (mask, _my_tls.sigmask);
+ mask_sync.release ();
return 0;
}
@@ -1055,6 +1074,7 @@ sigset (int sig, _sig_func_ptr func)
return (_sig_func_ptr) SIG_ERR;
}
+ mask_sync.acquire (INFINITE);
sigset_t mask = _my_tls.sigmask;
/* If sig was in the signal mask return SIG_HOLD, otherwise return the
previous disposition. */
@@ -1073,7 +1093,8 @@ sigset (int sig, _sig_func_ptr func)
signal (sig, func);
sigdelset (&mask, sig);
}
- set_signal_mask (_my_tls.sigmask, mask);
+ set_signal_mask (mask, _my_tls.sigmask);
+ mask_sync.release ();
return prev;
}
@@ -1084,10 +1105,11 @@ sigignore (int sig)
}
/* Update the signal mask for this process and return the old mask.
- Called from call_signal_handler */
+ Called from sigdelayed */
extern "C" sigset_t
set_process_mask_delta ()
{
+ mask_sync.acquire (INFINITE);
sigset_t newmask, oldmask;
if (_my_tls.deltamask & SIG_NONMASKABLE)
@@ -1098,35 +1120,41 @@ set_process_mask_delta ()
sigproc_printf ("oldmask %p, newmask %p, deltamask %p", oldmask, newmask,
_my_tls.deltamask);
_my_tls.sigmask = newmask;
+ mask_sync.release ();
return oldmask;
}
/* Set the signal mask for this process.
Note that some signals are unmaskable, as in UNIX. */
-
-void
-set_signal_mask (sigset_t& setmask, sigset_t newmask)
+extern "C" void __stdcall
+set_signal_mask (sigset_t newmask, sigset_t& oldmask)
{
+#ifdef CGF
+ if (&_my_tls == _sig_tls)
+ small_printf ("********* waiting in signal thread\n");
+#endif
+ mask_sync.acquire (INFINITE);
newmask &= ~SIG_NONMASKABLE;
- sigset_t mask_bits = setmask & ~newmask;
- sigproc_printf ("setmask %p, newmask %p, mask_bits %p", setmask, newmask,
+ sigset_t mask_bits = oldmask & ~newmask;
+ sigproc_printf ("oldmask %p, newmask %p, mask_bits %p", oldmask, newmask,
mask_bits);
- setmask = newmask;
+ oldmask = newmask;
if (mask_bits)
sig_dispatch_pending (true);
+ mask_sync.release ();
}
int __stdcall
sigpacket::process ()
{
- bool continue_now;
+ DWORD continue_now;
struct sigaction dummy = global_sigs[SIGSTOP];
if (si.si_signo != SIGCONT)
continue_now = false;
else
{
- continue_now = ISSTATE (myself, PID_STOPPED);
+ continue_now = myself->process_state & PID_STOPPED;
myself->stopsig = 0;
myself->process_state &= ~PID_STOPPED;
/* Clear pending stop signals */
@@ -1156,23 +1184,16 @@ sigpacket::process ()
myself->rusage_self.ru_nsignals++;
- void *handler = (void *) thissig.sa_handler;
- if (handler == SIG_IGN)
- {
- sigproc_printf ("signal %d ignored", si.si_signo);
- goto done;
- }
-
- if (have_execed)
+ bool masked;
+ void *handler;
+ if (!have_execed || (void *) thissig.sa_handler == (void *) SIG_IGN)
+ handler = (void *) thissig.sa_handler;
+ else if (tls)
+ return 1;
+ else
handler = NULL;
- if (tls)
- sigproc_printf ("using tls %p", tls);
- else
- {
- tls = cygheap->find_tls (si.si_signo);
- sigproc_printf ("using tls %p", tls);
- }
+ _cygtls *use_tls = tls ?: _main_tls;
if (si.si_signo == SIGKILL)
goto exit_sig;
@@ -1182,12 +1203,30 @@ sigpacket::process ()
goto stop;
}
- if (sigismember (&tls->sigwait_mask, si.si_signo))
+ bool insigwait_mask;
+ if ((masked = ISSTATE (myself, PID_STOPPED)))
+ insigwait_mask = false;
+ else if (tls)
+ insigwait_mask = sigismember (&tls->sigwait_mask, si.si_signo);
+ else if (!(tls = _cygtls::find_tls (si.si_signo)))
+ insigwait_mask = false;
+ else
{
- tls->sigwait_mask = 0;
- goto dosig;
+ use_tls = tls;
+ insigwait_mask = true;
}
- if (sigismember (&tls->sigmask, si.si_signo) || ISSTATE (myself, PID_STOPPED))
+
+ if (insigwait_mask)
+ goto thread_specific;
+
+ if (masked)
+ /* nothing to do */;
+ else if (sigismember (mask, si.si_signo))
+ masked = true;
+ else if (tls)
+ masked = sigismember (&tls->sigmask, si.si_signo);
+
+ if (masked)
{
sigproc_printf ("signal %d blocked", si.si_signo);
rc = -1;
@@ -1200,10 +1239,14 @@ sigpacket::process ()
if (handler == (void *) SIG_DFL)
{
+ if (insigwait_mask)
+ goto thread_specific;
if (si.si_signo == SIGCHLD || si.si_signo == SIGIO || si.si_signo == SIGCONT || si.si_signo == SIGWINCH
|| si.si_signo == SIGURG)
{
- sigproc_printf ("signal %d default is currently ignore", si.si_signo);
+ sigproc_printf ("default signal %d ignored", si.si_signo);
+ if (continue_now)
+ SetEvent (signal_arrived);
goto done;
}
@@ -1213,35 +1256,53 @@ sigpacket::process ()
goto exit_sig;
}
+ if (handler == (void *) SIG_IGN)
+ {
+ sigproc_printf ("signal %d ignored", si.si_signo);
+ goto done;
+ }
+
if (handler == (void *) SIG_ERR)
goto exit_sig;
+ use_tls->set_siginfo (this);
goto dosig;
stop:
+ /* Eat multiple attempts to STOP */
+ if (ISSTATE (myself, PID_STOPPED))
+ goto done;
handler = (void *) sig_handle_tty_stop;
thissig = dummy;
dosig:
- if (ISSTATE (myself, PID_STOPPED) && !continue_now)
- rc = -1; /* No signals delivered if stopped */
- else
- {
- tls->set_siginfo (this);
- /* Dispatch to the appropriate function. */
- sigproc_printf ("signal %d, signal handler %p", si.si_signo, handler);
- rc = setup_handler (si.si_signo, handler, thissig, tls);
- continue_now = false;
- }
+ /* Dispatch to the appropriate function. */
+ sigproc_printf ("signal %d, about to call %p", si.si_signo, handler);
+ rc = setup_handler (si.si_signo, handler, thissig, use_tls);
done:
+ tls = use_tls;
if (continue_now)
- SetEvent (tls->signal_arrived);
+ SetEvent (sigCONT);
sigproc_printf ("returning %d", rc);
return rc;
+thread_specific:
+ use_tls->sig = si.si_signo;
+ use_tls->set_siginfo (this);
+ use_tls->func = NULL;
+ sigproc_printf ("releasing sigwait for thread");
+ SetEvent (use_tls->event);
+ goto done;
+
exit_sig:
- tls->signal_exit (si.si_signo); /* never returns */
+ use_tls->signal_exit (si.si_signo); /* never returns */
+}
+
+void
+events_init ()
+{
+ mask_sync.init ("mask_sync");
}
void
@@ -1257,16 +1318,26 @@ _cygtls::call_signal_handler ()
while (1)
{
lock ();
- if (!sig)
+ if (sig)
+ pop ();
+ else if (this != _main_tls)
{
- unlock ();
- break;
- }
+ _main_tls->lock ();
+ if (_main_tls->sig && _main_tls->incyg)
+ {
+ paranoid_printf ("Redirecting to main_tls signal %d", _main_tls->sig);
+ sig = _main_tls->sig;
+ sa_flags = _main_tls->sa_flags;
+ func = _main_tls->func;
+ infodata = _main_tls->infodata;
+ _main_tls->pop ();
+ _main_tls->sig = 0;
- /* Pop the stack if the next "return address" is sigdelayed, since
- this function is doing what sigdelayed would have done anyway. */
- if (retaddr () == (__stack_t) sigdelayed)
- pop ();
+ }
+ _main_tls->unlock ();
+ }
+ if (!sig)
+ break;
debug_only_printf ("dealing with signal %d", sig);
this_sa_flags = sa_flags;
@@ -1276,12 +1347,12 @@ _cygtls::call_signal_handler ()
sigset_t this_oldmask = set_process_mask_delta ();
int this_errno = saved_errno;
sig = 0;
- reset_signal_arrived ();
unlock (); // make sure synchronized
if (!(this_sa_flags & SA_SIGINFO))
{
+ void (*sigfunc) (int) = thisfunc;
incyg = false;
- thisfunc (thissig);
+ sigfunc (thissig);
}
else
{
@@ -1292,11 +1363,12 @@ _cygtls::call_signal_handler ()
sigact (thissig, &thissi, NULL);
}
incyg = true;
- set_signal_mask (_my_tls.sigmask, this_oldmask);
+ set_signal_mask (this_oldmask, _my_tls.sigmask);
if (this_errno >= 0)
set_errno (this_errno);
}
+ unlock ();
return this_sa_flags & SA_RESTART || (this != _main_tls);
}
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 22636aa53..cd86966b8 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -108,7 +108,7 @@ fillout_pinfo (pid_t pid, int winpid)
{
i = 0;
pids.reset ();
- return NULL;
+ return 0;
}
return &ep;
}
@@ -186,12 +186,10 @@ static void
exit_process (UINT status, bool useTerminateProcess)
{
pid_t pid = getpid ();
- external_pinfo *ep = fillout_pinfo (pid, 1);
+ external_pinfo * ep = fillout_pinfo (pid, 1);
DWORD dwpid = ep ? ep->dwProcessId : pid;
pinfo p (pid, PID_MAP_RW);
- if (ep)
- pid = ep->pid;
- if ((dwpid == GetCurrentProcessId()) && (p->pid == pid))
+ if ((dwpid == GetCurrentProcessId()) && (p->pid == ep->pid))
p.set_exit_code ((DWORD)status);
if (useTerminateProcess)
TerminateProcess (GetCurrentProcess(), status);
diff --git a/winsup/cygwin/fenv.cc b/winsup/cygwin/fenv.cc
index 66513e9d2..0f1f29b73 100755
--- a/winsup/cygwin/fenv.cc
+++ b/winsup/cygwin/fenv.cc
@@ -1,6 +1,6 @@
/* fenv.cc
- Copyright 2010, 2011, 2012 Red Hat, Inc.
+ Copyright 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -349,7 +349,7 @@ fesetround (int round)
unsigned int mxcsr = 0;
/* Will succeed for any valid value of the input parameter. */
- if (round < FE_TONEAREST || round > FE_TOWARDZERO)
+ if (round & ~(FE_CW_ROUND_MASK >> FE_CW_PREC_SHIFT))
return EINVAL;
/* Get control words. */
@@ -395,7 +395,7 @@ fesetprec (int prec)
unsigned short cw;
/* Will succeed for any valid value of the input parameter. */
- if (prec < FE_SINGLEPREC || prec > FE_EXTENDEDPREC)
+ if (prec & ~(FE_CW_PREC_MASK >> FE_CW_PREC_SHIFT) || prec == FE_RESERVEDPREC)
return EINVAL;
/* Get control word. */
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 55a73b66e..a22fe2496 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -31,7 +31,6 @@ details. */
#include "sigproc.h"
#include "shared_info.h"
#include <asm/socket.h>
-#include "cygwait.h"
#define MAX_OVERLAPPED_WRITE_LEN (64 * 1024 * 1024)
#define MIN_OVERLAPPED_WRITE_LEN (1 * 1024 * 1024)
@@ -1940,7 +1939,7 @@ fhandler_base_overlapped::wait_overlapped (bool inres, bool writing, DWORD *byte
case WAIT_OBJECT_0:
err = ERROR_INVALID_HANDLE;
break;
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0 + 1:
err = ERROR_INVALID_AT_INTERRUPT_TIME;
break;
default:
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 39e1e7573..cad30189f 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -14,8 +14,8 @@ details. */
#include "tty.h"
/* fcntl flags used only internaly. */
-#define O_NOSYMLINK 0x080000
-#define O_DIROPEN 0x100000
+#define O_NOSYMLINK 0x080000
+#define O_DIROPEN 0x100000
/* newlib used to define O_NDELAY differently from O_NONBLOCK. Now it
properly defines both to be the same. Unfortunately, we have to
@@ -36,10 +36,6 @@ details. */
so small. http://cygwin.com/ml/cygwin/2011-03/msg00541.html */
#define DEFAULT_PIPEBUFSIZE PREFERRED_IO_BLKSIZE
-/* Used for fhandler_pipe::create. Use an available flag which will
- never be used in Cygwin for this function. */
-#define PIPE_ADD_PID FILE_FLAG_FIRST_PIPE_INSTANCE
-
extern const char *windows_device_names[];
extern struct __cygwin_perfile *perfile_table;
#define __fmode (*(user_data->fmode_ptr))
@@ -182,8 +178,11 @@ class fhandler_base
HANDLE read_state;
public:
- long inc_refcnt () {return InterlockedIncrement (&_refcnt);}
- long dec_refcnt () {return InterlockedDecrement (&_refcnt);}
+ long refcnt(long i = 0)
+ {
+ debug_only_printf ("%p, %s, i %d, refcnt %ld", this, get_name (), i, _refcnt + i);
+ return _refcnt += i;
+ }
class fhandler_base *archetype;
int usecount;
@@ -558,7 +557,7 @@ class fhandler_socket: public fhandler_base
int open (int flags, mode_t mode = 0);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
- inline ssize_t recv_internal (struct _WSAMSG *wsamsg, bool use_recvmsg) __attribute__ ((regparm (3)));
+ inline ssize_t recv_internal (struct _WSAMSG *wsamsg);
ssize_t recvfrom (void *ptr, size_t len, int flags,
struct sockaddr *from, int *fromlen);
ssize_t recvmsg (struct msghdr *msg, int flags);
@@ -1289,9 +1288,6 @@ class dev_console
bool insert_mode;
int use_mouse;
- bool ext_mouse_mode5;
- bool ext_mouse_mode6;
- bool ext_mouse_mode15;
bool use_focus;
bool raw_win32_keyboard_mode;
@@ -1374,7 +1370,6 @@ private:
ssize_t __stdcall write (const void *ptr, size_t len);
void doecho (const void *str, DWORD len) { (void) write (str, len); }
int close ();
- static bool exists () {return !!GetConsoleCP ();}
int tcflush (int);
int tcsetattr (int a, const struct termios *t);
@@ -1438,7 +1433,6 @@ class fhandler_pty_common: public fhandler_termios
int close ();
_off64_t lseek (_off64_t, int);
- bool bytes_available (DWORD& n);
void set_close_on_exec (bool val);
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);
@@ -1555,7 +1549,6 @@ public:
void fixup_after_fork (HANDLE parent);
void fixup_after_exec ();
int tcgetpgrp ();
- void flush_to_slave ();
fhandler_pty_master (void *) {}
~fhandler_pty_master ();
@@ -1721,6 +1714,7 @@ class fhandler_dev_clipboard: public fhandler_base
_off64_t pos;
void *membuffer;
size_t msize;
+ bool eof;
public:
fhandler_dev_clipboard ();
int is_windows () { return 1; }
diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc
index 86f126c24..203af58bb 100644
--- a/winsup/cygwin/fhandler_clipboard.cc
+++ b/winsup/cygwin/fhandler_clipboard.cc
@@ -41,7 +41,8 @@ typedef struct
} cygcb_t;
fhandler_dev_clipboard::fhandler_dev_clipboard ()
- : fhandler_base (), pos (0), membuffer (NULL), msize (0)
+ : fhandler_base (), pos (0), membuffer (NULL), msize (0),
+ eof (true)
{
/* FIXME: check for errors and loop until we can open the clipboard */
OpenClipboard (NULL);
@@ -68,6 +69,7 @@ int
fhandler_dev_clipboard::open (int flags, mode_t)
{
set_flags (flags | O_TEXT);
+ eof = false;
pos = 0;
if (membuffer)
free (membuffer);
@@ -156,28 +158,38 @@ set_clipboard (const void *buf, size_t len)
ssize_t __stdcall
fhandler_dev_clipboard::write (const void *buf, size_t len)
{
- /* write to our membuffer */
- size_t cursize = msize;
- void *tempbuffer = realloc (membuffer, cursize + len);
- if (!tempbuffer)
+ if (!eof)
{
- debug_printf ("Couldn't realloc() clipboard buffer for write");
- return -1;
- }
- membuffer = tempbuffer;
- msize = cursize + len;
- memcpy ((unsigned char *) membuffer + cursize, buf, len);
+ /* write to our membuffer */
+ size_t cursize = msize;
+ void *tempbuffer = realloc (membuffer, cursize + len);
+ if (!tempbuffer)
+ {
+ debug_printf ("Couldn't realloc() clipboard buffer for write");
+ return -1;
+ }
+ membuffer = tempbuffer;
+ msize = cursize + len;
+ memcpy ((unsigned char *) membuffer + cursize, buf, len);
- /* now pass to windows */
- if (set_clipboard (membuffer, msize))
+ /* now pass to windows */
+ if (set_clipboard (membuffer, msize))
+ {
+ /* FIXME: membuffer is now out of sync with pos, but msize
+ is used above */
+ return -1;
+ }
+
+ pos = msize;
+
+ eof = false;
+ return len;
+ }
+ else
{
- /* FIXME: membuffer is now out of sync with pos, but msize
- is used above */
- return -1;
+ /* FIXME: return 0 bytes written, file not open */
+ return 0;
}
-
- pos = msize;
- return len;
}
int __stdcall
@@ -218,65 +230,66 @@ void __stdcall
fhandler_dev_clipboard::read (void *ptr, size_t& len)
{
HGLOBAL hglb;
- size_t ret = 0;
+ size_t ret;
UINT formatlist[2];
int format;
- LPVOID cb_data;
+ size_t plen = len;
+ len = 0;
+ if (eof)
+ return;
if (!OpenClipboard (NULL))
+ return;
+ formatlist[0] = cygnativeformat;
+ formatlist[1] = CF_UNICODETEXT;
+ if ((format = GetPriorityClipboardFormat (formatlist, 2)) <= 0)
{
- len = 0;
+ CloseClipboard ();
return;
}
- formatlist[0] = cygnativeformat;
- formatlist[1] = CF_UNICODETEXT;
- if ((format = GetPriorityClipboardFormat (formatlist, 2)) <= 0
- || !(hglb = GetClipboardData (format))
- || !(cb_data = GlobalLock (hglb)))
+ if (!(hglb = GetClipboardData (format)))
{
CloseClipboard ();
- len = 0;
return;
}
if (format == cygnativeformat)
{
- cygcb_t *clipbuf = (cygcb_t *) cb_data;
+ cygcb_t *clipbuf;
- if (pos < clipbuf->len)
- {
- ret = ((len > (clipbuf->len - pos)) ? (clipbuf->len - pos) : len);
- memcpy (ptr, clipbuf->data + pos , ret);
- pos += ret;
+ if (!(clipbuf = (cygcb_t *) GlobalLock (hglb)))
+ {
+ CloseClipboard ();
+ return;
}
+ ret = ((plen > (clipbuf->len - pos)) ? (clipbuf->len - pos) : plen);
+ memcpy (ptr, clipbuf->data + pos , ret);
+ pos += ret;
+ if (pos + plen - ret >= clipbuf->len)
+ eof = true;
}
else
{
- wchar_t *buf = (wchar_t *) cb_data;
+ int wret;
+ PWCHAR buf;
- size_t glen = GlobalSize (hglb) / sizeof (WCHAR) - 1;
- if (pos < glen)
+ if (!(buf = (PWCHAR) GlobalLock (hglb)))
{
- /* Comparing apples and oranges here, but the below loop could become
- extremly slow otherwise. We rather return a few bytes less than
- possible instead of being even more slow than usual... */
- if (glen > pos + len)
- glen = pos + len;
- /* This loop is necessary because the number of bytes returned by
- sys_wcstombs does not indicate the number of wide chars used for
- it, so we could potentially drop wide chars. */
- while ((ret = sys_wcstombs (NULL, 0, buf + pos, glen - pos))
- != (size_t) -1
- && ret > len)
- --glen;
- if (ret == (size_t) -1)
- ret = 0;
- else
- {
- ret = sys_wcstombs ((char *) ptr, (size_t) -1,
- buf + pos, glen - pos);
- pos = glen;
- }
+ CloseClipboard ();
+ return;
}
+ size_t glen = GlobalSize (hglb) / sizeof (WCHAR) - 1;
+ /* This loop is necessary because the number of bytes returned by
+ sys_wcstombs does not indicate the number of wide chars used for
+ it, so we could potentially drop wide chars. */
+ if (glen - pos > plen)
+ glen = pos + plen;
+ while ((wret = sys_wcstombs (NULL, 0, buf + pos, glen - pos)) != -1
+ && (size_t) wret > plen)
+ --glen;
+ ret = sys_wcstombs ((char *) ptr, plen, buf + pos, glen - pos);
+ pos += ret;
+ if (pos + plen - ret >= wcslen (buf))
+ eof = true;
}
GlobalUnlock (hglb);
CloseClipboard ();
@@ -303,6 +316,7 @@ fhandler_dev_clipboard::close ()
{
if (!have_execed)
{
+ eof = true;
pos = 0;
if (membuffer)
{
@@ -319,6 +333,7 @@ fhandler_dev_clipboard::fixup_after_exec ()
{
if (!close_on_exec ())
{
+ eof = false;
pos = msize = 0;
membuffer = NULL;
}
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 0dcd1262b..7478eae19 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -36,15 +36,11 @@ details. */
#include <asm/socket.h>
#include "sync.h"
#include "child_info.h"
-#include "cygwait.h"
/* Don't make this bigger than NT_MAX_PATH as long as the temporary buffer
is allocated using tmp_pathbuf!!! */
#define CONVERT_LIMIT NT_MAX_PATH
-#define ALT_PRESSED (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)
-#define CTRL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
-
/*
* Scroll the screen context.
* x1, y1 - ul corner
@@ -140,19 +136,18 @@ fhandler_console::set_unit ()
fh_devices devset;
lock_ttys here;
HWND me;
- fh_devices this_unit = dev ();
- bool generic_console = this_unit == FH_CONIN || this_unit == FH_CONOUT;
if (shared_console_info)
{
+ fh_devices this_unit = dev ();
fh_devices shared_unit =
(fh_devices) shared_console_info->tty_min_state.getntty ();
devset = (shared_unit == this_unit || this_unit == FH_CONSOLE
- || generic_console
+ || this_unit == FH_CONIN || this_unit == FH_CONOUT
|| this_unit == FH_TTY) ?
shared_unit : FH_ERROR;
created = false;
}
- else if ((!generic_console && (myself->ctty != -1 && !iscons_dev (myself->ctty)))
+ else if ((myself->ctty != -1 && !iscons_dev (myself->ctty))
|| !(me = GetConsoleWindow ()))
devset = FH_ERROR;
else
@@ -308,6 +303,14 @@ fhandler_console::mouse_aware (MOUSE_EVENT_RECORD& mouse_event)
return 0;
}
+ /* Check whether adjusted mouse position can be reported */
+ if (dev_state.dwMousePosition.X > 0xFF - ' ' - 1
+ || dev_state.dwMousePosition.Y > 0xFF - ' ' - 1)
+ {
+ /* Mouse position out of reporting range */
+ return 0;
+ }
+
return ((mouse_event.dwEventFlags == 0 || mouse_event.dwEventFlags == DOUBLE_CLICK)
&& mouse_event.dwButtonState != dev_state.dwLastButtonState)
|| mouse_event.dwEventFlags == MOUSE_WHEELED
@@ -356,9 +359,9 @@ fhandler_console::read (void *pv, size_t& buflen)
{
case WAIT_OBJECT_0:
break;
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0 + 1:
goto sig_exit;
- case WAIT_CANCELED:
+ case WAIT_OBJECT_0 + 2:
process_state.pop ();
pthread::static_cancel_self ();
/*NOTREACHED*/
@@ -417,6 +420,8 @@ fhandler_console::read (void *pv, size_t& buflen)
#define ich (input_rec.Event.KeyEvent.uChar.AsciiChar)
#define wch (input_rec.Event.KeyEvent.uChar.UnicodeChar)
+#define ALT_PRESSED (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)
+#define CTRL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
/* Ignore key up events, except for left alt events with non-zero character
*/
@@ -447,13 +452,12 @@ fhandler_console::read (void *pv, size_t& buflen)
{
char c = dev_state.backspace_keycode;
nread = 0;
- if (control_key_state & ALT_PRESSED)
- {
- if (dev_state.metabit)
- c |= 0x80;
- else
- tmp[nread++] = '\e';
- }
+ if (control_key_state & ALT_PRESSED) {
+ if (dev_state.metabit)
+ c |= 0x80;
+ else
+ tmp[nread++] = '\e';
+ }
tmp[nread++] = c;
tmp[nread] = 0;
toadd = tmp;
@@ -517,6 +521,8 @@ fhandler_console::read (void *pv, size_t& buflen)
}
#undef ich
#undef wch
+#undef ALT_PRESSED
+#undef CTRL_PRESSED
break;
case MOUSE_EVENT:
@@ -544,7 +550,6 @@ fhandler_console::read (void *pv, size_t& buflen)
events at the same time. */
int b = 0;
char sz[32];
- char mode6_term = 'M';
if (mouse_event.dwEventFlags == MOUSE_WHEELED)
{
@@ -568,7 +573,7 @@ fhandler_console::read (void *pv, size_t& buflen)
{
b = dev_state.last_button_code;
}
- else if (mouse_event.dwButtonState < dev_state.dwLastButtonState && !dev_state.ext_mouse_mode6)
+ else if (mouse_event.dwButtonState < dev_state.dwLastButtonState)
{
b = 3;
strcpy (sz, "btn up");
@@ -589,10 +594,6 @@ fhandler_console::read (void *pv, size_t& buflen)
strcpy (sz, "btn3 down");
}
- if (dev_state.ext_mouse_mode6 /* distinguish release */
- && mouse_event.dwButtonState < dev_state.dwLastButtonState)
- mode6_term = 'm';
-
dev_state.last_button_code = b;
if (mouse_event.dwEventFlags == MOUSE_MOVED)
@@ -615,90 +616,34 @@ fhandler_console::read (void *pv, size_t& buflen)
dev_state.nModifiers = 0;
if (mouse_event.dwControlKeyState & SHIFT_PRESSED)
dev_state.nModifiers |= 0x4;
- if (mouse_event.dwControlKeyState & ALT_PRESSED)
+ if (mouse_event.dwControlKeyState & (RIGHT_ALT_PRESSED|LEFT_ALT_PRESSED))
dev_state.nModifiers |= 0x8;
- if (mouse_event.dwControlKeyState & CTRL_PRESSED)
+ if (mouse_event.dwControlKeyState & (RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED))
dev_state.nModifiers |= 0x10;
/* Indicate the modifiers */
b |= dev_state.nModifiers;
/* We can now create the code. */
- if (dev_state.ext_mouse_mode6)
- {
- __small_sprintf (tmp, "\033[<%d;%d;%d%c", b,
- dev_state.dwMousePosition.X + 1,
- dev_state.dwMousePosition.Y + 1,
- mode6_term);
- nread = strlen (tmp);
- }
- else if (dev_state.ext_mouse_mode15)
- {
- __small_sprintf (tmp, "\033[%d;%d;%dM", b + 32,
- dev_state.dwMousePosition.X + 1,
- dev_state.dwMousePosition.Y + 1);
- nread = strlen (tmp);
- }
- else if (dev_state.ext_mouse_mode5)
- {
- unsigned int xcode = dev_state.dwMousePosition.X + ' ' + 1;
- unsigned int ycode = dev_state.dwMousePosition.Y + ' ' + 1;
-
- __small_sprintf (tmp, "\033[M%c", b + ' ');
- nread = 4;
- /* the neat nested encoding function of mintty
- does not compile in g++, so let's unfold it: */
- if (xcode < 0x80)
- tmp [nread++] = xcode;
- else if (xcode < 0x800)
- {
- tmp [nread++] = 0xC0 + (xcode >> 6);
- tmp [nread++] = 0x80 + (xcode & 0x3F);
- }
- else
- tmp [nread++] = 0;
- if (ycode < 0x80)
- tmp [nread++] = ycode;
- else if (ycode < 0x800)
- {
- tmp [nread++] = 0xC0 + (ycode >> 6);
- tmp [nread++] = 0x80 + (ycode & 0x3F);
- }
- else
- tmp [nread++] = 0;
- }
- else
- {
- unsigned int xcode = dev_state.dwMousePosition.X + ' ' + 1;
- unsigned int ycode = dev_state.dwMousePosition.Y + ' ' + 1;
- if (xcode >= 256)
- xcode = 0;
- if (ycode >= 256)
- ycode = 0;
- __small_sprintf (tmp, "\033[M%c%c%c", b + ' ',
- xcode, ycode);
- nread = 6; /* tmp may contain NUL bytes */
- }
- syscall_printf ("mouse: %s at (%d,%d)", sz,
- dev_state.dwMousePosition.X,
- dev_state.dwMousePosition.Y);
+ sprintf (tmp, "\033[M%c%c%c", b + ' ', dev_state.dwMousePosition.X + ' ' + 1, dev_state.dwMousePosition.Y + ' ' + 1);
+ syscall_printf ("mouse: %s at (%d,%d)", sz, dev_state.dwMousePosition.X, dev_state.dwMousePosition.Y);
toadd = tmp;
+ nread = 6;
}
}
break;
case FOCUS_EVENT:
- if (dev_state.use_focus)
- {
- if (input_rec.Event.FocusEvent.bSetFocus)
- __small_sprintf (tmp, "\033[I");
- else
- __small_sprintf (tmp, "\033[O");
-
- toadd = tmp;
- nread = 3;
- }
+ if (dev_state.use_focus) {
+ if (input_rec.Event.FocusEvent.bSetFocus)
+ sprintf (tmp, "\033[I");
+ else
+ sprintf (tmp, "\033[O");
+
+ toadd = tmp;
+ nread = 3;
+ }
break;
case WINDOW_BUFFER_SIZE_EVENT:
@@ -1571,30 +1516,22 @@ fhandler_console::char_command (char c)
case 1000: /* Mouse tracking */
dev_state.use_mouse = (c == 'h') ? 1 : 0;
+ syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
break;
case 1002: /* Mouse button event tracking */
dev_state.use_mouse = (c == 'h') ? 2 : 0;
+ syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
break;
case 1003: /* Mouse any event tracking */
dev_state.use_mouse = (c == 'h') ? 3 : 0;
+ syscall_printf ("mouse support set to mode %d", dev_state.use_mouse);
break;
case 1004: /* Focus in/out event reporting */
dev_state.use_focus = (c == 'h') ? true : false;
- break;
-
- case 1005: /* Extended mouse mode */
- dev_state.ext_mouse_mode5 = c == 'h';
- break;
-
- case 1006: /* SGR extended mouse mode */
- dev_state.ext_mouse_mode6 = c == 'h';
- break;
-
- case 1015: /* Urxvt extended mouse mode */
- dev_state.ext_mouse_mode15 = c == 'h';
+ syscall_printf ("focus reporting set to %d", dev_state.use_focus);
break;
case 2000: /* Raw keyboard mode */
@@ -2012,7 +1949,8 @@ fhandler_console::write (const void *vsrc, size_t len)
while (src < end)
{
- paranoid_printf ("char %0c state is %d", *src, dev_state.state_);
+ debug_printf ("at %d(%c) state is %d", *src, isprint (*src) ? *src : ' ',
+ dev_state.state_);
switch (dev_state.state_)
{
case normal:
@@ -2223,13 +2161,15 @@ get_nonascii_key (INPUT_RECORD& input_rec, char *tmp)
int modifier_index = NORMAL;
if (input_rec.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED)
modifier_index = SHIFT;
- if (input_rec.Event.KeyEvent.dwControlKeyState & CTRL_PRESSED)
+ if (input_rec.Event.KeyEvent.dwControlKeyState &
+ (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
modifier_index += CONTROL;
for (int i = 0; keytable[i].vk; i++)
if (input_rec.Event.KeyEvent.wVirtualKeyCode == keytable[i].vk)
{
- if ((input_rec.Event.KeyEvent.dwControlKeyState & ALT_PRESSED)
+ if ((input_rec.Event.KeyEvent.dwControlKeyState &
+ (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED))
&& keytable[i].val[modifier_index] != NULL)
{ /* Generic ESC prefixing if Alt is pressed */
tmp[0] = '\033';
@@ -2430,7 +2370,7 @@ bool
fhandler_console::need_invisible ()
{
BOOL b = false;
- if (exists ())
+ if (GetConsoleCP ())
invisible_console = false;
else
{
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 8ed8a8155..734d0accf 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -154,26 +154,11 @@ public:
inline bool
path_conv::isgood_inode (__ino64_t ino) const
{
- /* If the FS doesn't support nonambiguous inode numbers anyway, bail out
- immediately. */
- if (!hasgood_inode ())
- return false;
- /* If the inode numbers are 64 bit numbers or if it's a local FS, they
- are to be trusted. */
- if (ino > UINT32_MAX || !isremote ())
- return true;
- /* The inode numbers returned from a remote NT4 NTFS are ephemeral
- 32 bit numbers. */
- if (fs_is_ntfs ())
- return false;
- /* Starting with version 3.5.4, Samba returns the real inode numbers, if
- the file is on the same device as the root of the share (Samba function
- get_FileIndex). 32 bit inode numbers returned by older versions (likely
- < 3.0) are ephemeral. */
- if (fs_is_samba () && fs.samba_version () < 0x03050400)
- return false;
- /* Otherwise, trust the inode numbers unless proved otherwise. */
- return true;
+ /* We can't trust remote inode numbers of only 32 bit. That means,
+ remote NT4 NTFS, as well as shares of Samba version < 3.0.
+ The known exception are SFU NFS shares, which return the valid 32 bit
+ inode number from the remote file system unchanged. */
+ return hasgood_inode () && (ino > UINT32_MAX || !isremote () || fs_is_nfs ());
}
/* Check reparse point for type. IO_REPARSE_TAG_MOUNT_POINT types are
@@ -984,6 +969,7 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp)
cant_access_acl:
switch (cmd)
{
+ struct __stat64 st;
case SETACL:
/* Open for writing required to be able to set ctime
@@ -999,7 +985,6 @@ cant_access_acl:
set_errno (ENOSPC);
else
{
- struct __stat64 st;
if (!fstat (&st))
{
aclbufp[0].a_type = USER_OBJ;
@@ -1283,8 +1268,7 @@ fhandler_disk_file::link (const char *newpath)
status = NtSetInformationFile (fh, &io, pfli, size, FileLinkInformation);
if (!NT_SUCCESS (status))
{
- if (status == STATUS_INVALID_DEVICE_REQUEST
- || status == STATUS_NOT_SUPPORTED)
+ if (status == STATUS_INVALID_DEVICE_REQUEST)
{
/* FS doesn't support hard links. Linux returns EPERM. */
set_errno (EPERM);
diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc
index b16606615..1cb3b465e 100644
--- a/winsup/cygwin/fhandler_dsp.cc
+++ b/winsup/cygwin/fhandler_dsp.cc
@@ -21,7 +21,6 @@ details. */
#include "dtable.h"
#include "cygheap.h"
#include "sigproc.h"
-#include "cygwait.h"
/*------------------------------------------------------------------------
Simple encapsulation of the win32 audio device.
@@ -545,14 +544,14 @@ fhandler_dev_dsp::Audio_out::waitforspace ()
debug_printf ("100ms");
switch (cygwait (100))
{
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0:
if (!_my_tls.call_signal_handler ())
{
set_errno (EINTR);
return false;
}
break;
- case WAIT_CANCELED:
+ case WAIT_OBJECT_0 + 1:
pthread::static_cancel_self ();
/*NOTREACHED*/
default:
@@ -923,14 +922,14 @@ fhandler_dev_dsp::Audio_in::waitfordata ()
debug_printf ("100ms");
switch (cygwait (100))
{
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0:
if (!_my_tls.call_signal_handler ())
{
set_errno (EINTR);
return false;
}
break;
- case WAIT_CANCELED:
+ case WAIT_OBJECT_0 + 1:
pthread::static_cancel_self ();
/*NOTREACHED*/
default:
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index d2b236d5c..0e2d2bde4 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -22,7 +22,6 @@
#include "cygtls.h"
#include "shared_info.h"
#include "ntdll.h"
-#include "cygwait.h"
fhandler_fifo::fhandler_fifo ():
fhandler_base_overlapped (),
@@ -243,14 +242,6 @@ fhandler_fifo::wait (HANDLE h)
case WAIT_OBJECT_0:
debug_only_printf ("successfully waited for %s", what);
return true;
- case WAIT_SIGNALED:
- debug_only_printf ("interrupted by signal while waiting for %s", what);
- set_errno (EINTR);
- return false;
- case WAIT_CANCELED:
- debug_only_printf ("cancellable interruption while waiting for %s", what);
- pthread::static_cancel_self (); /* never returns */
- break;
case WAIT_TIMEOUT:
if (h == write_ready)
{
@@ -263,6 +254,14 @@ fhandler_fifo::wait (HANDLE h)
return false;
}
break;
+ case WAIT_OBJECT_0 + 1:
+ debug_only_printf ("interrupted by signal while waiting for %s", what);
+ set_errno (EINTR);
+ return false;
+ case WAIT_OBJECT_0 + 2:
+ debug_only_printf ("cancellable interruption while waiting for %s", what);
+ pthread::static_cancel_self (); /* never returns */
+ break;
default:
debug_only_printf ("unknown error while waiting for %s", what);
__seterrno ();
diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc
index 6b3431bbb..c3c442ebd 100644
--- a/winsup/cygwin/fhandler_mem.cc
+++ b/winsup/cygwin/fhandler_mem.cc
@@ -1,7 +1,7 @@
/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
- 2010, 2011, 2012 Red Hat, Inc.
+ 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -36,7 +36,7 @@ fhandler_dev_mem::open (int flags, mode_t)
if (!wincap.has_physical_mem_access ())
{
- set_errno (EACCES);
+ set_errno (ENOENT);
debug_printf ("%s is accessible under NT4/W2K/XP only", dev ().name);
return 0;
}
diff --git a/winsup/cygwin/fhandler_nodevice.cc b/winsup/cygwin/fhandler_nodevice.cc
index 39842d394..4ffe2c447 100644
--- a/winsup/cygwin/fhandler_nodevice.cc
+++ b/winsup/cygwin/fhandler_nodevice.cc
@@ -15,14 +15,10 @@ details. */
#include "fhandler.h"
int
-fhandler_nodevice::open (int flags, mode_t)
+fhandler_nodevice::open (int, mode_t)
{
if (!pc.error)
set_errno (ENXIO);
- /* Fixup EROFS error returned from path_conv if /dev is not backed by real
- directory on disk and the file doesn't exist. */
- else if (pc.error == EROFS && (flags & O_ACCMODE) == O_RDONLY)
- set_errno (ENOENT);
return 0;
}
diff --git a/winsup/cygwin/fhandler_procnet.cc b/winsup/cygwin/fhandler_procnet.cc
index 21af9fe35..836bf33b8 100644
--- a/winsup/cygwin/fhandler_procnet.cc
+++ b/winsup/cygwin/fhandler_procnet.cc
@@ -1,6 +1,6 @@
/* fhandler_procnet.cc: fhandler for /proc/net virtual filesystem
- Copyright 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -9,7 +9,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#define __INSIDE_CYGWIN_NET__
-#define USE_SYS_TYPES_FD_SET
+
#include "winsup.h"
#include "cygerrno.h"
#include "security.h"
@@ -18,9 +18,13 @@ details. */
#include "fhandler_virtual.h"
#include "dtable.h"
#include "cygheap.h"
-#include <ws2tcpip.h>
+
+#include <netdb.h>
+#define USE_SYS_TYPES_FD_SET
+#include <winsock2.h>
#include <iphlpapi.h>
#include <asm/byteorder.h>
+#include <cygwin/in6.h>
#define _COMPILING_NEWLIB
#include <dirent.h>
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc
index 787922962..e0e595f19 100644
--- a/winsup/cygwin/fhandler_registry.cc
+++ b/winsup/cygwin/fhandler_registry.cc
@@ -77,12 +77,10 @@ static const HKEY registry_keys[] =
static const int ROOT_KEY_COUNT = sizeof (registry_keys) / sizeof (HKEY);
-#ifndef __MINGW64_VERSION_MAJOR
extern "C" {
LONG WINAPI RegOpenUserClassesRoot (HANDLE, DWORD, REGSAM, PHKEY);
LONG WINAPI RegOpenCurrentUser (REGSAM, PHKEY);
};
-#endif
/* Make sure to access the correct per-user HKCR and HKCU hives, even if
the current user is only impersonated in another user's session. */
@@ -850,7 +848,6 @@ fhandler_registry::open (int flags, mode_t mode)
{
set_errno (EROFS);
res = 0;
- goto out;
}
else
{
diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc
index 96b4062f1..677b6221f 100644
--- a/winsup/cygwin/fhandler_serial.cc
+++ b/winsup/cygwin/fhandler_serial.cc
@@ -19,13 +19,7 @@ details. */
#include "sigproc.h"
#include "pinfo.h"
#include <asm/socket.h>
-#ifdef __MINGW64_VERSION_MAJOR
-#include <devioctl.h>
-#include <ntddser.h>
-#else
#include <ddk/ntddser.h>
-#endif
-#include "cygwait.h"
/**********************************************************************/
/* fhandler_serial */
@@ -77,7 +71,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
termios_printf ("error detected %x", ev);
else if (st.cbInQue && !vtime_)
inq = st.cbInQue;
- else if (!is_nonblocking () && !overlapped_armed)
+ else if (!overlapped_armed)
{
if ((size_t) tot >= minchars)
break;
@@ -89,6 +83,16 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
}
else if (GetLastError () != ERROR_IO_PENDING)
goto err;
+ else if (is_nonblocking ())
+ {
+ PurgeComm (get_handle (), PURGE_RXABORT);
+ if (tot == 0)
+ {
+ tot = -1;
+ set_errno (EAGAIN);
+ }
+ goto out;
+ }
else
{
overlapped_armed = 1;
@@ -100,13 +104,13 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
goto err;
debug_printf ("n %d, ev %x", n, ev);
break;
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0 + 1:
tot = -1;
PurgeComm (get_handle (), PURGE_RXABORT);
overlapped_armed = 0;
set_sig_errno (EINTR);
goto out;
- case WAIT_CANCELED:
+ case WAIT_OBJECT_0 + 2:
PurgeComm (get_handle (), PURGE_RXABORT);
overlapped_armed = 0;
pthread::static_cancel_self ();
@@ -128,14 +132,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
goto err;
else if (is_nonblocking ())
{
- /* Use CancelIo rather than PurgeComm (PURGE_RXABORT) since
- PurgeComm apparently discards in-flight bytes while CancelIo
- only stops the overlapped IO routine. */
- CancelIo (get_handle ());
- if (GetOverlappedResult (get_handle (), &io_status, &n, FALSE))
- tot = n;
- else if (GetLastError () != ERROR_OPERATION_ABORTED)
- goto err;
+ PurgeComm (get_handle (), PURGE_RXABORT);
if (tot == 0)
{
tot = -1;
@@ -207,12 +204,12 @@ fhandler_serial::raw_write (const void *ptr, size_t len)
{
case WAIT_OBJECT_0:
break;
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0 + 1:
PurgeComm (get_handle (), PURGE_TXABORT);
set_sig_errno (EINTR);
ForceCloseHandle (write_status.hEvent);
return -1;
- case WAIT_CANCELED:
+ case WAIT_OBJECT_0 + 2:
PurgeComm (get_handle (), PURGE_TXABORT);
pthread::static_cancel_self ();
/*NOTREACHED*/
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index a11c7efbe..f78002801 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -12,21 +12,24 @@
/* #define DEBUG_NEST_ON 1 */
#define __INSIDE_CYGWIN_NET__
-#define USE_SYS_TYPES_FD_SET
#include "winsup.h"
+#include <sys/un.h>
+#include <asm/byteorder.h>
+
+#include <stdlib.h>
+#define USE_SYS_TYPES_FD_SET
+#include <winsock2.h>
+#include <mswsock.h>
+#include <iphlpapi.h>
#include "cygerrno.h"
#include "security.h"
+#include "cygwin/version.h"
+#include "perprocess.h"
#include "path.h"
#include "fhandler.h"
#include "dtable.h"
#include "cygheap.h"
-#include <ws2tcpip.h>
-#include <mswsock.h>
-#include <iphlpapi.h>
-#include <asm/byteorder.h>
-#include "cygwin/version.h"
-#include "perprocess.h"
#include "shared_info.h"
#include "sigproc.h"
#include "wininfo.h"
@@ -34,7 +37,7 @@
#include <sys/param.h>
#include <sys/acl.h>
#include "cygtls.h"
-#include <sys/un.h>
+#include "cygwin/in6.h"
#include "ntdll.h"
#include "miscfuncs.h"
@@ -125,7 +128,9 @@ get_inet_addr (const struct sockaddr *in, int inlen,
some greedy Win32 application. Therefore we should never wait
endlessly without checking for signals and thread cancel event. */
pthread_testcancel ();
- if (cancelable_wait (NULL, cw_nowait, cw_sig_eintr) == WAIT_SIGNALED
+ /* Using IsEventSignalled like this is racy since another thread could
+ be waiting for signal_arrived. */
+ if (IsEventSignalled (signal_arrived)
&& !_my_tls.call_signal_handler ())
{
set_errno (EINTR);
@@ -657,8 +662,7 @@ fhandler_socket::wait_for_events (const long event_mask, const DWORD flags)
return SOCKET_ERROR;
}
- WSAEVENT ev[2] = { wsock_evt };
- set_signal_arrived here (ev[1]);
+ WSAEVENT ev[2] = { wsock_evt, signal_arrived };
switch (WSAWaitForMultipleEvents (2, ev, FALSE, 50, FALSE))
{
case WSA_WAIT_TIMEOUT:
@@ -1125,9 +1129,14 @@ fhandler_socket::listen (int backlog)
}
else if (get_addr_family () == AF_INET6)
{
- struct sockaddr_in6 sin6;
- memset (&sin6, 0, sizeof sin6);
- sin6.sin6_family = AF_INET6;
+ struct sockaddr_in6 sin6 =
+ {
+ sin6_family: AF_INET6,
+ sin6_port: 0,
+ sin6_flowinfo: 0,
+ sin6_addr: {{IN6ADDR_ANY_INIT}},
+ sin6_scope_id: 0
+ };
if (!::bind (get_socket (), (struct sockaddr *) &sin6, sizeof sin6))
res = ::listen (get_socket (), backlog);
}
@@ -1330,7 +1339,7 @@ fhandler_socket::read (void *in_ptr, size_t& len)
{
WSABUF wsabuf = { len, (char *) in_ptr };
WSAMSG wsamsg = { NULL, 0, &wsabuf, 1, { 0, NULL }, 0 };
- len = recv_internal (&wsamsg, false);
+ len = recv_internal (&wsamsg);
}
int
@@ -1346,16 +1355,14 @@ fhandler_socket::readv (const struct iovec *const iov, const int iovcnt,
wsaptr->buf = (char *) iovptr->iov_base;
}
WSAMSG wsamsg = { NULL, 0, wsabuf, iovcnt, { 0, NULL}, 0 };
- return recv_internal (&wsamsg, false);
+ return recv_internal (&wsamsg);
}
extern "C" {
-#ifndef __MINGW64_VERSION_MAJOR
#define WSAID_WSARECVMSG \
{0xf689d7c8,0x6f1f,0x436b,{0x8a,0x53,0xe5,0x4f,0xe3,0x51,0xc3,0x22}};
typedef int (WSAAPI *LPFN_WSARECVMSG)(SOCKET,LPWSAMSG,LPDWORD,LPWSAOVERLAPPED,
LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-#endif
int WSAAPI WSASendMsg(SOCKET,LPWSAMSG,DWORD,LPDWORD, LPWSAOVERLAPPED,
LPWSAOVERLAPPED_COMPLETION_ROUTINE);
};
@@ -1375,32 +1382,28 @@ get_ext_funcptr (SOCKET sock, void *funcptr)
}
inline ssize_t
-fhandler_socket::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
+fhandler_socket::recv_internal (LPWSAMSG wsamsg)
{
ssize_t res = 0;
DWORD ret = 0, wret;
int evt_mask = FD_READ | ((wsamsg->dwFlags & MSG_OOB) ? FD_OOB : 0);
LPWSABUF &wsabuf = wsamsg->lpBuffers;
ULONG &wsacnt = wsamsg->dwBufferCount;
+ bool use_recvmsg = false;
static NO_COPY LPFN_WSARECVMSG WSARecvMsg;
DWORD wait_flags = wsamsg->dwFlags;
bool waitall = !!(wait_flags & MSG_WAITALL);
wsamsg->dwFlags &= (MSG_OOB | MSG_PEEK | MSG_DONTROUTE);
- if (use_recvmsg)
+ if (wsamsg->Control.len > 0)
{
if (!WSARecvMsg
&& get_ext_funcptr (get_socket (), &WSARecvMsg) == SOCKET_ERROR)
{
- if (wsamsg->Control.len > 0)
- {
- set_winsock_errno ();
- return SOCKET_ERROR;
- }
- use_recvmsg = false;
+ set_winsock_errno ();
+ return SOCKET_ERROR;
}
- else /* Only MSG_PEEK is supported by WSARecvMsg. */
- wsamsg->dwFlags &= MSG_PEEK;
+ use_recvmsg = true;
}
if (waitall)
{
@@ -1507,7 +1510,7 @@ fhandler_socket::recvfrom (void *ptr, size_t len, int flags,
&wsabuf, 1,
{ 0, NULL},
flags };
- ssize_t ret = recv_internal (&wsamsg, false);
+ ssize_t ret = recv_internal (&wsamsg);
if (fromlen)
*fromlen = wsamsg.namelen;
return ret;
@@ -1522,12 +1525,12 @@ fhandler_socket::recvmsg (struct msghdr *msg, int flags)
/* Disappointing but true: Even if WSARecvMsg is supported, it's only
supported for datagram and raw sockets. */
- bool use_recvmsg = true;
- if (get_socket_type () == SOCK_STREAM || get_addr_family () == AF_LOCAL
- || !wincap.has_recvmsg ())
+ if (!wincap.has_recvmsg () || get_socket_type () == SOCK_STREAM
+ || get_addr_family () == AF_LOCAL)
{
- use_recvmsg = false;
msg->msg_controllen = 0;
+ if (!CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDR)
+ msg->msg_flags = 0;
}
WSABUF wsabuf[msg->msg_iovlen];
@@ -1542,7 +1545,7 @@ fhandler_socket::recvmsg (struct msghdr *msg, int flags)
wsabuf, msg->msg_iovlen,
{ msg->msg_controllen, (char *) msg->msg_control },
flags };
- ssize_t ret = recv_internal (&wsamsg, use_recvmsg);
+ ssize_t ret = recv_internal (&wsamsg);
if (ret >= 0)
{
msg->msg_namelen = wsamsg.namelen;
@@ -1781,7 +1784,7 @@ fhandler_socket::close ()
res = -1;
break;
}
- if (cygwait (10) == WAIT_SIGNALED)
+ if (WaitForSingleObject (signal_arrived, 10) == WAIT_OBJECT_0)
{
set_errno (EINTR);
res = -1;
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index 855fd5dfd..c394d862d 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -15,12 +15,7 @@ details. */
#include <stdlib.h>
#include <sys/mtio.h>
#include <sys/param.h>
-#ifdef __MINGW64_VERSION_MAJOR
-#include <devioctl.h>
-#include <ntddstor.h>
-#else
#include <ddk/ntddstor.h>
-#endif
#include "security.h"
#include "path.h"
#include "fhandler.h"
@@ -1147,13 +1142,26 @@ mtinfo::initialize ()
inline bool
fhandler_dev_tape::_lock (bool cancelable)
{
+ HANDLE w4[3] = { mt_mtx, signal_arrived, NULL };
+ DWORD cnt = 2;
+ if (cancelable && (w4[2] = pthread::get_cancel_event ()) != NULL)
+ cnt = 3;
/* O_NONBLOCK is only valid in a read or write call. Only those are
cancelable. */
DWORD timeout = cancelable && is_nonblocking () ? 0 : INFINITE;
- switch (cancelable_wait (mt_mtx, timeout, cw_sig | cw_cancel | cw_cancel_self))
+restart:
+ switch (WaitForMultipleObjects (cnt, w4, FALSE, timeout))
{
case WAIT_OBJECT_0:
return true;
+ case WAIT_OBJECT_0 + 1:
+ if (_my_tls.call_signal_handler ())
+ goto restart;
+ set_errno (EINTR);
+ return false;
+ case WAIT_OBJECT_0 + 2:
+ pthread::static_cancel_self ();
+ /*NOTREACHED*/
case WAIT_TIMEOUT:
set_errno (EAGAIN);
return false;
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 18afacf1d..70fb12877 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -19,9 +19,6 @@ details. */
#include "pinfo.h"
#include "tty.h"
#include "cygtls.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "child_info.h"
#include "ntdll.h"
/* Common functions shared by tty/console */
@@ -204,7 +201,7 @@ fhandler_termios::bg_check (int sig)
{
/* Don't raise a SIGTT* signal if we have already been
interrupted by another signal. */
- if (cygwait ((DWORD) 0) != WAIT_SIGNALED)
+ if (WaitForSingleObject (signal_arrived, 0) != WAIT_OBJECT_0)
{
siginfo_t si = {0};
si.si_signo = sig;
@@ -237,7 +234,7 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
{
c = *rptr++;
- paranoid_printf ("char %0c", c);
+ termios_printf ("char %c", c);
/* Check for special chars */
@@ -400,8 +397,7 @@ fhandler_termios::sigflush ()
/* FIXME: Checking get_ttyp() for NULL is not right since it should not
be NULL while this is alive. However, we can conceivably close a
ctty while exiting and that will zero this. */
- if ((!have_execed || have_execed_cygwin) && get_ttyp ()
- && !(get_ttyp ()->ti.c_lflag & NOFLSH))
+ if (get_ttyp () && !(get_ttyp ()->ti.c_lflag & NOFLSH))
tcflush (TCIFLUSH);
}
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index c5b65c5b8..6189046b9 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -26,7 +26,6 @@ details. */
#include "cygthread.h"
#include "child_info.h"
#include <asm/socket.h>
-#include "cygwait.h"
#define close_maybe(h) \
do { \
@@ -51,32 +50,6 @@ fhandler_pty_slave::get_unit ()
return dev ().get_minor ();
}
-bool
-bytes_available (DWORD& n, HANDLE h)
-{
- DWORD navail, nleft;
- navail = nleft = 0;
- bool succeeded = PeekNamedPipe (h, NULL, 0, NULL, &navail, &nleft);
- if (succeeded)
- /* nleft should always be the right choice unless something has written 0
- bytes to the pipe. In that pathological case we return the actual number
- of bytes available in the pipe. See cgf-000008 for more details. */
- n = nleft ?: navail;
- else
- {
- termios_printf ("PeekNamedPipe(%p) failed, %E", h);
- n = 0;
- }
- debug_only_printf ("n %u, nleft %u, navail %u");
- return succeeded;
-}
-
-bool
-fhandler_pty_common::bytes_available (DWORD &n)
-{
- return ::bytes_available (n, get_handle ());
-}
-
#ifdef DEBUGGING
static class mutex_stack
{
@@ -89,16 +62,9 @@ public:
static int osi;
#endif /*DEBUGGING*/
-void
-fhandler_pty_master::flush_to_slave ()
-{
- if (get_readahead_valid () && !(get_ttyp ()->ti.c_lflag & ICANON))
- accept_input ();
-}
-
DWORD
fhandler_pty_common::__acquire_output_mutex (const char *fn, int ln,
- DWORD ms)
+ DWORD ms)
{
if (strace.active ())
strace.prntf (_STRACE_TERMIOS, fn, "(%d): pty output_mutex (%p): waiting %d ms", ln, output_mutex, ms);
@@ -176,7 +142,7 @@ fhandler_pty_master::accept_input ()
DWORD rc;
DWORD written = 0;
- paranoid_printf ("about to write %d chars to slave", bytes_left);
+ termios_printf ("about to write %d chars to slave", bytes_left);
rc = WriteFile (get_output_handle (), p, bytes_left, &written, NULL);
if (!rc)
{
@@ -228,8 +194,6 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on
int column = 0;
int rc = 0;
- flush_to_slave ();
-
if (len == 0)
goto out;
@@ -246,6 +210,7 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on
goto out;
}
+
for (;;)
{
/* Set RLEN to the number of bytes to read from the pipe. */
@@ -261,40 +226,50 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on
if (rlen > sizeof outbuf)
rlen = sizeof outbuf;
- n = 0;
- for (;;)
- {
- if (!bytes_available (n))
- goto err;
- if (n)
- break;
- if (hit_eof ())
- goto out;
- /* DISCARD (FLUSHO) and tcflush can finish here. */
- if ((get_ttyp ()->ti.c_lflag & FLUSHO || !buf))
- goto out;
+ HANDLE handle = get_io_handle ();
- if (is_nonblocking ())
+ n = 0; // get_readahead_into_buffer (outbuf, len);
+ if (!n)
+ {
+ /* Doing a busy wait like this is quite inefficient, but nothing
+ else seems to work completely. Windows should provide some sort
+ of overlapped I/O for pipes, or something, but it doesn't. */
+ while (1)
{
- set_errno (EAGAIN);
- rc = -1;
- goto out;
+ if (!PeekNamedPipe (handle, NULL, 0, NULL, &n, NULL))
+ {
+ termios_printf ("PeekNamedPipe(%p) failed, %E", handle);
+ goto err;
+ }
+ if (n > 0)
+ break;
+ if (hit_eof ())
+ goto out;
+ /* DISCARD (FLUSHO) and tcflush can finish here. */
+ if ((get_ttyp ()->ti.c_lflag & FLUSHO || !buf))
+ goto out;
+
+ if (is_nonblocking ())
+ {
+ set_errno (EAGAIN);
+ rc = -1;
+ goto out;
+ }
+ pthread_testcancel ();
+ if (WaitForSingleObject (signal_arrived, 10) == WAIT_OBJECT_0
+ && !_my_tls.call_signal_handler ())
+ {
+ set_errno (EINTR);
+ rc = -1;
+ goto out;
+ }
}
- pthread_testcancel ();
- if (cancelable_wait (NULL, 10, cw_sig_eintr) == WAIT_SIGNALED
- && !_my_tls.call_signal_handler ())
+
+ if (!ReadFile (handle, outbuf, rlen, &n, NULL))
{
- set_errno (EINTR);
- rc = -1;
- goto out;
+ termios_printf ("ReadFile failed, %E");
+ goto err;
}
- flush_to_slave ();
- }
-
- if (!ReadFile (get_handle (), outbuf, rlen, &n, NULL))
- {
- termios_printf ("ReadFile failed, %E");
- goto err;
}
termios_printf ("bytes read %u", n);
@@ -693,6 +668,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
size_t readlen;
DWORD bytes_in_pipe;
char buf[INP_BUFFER_SIZE];
+ char peek_buf[INP_BUFFER_SIZE];
DWORD time_to_wait;
bg_check_types bg = bg_check (SIGTTIN);
@@ -738,14 +714,14 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
goto out;
}
break;
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0 + 1:
if (totalread > 0)
goto out;
termios_printf ("wait catched signal");
set_sig_errno (EINTR);
totalread = -1;
goto out;
- case WAIT_CANCELED:
+ case WAIT_OBJECT_0 + 2:
process_state.pop ();
pthread::static_cancel_self ();
/*NOTREACHED*/
@@ -773,14 +749,14 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
case WAIT_OBJECT_0:
case WAIT_ABANDONED_0:
break;
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0 + 1:
if (totalread > 0)
goto out;
- termios_printf ("wait for mutex caught signal");
+ termios_printf ("wait for mutex catched signal");
set_sig_errno (EINTR);
totalread = -1;
goto out;
- case WAIT_CANCELED:
+ case WAIT_OBJECT_0 + 2:
process_state.pop ();
pthread::static_cancel_self ();
/*NOTREACHED*/
@@ -809,8 +785,12 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
}
goto out;
}
- if (!bytes_available (bytes_in_pipe))
- raise (SIGHUP);
+ if (!PeekNamedPipe (get_handle (), peek_buf, sizeof (peek_buf), &bytes_in_pipe, NULL, NULL))
+ {
+ termios_printf ("PeekNamedPipe failed, %E");
+ raise (SIGHUP);
+ bytes_in_pipe = 0;
+ }
/* On first peek determine no. of bytes to flush. */
if (!ptr && len == UINT_MAX)
@@ -835,6 +815,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
if (!ReadFile (get_handle (), buf, readlen, &n, NULL))
{
termios_printf ("read failed, %E");
+ bytes_in_pipe = 0;
raise (SIGHUP);
bytes_in_pipe = 0;
ptr = NULL;
@@ -845,8 +826,12 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
number of bytes in pipe, but for some reason this number doesn't
change after successful read. So we have to peek into the pipe
again to see if input is still available */
- if (!bytes_available (bytes_in_pipe))
- raise (SIGHUP);
+ if (!PeekNamedPipe (get_handle (), peek_buf, 1, &bytes_in_pipe, NULL, NULL))
+ {
+ termios_printf ("PeekNamedPipe failed, %E");
+ raise (SIGHUP);
+ bytes_in_pipe = 0;
+ }
if (n)
{
len -= n;
@@ -1014,15 +999,15 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg)
goto out;
case FIONREAD:
{
- DWORD n;
- if (!bytes_available (n))
+ int n;
+ if (!PeekNamedPipe (get_handle (), NULL, 0, NULL, (DWORD *) &n, NULL))
{
set_errno (EINVAL);
retval = -1;
}
else
{
- *(int *) arg = (int) n;
+ *(int *) arg = n;
retval = 0;
}
}
@@ -1280,6 +1265,11 @@ fhandler_pty_master::cleanup ()
int
fhandler_pty_master::close ()
{
+#if 0
+ while (accept_input () > 0)
+ continue;
+#endif
+
termios_printf ("closing from_master(%p)/to_master(%p) since we own them(%d)",
from_master, to_master, dwProcessId);
if (cygwin_finished_initializing)
@@ -1430,13 +1420,13 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
return this->tcsetpgrp ((pid_t) arg);
case FIONREAD:
{
- DWORD n;
- if (!::bytes_available (n, to_master))
+ int n;
+ if (!PeekNamedPipe (to_master, NULL, 0, NULL, (DWORD *) &n, NULL))
{
set_errno (EINVAL);
return -1;
}
- *(int *) arg = (int) n;
+ *(int *) arg = n;
}
break;
default:
@@ -1482,9 +1472,7 @@ fhandler_pty_slave::fixup_after_exec ()
fixup_after_fork (NULL);
}
-#ifndef __MINGW64_VERSION_MAJOR
extern "C" BOOL WINAPI GetNamedPipeClientProcessId (HANDLE, PULONG);
-#endif
/* This thread function handles the master control pipe. It waits for a
client to connect. Then it checks if the client process has permissions
diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_virtual.cc
index af73dde15..59bb6763c 100644
--- a/winsup/cygwin/fhandler_virtual.cc
+++ b/winsup/cygwin/fhandler_virtual.cc
@@ -77,6 +77,7 @@ fhandler_virtual::opendir (int fd)
if (fd >= 0)
{
dir->__d_fd = fd;
+ res = dir;
dir->__fh = this;
res = dir;
}
diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc
index cb22416df..c89d98e16 100644
--- a/winsup/cygwin/fhandler_windows.cc
+++ b/winsup/cygwin/fhandler_windows.cc
@@ -96,47 +96,43 @@ fhandler_windows::read (void *buf, size_t& len)
return;
}
- HANDLE w4[3] = { get_handle (), };
- set_signal_arrived here (w4[1]);
+ HANDLE w4[3] = { get_handle (), signal_arrived, NULL };
DWORD cnt = 2;
if ((w4[cnt] = pthread::get_cancel_event ()) != NULL)
++cnt;
- for (;;)
+restart:
+ switch (MsgWaitForMultipleObjectsEx (cnt, w4,
+ is_nonblocking () ? 0 : INFINITE,
+ QS_ALLINPUT | QS_ALLPOSTMESSAGE,
+ MWMO_INPUTAVAILABLE))
{
- switch (MsgWaitForMultipleObjectsEx (cnt, w4,
- is_nonblocking () ? 0 : INFINITE,
- QS_ALLINPUT | QS_ALLPOSTMESSAGE,
- MWMO_INPUTAVAILABLE))
+ case WAIT_OBJECT_0:
+ if (!PeekMessageW (ptr, hWnd_, 0, 0, PM_REMOVE))
{
- case WAIT_OBJECT_0:
- if (!PeekMessageW (ptr, hWnd_, 0, 0, PM_REMOVE))
- {
- len = (size_t) -1;
- __seterrno ();
- }
- else if (ptr->message == WM_QUIT)
- len = 0;
- else
- len = sizeof (MSG);
- break;
- case WAIT_OBJECT_0 + 1:
- if (_my_tls.call_signal_handler ())
- continue;
- len = (size_t) -1;
- set_errno (EINTR);
- break;
- case WAIT_OBJECT_0 + 2:
- pthread::static_cancel_self ();
- break;
- case WAIT_TIMEOUT:
- len = (size_t) -1;
- set_errno (EAGAIN);
- break;
- default:
len = (size_t) -1;
__seterrno ();
- break;
}
+ else if (ptr->message == WM_QUIT)
+ len = 0;
+ else
+ len = sizeof (MSG);
+ break;
+ case WAIT_OBJECT_0 + 1:
+ if (_my_tls.call_signal_handler ())
+ goto restart;
+ len = (size_t) -1;
+ set_errno (EINTR);
+ break;
+ case WAIT_OBJECT_0 + 2:
+ pthread::static_cancel_self ();
+ break;
+ case WAIT_TIMEOUT:
+ len = (size_t) -1;
+ set_errno (EAGAIN);
+ break;
+ default:
+ len = (size_t) -1;
+ __seterrno ();
break;
}
}
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 4d683cfd4..176e4869e 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -164,7 +164,7 @@ allow_others_to_sync ()
at this point because this gets called during initialization when the tls
is not really available. */
#define MAX_PROCESS_SD_SIZE 3072
- PISECURITY_DESCRIPTOR sd = (PISECURITY_DESCRIPTOR) alloca (MAX_PROCESS_SD_SIZE);
+ PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR) alloca (MAX_PROCESS_SD_SIZE);
status = NtQuerySecurityObject (NtCurrentProcess (),
DACL_SECURITY_INFORMATION, sd,
MAX_PROCESS_SD_SIZE, &len);
@@ -1247,7 +1247,7 @@ lf_setlock (lockf_t *lock, inode_t *node, lockf_t **clean, HANDLE fhdl)
timeout = 100L;
DWORD WAIT_SIGNAL_ARRIVED = WAIT_OBJECT_0 + wait_count;
- set_signal_arrived here (w4[wait_count++]);
+ w4[wait_count++] = signal_arrived;
DWORD WAIT_THREAD_CANCELED = WAIT_TIMEOUT + 1;
HANDLE cancel_event = pthread::get_cancel_event ();
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 22076fc1d..e617bd133 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -393,8 +393,8 @@ frok::parent (volatile char * volatile stack_here)
/* Wait for subproc to initialize itself. */
if (!ch.sync (pi.dwProcessId, hchild, FORK_WAIT_TIMEOUT))
{
- if (!error ("forked process %u died unexpectedly, retry %d, exit code %d",
- pi.dwProcessId, ch.retry, ch.exit_code))
+ if (!error ("forked process died unexpectedly, retry %d, exit code %d",
+ ch.retry, ch.exit_code))
continue;
this_errno = EAGAIN;
goto cleanup;
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index 5cc06f76c..a76711279 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -162,23 +162,62 @@ __sigbe: # return here after cygwin syscall
.global _sigdelayed
_sigdelayed:
- pushl %ebp
- movl %esp,%ebp
+ pushl %ebp
+ movl %esp,%ebp
pushf
- pushl %esi
- pushl %edi
- pushl %edx
- pushl %ecx
- pushl %ebx
- pushl %eax
- movl %fs:4,%ebx # get tls
- pushl $tls::saved_errno(%ebx) # saved errno
-
- movl \$$tls::start_offset,%eax # point to beginning
- addl %ebx,%eax # of tls block
- call __ZN7_cygtls19call_signal_handlerEv # call handler
+ pushl %esi
+ pushl %edi
+ pushl %edx
+ pushl %ecx
+ pushl %ebx
+ pushl %eax
+ movl %fs:4,%ebx
+1: movl \$1,%eax
+ xchgl %eax,$tls::stacklock(%ebx)
+ movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
+ # If %eax is 1 then someone else has
+ # the lock but we want to flag that
+ # we're waiting for it. If %eax is 0
+ # then we're not spinning and 0 will
+ # reflect that.
+ testl %eax,%eax
+ jz 2f
+ call _yield
+ jmp 1b
+2: incl $tls::incyg(%ebx)
+ movl $tls::sig(%ebx),%eax
+ testl %eax,%eax
+ jz leave # call_signal_handler may have beat us
+ # to it
+ pushl $tls::saved_errno(%ebx) # saved errno
+ call _set_process_mask_delta
+ pushl %eax
+
+ # fill out handler arguments
+ xorl %eax,%eax # ucontext_t (currently not set)
+ pushl %eax
+ leal $tls::infodata(%ebx),%eax
+ pushl %eax # siginfo
+ pushl $tls::sig(%ebx) # signal number
+
+ pushl \$_sigreturn # where to return
+ pushl $tls::func(%ebx) # user-supplied signal func
+ cmpl \$0,$tls::threadkill(%ebx)#pthread_kill signal?
+ jnz 4f # yes. callee clears signal number
+ movl \$0,$tls::sig(%ebx) # zero the signal number as a
+ # flag to the signal handler thread
+ # that it is ok to set up sigsave
+4: decl $tls::incyg(%ebx)
+ decl $tls::stacklock(%ebx)
+ ret # return via signal handler
+
+ .global _sigreturn
+_sigreturn:
+ movl %fs:4,%ebx
+ incl $tls::incyg(%ebx)
+ addl \$12,%esp # remove arguments
+ call _set_process_mask\@4
- movl %fs:4,%ebx # reget tls
1: movl \$1,%eax # potential lock value
xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
@@ -255,7 +294,7 @@ stabilize_sig_stack:
cmpl \$0,$tls::sig(%ebx)
jz 3f
decl $tls::stacklock(%ebx) # unlock
- movl \$$tls::start_offset,%eax # point to beginning
+ movl \$-$tls::sizeof__cygtls,%eax # point to beginning
addl %ebx,%eax # of tls block
call __ZN7_cygtls19call_signal_handlerEv
jmp 1b
diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/gentls_offsets
index de9f1b993..2c96487d4 100755
--- a/winsup/cygwin/gentls_offsets
+++ b/winsup/cygwin/gentls_offsets
@@ -14,10 +14,10 @@ my $struct = '';
my @fields = ();
my $def = '';
$tls = join('', <TLS>);
-$tls =~ s/\A.*\n#pragma once\n//os;
$tls =~ s/\n[^\n]*gentls_offsets[^\n]*\n(.+)\Z/$1/os;
my $pre = $`;
substr($tls, 0, length($pre)) = '';
+$pre =~ s/\n#ifndef _[^\n]+\n/\n/os;
$pre .= "\n//*/";
$tls =~ s%/\*\s*gentls_offsets.*?/\*\s*gentls_offsets\s*\*/%%ogs;
foreach ($tls =~ /^.*\n/mg) {
@@ -60,7 +60,7 @@ main(int argc, char **argv)
# define poffset(f) (((char *) &(foo->f)) - ((char *) foo))
EOF
print TMP 'puts ("//;# autogenerated: Do not edit.\n");', "\n\n";
- print TMP "printf (\"//; \$tls::start_offset = -%d;\\n\", CYGTLS_PADSIZE);\n";
+ print TMP "printf (\"//; \$tls::sizeof_$struct = %d;\\n\", sizeof($struct\));\n";
for my $f (@fields) {
print TMP ' printf ("//; $tls::', $f, ' = %d;\n", ', "offset($f));\n";
print TMP ' printf ("//; $tls::p', $f, ' = %d;\n", ', "poffset($f));\n";
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index 05a3c390b..87b6cd84e 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -58,7 +58,6 @@ bool ignore_case_with_glob = false;
bool dos_file_warning = true;
bool allow_winsymlinks = false;
bool reset_com = false;
-bool pipe_byte = false;
bool detect_bloda = false;
bool NO_COPY in_forkee;
@@ -107,7 +106,6 @@ UNICODE_STRING _RDATA ro_u_fat = _ROU (L"FAT");
UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS");
UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS");
UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS");
-UNICODE_STRING _RDATA ro_u_refs = _ROU (L"ReFS");
UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");
UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF");
UNICODE_STRING _RDATA ro_u_unixfs = _ROU (L"UNIXFS");
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
index 433628e06..d58a4cfcc 100644
--- a/winsup/cygwin/heap.cc
+++ b/winsup/cygwin/heap.cc
@@ -192,15 +192,8 @@ heap_init ()
api_fatal ("MEM_COMMIT failed, %E");
}
- /* CV 2012-05-21: Moved printing heap size here from strace::activate.
- The value printed in strace.activate was always wrong, because at the
- time it's called, cygheap points to cygheap_dummy. Above all, the heap
- size has not been evaluated yet, except in a forked child. Since
- heap_init is called early, the heap size is printed pretty much at the
- start of the strace output, so there isn't anything lost. */
- debug_printf ("heap base %p, heap top %p, heap size %p (%u)",
- cygheap->user_heap.base, cygheap->user_heap.top,
- cygheap->user_heap.chunk, cygheap->user_heap.chunk);
+ debug_printf ("heap base %p, heap top %p", cygheap->user_heap.base,
+ cygheap->user_heap.top);
page_const--;
// malloc_init ();
}
diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc
index 83e9f498a..11280c6a2 100644
--- a/winsup/cygwin/hookapi.cc
+++ b/winsup/cygwin/hookapi.cc
@@ -57,7 +57,7 @@ rvadelta (PIMAGE_NT_HEADERS pnt, DWORD import_rva, DWORD &max_size)
&& (section[i].VirtualAddress + section[i].Misc.VirtualSize) > import_rva)
// if (ascii_strncasematch ((char *) section[i].Name, ".idata", IMAGE_SIZEOF_SHORT_NAME))
{
- max_size = section[i].SizeOfRawData
+ max_size = section[i].Misc.VirtualSize
- (import_rva - section[i].VirtualAddress);
return section[i].VirtualAddress - section[i].PointerToRawData;
}
@@ -165,8 +165,7 @@ makename (const char *name, char *&buf, int& i, int inc)
/* Find first missing dll in a given executable.
FIXME: This is not foolproof since it doesn't look for dlls in the
same directory as the given executable, like Windows. Instead it
- searches for dlls in the context of the current executable.
- It also only finds direct dependencies, not indirect ones. */
+ searches for dlls in the context of the current executable. */
const char *
find_first_notloaded_dll (path_conv& pc)
{
@@ -215,8 +214,10 @@ find_first_notloaded_dll (path_conv& pc)
if (pExeNTHdr)
{
DWORD importRVA;
+ DWORD importRVASize;
DWORD importRVAMaxSize;
importRVA = pExeNTHdr->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;
+ importRVASize = pExeNTHdr->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size;
if (importRVA)
{
long delta = rvadelta (pExeNTHdr, importRVA, importRVAMaxSize);
@@ -225,37 +226,32 @@ find_first_notloaded_dll (path_conv& pc)
importRVA -= delta;
DWORD offset = 0;
- HMODULE map = NULL;
+ char *map = NULL;
if (importRVA + importRVAMaxSize > wincap.allocation_granularity ())
{
offset = rounddown (importRVA, wincap.allocation_granularity ());
DWORD size = importRVA - offset + importRVAMaxSize;
- map = (HMODULE) MapViewOfFile (hc, FILE_MAP_READ, 0,
- offset, size);
+ map = (char *) MapViewOfFile (hc, FILE_MAP_READ, 0, offset, size);
if (!map)
goto out;
}
// Convert imports RVA to a usable pointer
PIMAGE_IMPORT_DESCRIPTOR pdfirst;
- pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, map ?: hm,
- importRVA - offset);
+ pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, hm, importRVA - offset);
// Iterate through each import descriptor, and redirect if appropriate
for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++)
{
- const char *lib = rva (PSTR, map ?: hm,
- pd->Name - delta - offset);
+ const char *lib = rva (PSTR, hm, pd->Name - delta - offset);
if (!LoadLibraryEx (lib, NULL, DONT_RESOLVE_DLL_REFERENCES
| LOAD_LIBRARY_AS_DATAFILE))
{
- static char buf[MAX_PATH];
- strlcpy (buf, lib, MAX_PATH);
- res = buf;
+ static char buf[NT_MAX_PATH];
+ res = strcpy (buf, lib);
}
}
- if (map)
- UnmapViewOfFile (map);
+ UnmapViewOfFile (map);
}
}
diff --git a/winsup/cygwin/include/cygwin/if.h b/winsup/cygwin/include/cygwin/if.h
index d99cda7bc..8f76e836e 100644
--- a/winsup/cygwin/include/cygwin/if.h
+++ b/winsup/cygwin/include/cygwin/if.h
@@ -111,12 +111,10 @@ struct ifconf
#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
#define ifc_req ifc_ifcu.ifcu_req /* array of structures */
-#ifndef __INSIDE_CYGWIN_NET__
extern unsigned if_nametoindex (const char *);
extern char *if_indextoname (unsigned, char *);
extern struct if_nameindex *if_nameindex (void);
extern void if_freenameindex (struct if_nameindex *);
-#endif
#ifdef __cplusplus
};
diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h
index 49957293d..30ac623a8 100644
--- a/winsup/cygwin/include/cygwin/in.h
+++ b/winsup/cygwin/include/cygwin/in.h
@@ -23,8 +23,6 @@
typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;
-#ifndef __INSIDE_CYGWIN_NET__
-
/* Standard well-defined IP protocols. If you ever add one here, don't
forget to define it below. */
enum
@@ -262,6 +260,4 @@ struct sockaddr_in
#ifdef AF_INET6
#include <cygwin/in6.h>
#endif
-#endif
-
#endif /* _CYGWIN_IN_H */
diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h
index 678b1031a..41c2eb5f8 100644
--- a/winsup/cygwin/include/cygwin/socket.h
+++ b/winsup/cygwin/include/cygwin/socket.h
@@ -26,7 +26,6 @@ typedef int socklen_t;
typedef uint16_t sa_family_t;
-#ifndef __INSIDE_CYGWIN_NET__
struct sockaddr {
sa_family_t sa_family; /* address family, AF_xxx */
char sa_data[14]; /* 14 bytes of protocol address */
@@ -45,7 +44,6 @@ struct sockaddr_storage {
int64_t __ss_align;
char _ss_pad2[_SS_PAD2SIZE];
};
-#endif
#include <asm/socket.h> /* arch-dependent defines */
#include <cygwin/sockios.h> /* the SIOCxxx I/O controls */
@@ -205,9 +203,6 @@ struct OLD_msghdr
#define MSG_NOSIGNAL 0x20 /* Don't raise SIGPIPE */
#define MSG_TRUNC 0x0100 /* Normal data truncated */
#define MSG_CTRUNC 0x0200 /* Control data truncated */
-/* Windows-specific flag values returned by recvmsg. */
-#define MSG_BCAST 0x0400 /* Broadcast datagram */
-#define MSG_MCAST 0x0800 /* Multicast datagram */
/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
#define SOL_IP 0
@@ -274,10 +269,8 @@ struct OLD_msghdr
#define MCAST_JOIN_SOURCE_GROUP 45
#define MCAST_LEAVE_SOURCE_GROUP 46
-#ifndef __INSIDE_CYGWIN_NET__
#define MCAST_INCLUDE 0
#define MCAST_EXCLUDE 1
-#endif
/* Old WinSock1 values, needed internally */
#ifdef __INSIDE_CYGWIN__
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 34f501f13..bb4e60d2d 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -43,7 +43,7 @@ details. */
changes to the DLL and is mainly informative in nature. */
#define CYGWIN_VERSION_DLL_MAJOR 1007
-#define CYGWIN_VERSION_DLL_MINOR 17
+#define CYGWIN_VERSION_DLL_MINOR 12
/* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
incompatible. */
@@ -429,14 +429,12 @@ details. */
258: Export get_current_dir_name.
259: Export pthread_sigqueue.
260: Export scandirat.
- 261: Export memrchr.
- 262: Export getmntent_r.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 262
+#define CYGWIN_VERSION_API_MINOR 260
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/include/elf.h b/winsup/cygwin/include/elf.h
index c094a1c78..0981dedce 100644
--- a/winsup/cygwin/include/elf.h
+++ b/winsup/cygwin/include/elf.h
@@ -1,41 +1,25 @@
-/*-
- * Copyright (c) 2001 David E. O'Brien.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
+/* elf.h
-/*
- * This is a Solaris compatibility header
- */
+ Copyright 2005 Red Hat, Inc.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
#ifndef _ELF_H_
#define _ELF_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
#include <sys/types.h>
-#include <machine/elf.h>
#include <sys/elf32.h>
#include <sys/elf64.h>
+#include <sys/elf_generic.h>
+#ifdef __cplusplus
+}
+#endif
-#endif /* !_ELF_H_ */
+#endif /*_ELF_H_*/
diff --git a/winsup/cygwin/include/inttypes.h b/winsup/cygwin/include/inttypes.h
index cc1d8970a..b24037eb4 100644
--- a/winsup/cygwin/include/inttypes.h
+++ b/winsup/cygwin/include/inttypes.h
@@ -1,6 +1,6 @@
/* inttypes.h - fixed size integer types
- Copyright 2003, 2005, 2009, 2010, 2012 Red Hat, Inc.
+ Copyright 2003, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
@@ -15,238 +15,211 @@ details. */
#define __need_wchar_t
#include <stddef.h>
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_FORMAT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-#ifdef __x86_64__
-#define __PRI64 "l"
-#define __PRIFAST "l"
-#define __PRIPTR "l"
-#else
-#define __PRI64 "ll"
-#define __PRIFAST
-#define __PRIPTR
-#endif
-
/* fprintf() macros for signed integers */
#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
-#define PRId64 __PRI64 "d"
+#define PRId64 "lld"
#define PRIdLEAST8 "d"
#define PRIdLEAST16 "d"
#define PRIdLEAST32 "d"
-#define PRIdLEAST64 __PRI64 "d"
+#define PRIdLEAST64 "lld"
#define PRIdFAST8 "d"
-#define PRIdFAST16 __PRIFAST "d"
-#define PRIdFAST32 __PRIFAST "d"
-#define PRIdFAST64 __PRI64 "d"
+#define PRIdFAST16 "d"
+#define PRIdFAST32 "d"
+#define PRIdFAST64 "lld"
-#define PRIdMAX __PRI64 "d"
-#define PRIdPTR __PRIPTR "d"
+#define PRIdMAX "lld"
+#define PRIdPTR "d"
#define PRIi8 "i"
#define PRIi16 "i"
#define PRIi32 "i"
-#define PRIi64 __PRI64 "i"
+#define PRIi64 "lli"
#define PRIiLEAST8 "i"
#define PRIiLEAST16 "i"
#define PRIiLEAST32 "i"
-#define PRIiLEAST64 __PRI64 "i"
+#define PRIiLEAST64 "lli"
#define PRIiFAST8 "i"
-#define PRIiFAST16 __PRIFAST "i"
-#define PRIiFAST32 __PRIFAST "i"
-#define PRIiFAST64 __PRI64 "i"
+#define PRIiFAST16 "i"
+#define PRIiFAST32 "i"
+#define PRIiFAST64 "lli"
-#define PRIiMAX __PRI64 "i"
-#define PRIiPTR __PRIPTR "i"
+#define PRIiMAX "lli"
+#define PRIiPTR "i"
/* fprintf() macros for unsigned integers */
#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
-#define PRIo64 __PRI64 "o"
+#define PRIo64 "llo"
#define PRIoLEAST8 "o"
#define PRIoLEAST16 "o"
#define PRIoLEAST32 "o"
-#define PRIoLEAST64 __PRI64 "o"
+#define PRIoLEAST64 "llo"
#define PRIoFAST8 "o"
-#define PRIoFAST16 __PRIFAST "o"
-#define PRIoFAST32 __PRIFAST "o"
-#define PRIoFAST64 __PRI64 "o"
+#define PRIoFAST16 "o"
+#define PRIoFAST32 "o"
+#define PRIoFAST64 "llo"
-#define PRIoMAX __PRI64 "o"
-#define PRIoPTR __PRIPTR "o"
+#define PRIoMAX "llo"
+#define PRIoPTR "o"
#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
-#define PRIu64 __PRI64 "u"
+#define PRIu64 "llu"
#define PRIuLEAST8 "u"
#define PRIuLEAST16 "u"
#define PRIuLEAST32 "u"
-#define PRIuLEAST64 __PRI64 "u"
+#define PRIuLEAST64 "llu"
#define PRIuFAST8 "u"
-#define PRIuFAST16 __PRIFAST "u"
-#define PRIuFAST32 __PRIFAST "u"
-#define PRIuFAST64 __PRI64 "u"
+#define PRIuFAST16 "u"
+#define PRIuFAST32 "u"
+#define PRIuFAST64 "llu"
-#define PRIuMAX __PRI64 "u"
-#define PRIuPTR __PRIPTR "u"
+#define PRIuMAX "llu"
+#define PRIuPTR "u"
#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
-#define PRIx64 __PRI64 "x"
+#define PRIx64 "llx"
#define PRIxLEAST8 "x"
#define PRIxLEAST16 "x"
#define PRIxLEAST32 "x"
-#define PRIxLEAST64 __PRI64 "x"
+#define PRIxLEAST64 "llx"
#define PRIxFAST8 "x"
-#define PRIxFAST16 __PRIFAST "x"
-#define PRIxFAST32 __PRIFAST "x"
-#define PRIxFAST64 __PRI64 "x"
+#define PRIxFAST16 "x"
+#define PRIxFAST32 "x"
+#define PRIxFAST64 "llx"
-#define PRIxMAX __PRI64 "x"
-#define PRIxPTR __PRIPTR "x"
+#define PRIxMAX "llx"
+#define PRIxPTR "x"
#define PRIX8 "X"
#define PRIX16 "X"
#define PRIX32 "X"
-#define PRIX64 __PRI64 "X"
+#define PRIX64 "llX"
#define PRIXLEAST8 "X"
#define PRIXLEAST16 "X"
#define PRIXLEAST32 "X"
-#define PRIXLEAST64 __PRI64 "X"
+#define PRIXLEAST64 "llX"
#define PRIXFAST8 "X"
-#define PRIXFAST16 __PRIFAST "X"
-#define PRIXFAST32 __PRIFAST "X"
-#define PRIXFAST64 __PRI64 "X"
+#define PRIXFAST16 "X"
+#define PRIXFAST32 "X"
+#define PRIXFAST64 "llX"
-#define PRIXMAX __PRI64 "X"
-#define PRIXPTR __PRIPTR "X"
+#define PRIXMAX "llX"
+#define PRIXPTR "X"
/* fscanf() macros for signed integers */
-#ifdef __x86_64__
-#define __SCN64 "l"
-#define __SCNFAST "l"
-#define __SCNPTR "l"
-#else
-#define __SCN64 "ll"
-#define __SCNFAST
-#define __SCNPTR
-#endif
-
#define SCNd8 "hhd"
#define SCNd16 "hd"
#define SCNd32 "d"
-#define SCNd64 __SCN64 "d"
+#define SCNd64 "lld"
#define SCNdLEAST8 "hhd"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "d"
-#define SCNdLEAST64 __SCN64 "d"
+#define SCNdLEAST64 "lld"
#define SCNdFAST8 "hhd"
-#define SCNdFAST16 __SCNFAST "d"
-#define SCNdFAST32 __SCNFAST "d"
-#define SCNdFAST64 __SCN64 "d"
+#define SCNdFAST16 "d"
+#define SCNdFAST32 "d"
+#define SCNdFAST64 "lld"
-#define SCNdMAX __SCN64 "d"
-#define SCNdPTR __SCNPTR "d"
+#define SCNdMAX "lld"
+#define SCNdPTR "d"
#define SCNi8 "hhi"
#define SCNi16 "hi"
#define SCNi32 "i"
-#define SCNi64 __SCN64 "i"
+#define SCNi64 "lli"
#define SCNiLEAST8 "hhi"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "i"
-#define SCNiLEAST64 __SCN64 "i"
+#define SCNiLEAST64 "lli"
#define SCNiFAST8 "hhi"
-#define SCNiFAST16 __SCNFAST "i"
-#define SCNiFAST32 __SCNFAST "i"
-#define SCNiFAST64 __SCN64 "i"
+#define SCNiFAST16 "i"
+#define SCNiFAST32 "i"
+#define SCNiFAST64 "lli"
-#define SCNiMAX __SCN64 "i"
-#define SCNiPTR __SCNPTR "i"
+#define SCNiMAX "lli"
+#define SCNiPTR "i"
/* fscanf() macros for unsigned integers */
#define SCNo8 "hho"
#define SCNo16 "ho"
#define SCNo32 "o"
-#define SCNo64 __SCN64 "o"
+#define SCNo64 "llo"
#define SCNoLEAST8 "hho"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "o"
-#define SCNoLEAST64 __SCN64 "o"
+#define SCNoLEAST64 "llo"
#define SCNoFAST8 "hho"
-#define SCNoFAST16 __SCNFAST "o"
-#define SCNoFAST32 __SCNFAST "o"
-#define SCNoFAST64 __SCN64 "o"
+#define SCNoFAST16 "o"
+#define SCNoFAST32 "o"
+#define SCNoFAST64 "llo"
-#define SCNoMAX __SCN64 "o"
-#define SCNoPTR __SCNPTR "o"
+#define SCNoMAX "llo"
+#define SCNoPTR "o"
#define SCNu8 "hhu"
#define SCNu16 "hu"
#define SCNu32 "u"
-#define SCNu64 __SCN64 "u"
+#define SCNu64 "llu"
#define SCNuLEAST8 "hhu"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "u"
-#define SCNuLEAST64 __SCN64 "u"
+#define SCNuLEAST64 "llu"
#define SCNuFAST8 "hhu"
-#define SCNuFAST16 __SCNFAST "u"
-#define SCNuFAST32 __SCNFAST "u"
-#define SCNuFAST64 __SCN64 "u"
+#define SCNuFAST16 "u"
+#define SCNuFAST32 "u"
+#define SCNuFAST64 "llu"
-#define SCNuMAX __SCN64 "u"
-#define SCNuPTR __SCNPTR "u"
+#define SCNuMAX "llu"
+#define SCNuPTR "u"
#define SCNx8 "hhx"
#define SCNx16 "hx"
#define SCNx32 "x"
-#define SCNx64 __SCN64 "x"
+#define SCNx64 "llx"
#define SCNxLEAST8 "hhx"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "x"
-#define SCNxLEAST64 __SCN64 "x"
+#define SCNxLEAST64 "llx"
#define SCNxFAST8 "hhx"
-#define SCNxFAST16 __SCNFAST "x"
-#define SCNxFAST32 __SCNFAST "x"
-#define SCNxFAST64 __SCN64 "x"
-
-#define SCNxMAX __SCN64 "x"
-#define SCNxPTR __SCNPTR "x"
+#define SCNxFAST16 "x"
+#define SCNxFAST32 "x"
+#define SCNxFAST64 "llx"
-#endif /* !__cplusplus || __STDC_FORMAT_MACROS || __INSIDE_CYGWIN__ */
+#define SCNxMAX "llx"
+#define SCNxPTR "x"
#ifdef __cplusplus
extern "C" {
diff --git a/winsup/cygwin/include/machine/elf.h b/winsup/cygwin/include/machine/elf.h
deleted file mode 100644
index 94278118f..000000000
--- a/winsup/cygwin/include/machine/elf.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*-
- * Copyright (c) 1996-1997 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ELF_H_
-#define _MACHINE_ELF_H_ 1
-
-/*
- * ELF definitions for the i386 architecture.
- */
-
-#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */
-#if defined(__ELF_WORD_SIZE) && __ELF_WORD_SIZE == 64
-#include <sys/elf64.h> /* Definitions common to all 64 bit architectures. */
-#endif
-
-#ifndef __ELF_WORD_SIZE
-#define __ELF_WORD_SIZE 32 /* Used by <sys/elf_generic.h> */
-#endif
-
-#include <sys/elf_generic.h>
-
-#define ELF_ARCH EM_386
-
-#define ELF_MACHINE_OK(x) ((x) == EM_386 || (x) == EM_486)
-
-/*
- * Auxiliary vector entries for passing information to the interpreter.
- *
- * The i386 supplement to the SVR4 ABI specification names this "auxv_t",
- * but POSIX lays claim to all symbols ending with "_t".
- */
-
-typedef struct { /* Auxiliary vector entry on initial stack */
- int a_type; /* Entry type. */
- union {
- long a_val; /* Integer value. */
- void *a_ptr; /* Address. */
- void (*a_fcn)(void); /* Function pointer (not used). */
- } a_un;
-} Elf32_Auxinfo;
-
-#if __ELF_WORD_SIZE == 64
-/* Fake for amd64 loader support */
-typedef struct {
- int fake;
-} Elf64_Auxinfo;
-#endif
-
-__ElfType(Auxinfo);
-
-/* Values for a_type. */
-#define AT_NULL 0 /* Terminates the vector. */
-#define AT_IGNORE 1 /* Ignored entry. */
-#define AT_EXECFD 2 /* File descriptor of program to load. */
-#define AT_PHDR 3 /* Program header of program already loaded. */
-#define AT_PHENT 4 /* Size of each program header entry. */
-#define AT_PHNUM 5 /* Number of program header entries. */
-#define AT_PAGESZ 6 /* Page size in bytes. */
-#define AT_BASE 7 /* Interpreter's base address. */
-#define AT_FLAGS 8 /* Flags (unused for i386). */
-#define AT_ENTRY 9 /* Where interpreter should transfer control. */
-#define AT_NOTELF 10 /* Program is not ELF ?? */
-#define AT_UID 11 /* Real uid. */
-#define AT_EUID 12 /* Effective uid. */
-#define AT_GID 13 /* Real gid. */
-#define AT_EGID 14 /* Effective gid. */
-#define AT_EXECPATH 15 /* Path to the executable. */
-#define AT_CANARY 16 /* Canary for SSP. */
-#define AT_CANARYLEN 17 /* Length of the canary. */
-#define AT_OSRELDATE 18 /* OSRELDATE. */
-#define AT_NCPUS 19 /* Number of CPUs. */
-#define AT_PAGESIZES 20 /* Pagesizes. */
-#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */
-#define AT_STACKPROT 23 /* Initial stack protection. */
-
-#define AT_COUNT 24 /* Count of defined aux entry types. */
-
-/*
- * Relocation types.
- */
-
-#define R_386_COUNT 38 /* Count of defined relocation types. */
-
-/* Define "machine" characteristics */
-#define ELF_TARG_CLASS ELFCLASS32
-#define ELF_TARG_DATA ELFDATA2LSB
-#define ELF_TARG_MACH EM_386
-#define ELF_TARG_VER 1
-
-#define ET_DYN_LOAD_ADDR 0x01001000
-
-#endif /* !_MACHINE_ELF_H_ */
diff --git a/winsup/cygwin/include/mntent.h b/winsup/cygwin/include/mntent.h
index 5fb8e3a70..8ad270ba0 100644
--- a/winsup/cygwin/include/mntent.h
+++ b/winsup/cygwin/include/mntent.h
@@ -31,7 +31,6 @@ struct mntent
#include <stdio.h>
FILE *setmntent (const char *__filep, const char *__type);
struct mntent *getmntent (FILE *__filep);
-struct mntent *getmntent_r (FILE *, struct mntent *, char *, int);
int endmntent (FILE *__filep);
#endif
diff --git a/winsup/cygwin/include/netdb.h b/winsup/cygwin/include/netdb.h
index e4b85c6a7..f59a780f0 100644
--- a/winsup/cygwin/include/netdb.h
+++ b/winsup/cygwin/include/netdb.h
@@ -117,7 +117,6 @@ struct rpcent {
int r_number; /* rpc program number */
};
-#ifndef __INSIDE_CYGWIN_NET__
struct addrinfo {
int ai_flags; /* input flags */
int ai_family; /* address family of socket */
@@ -128,7 +127,6 @@ struct addrinfo {
struct sockaddr *ai_addr; /* socket address of socket */
struct addrinfo *ai_next; /* pointer to next in list */
};
-#endif
/*
* Error return codes from gethostbyname() and gethostbyaddr()
diff --git a/winsup/cygwin/include/stdint.h b/winsup/cygwin/include/stdint.h
index 070f7f306..12f16e220 100644
--- a/winsup/cygwin/include/stdint.h
+++ b/winsup/cygwin/include/stdint.h
@@ -1,6 +1,6 @@
/* stdint.h - integer types
- Copyright 2003, 2006, 2007, 2008, 2009, 2010, 2012 Red Hat, Inc.
+ Copyright 2003, 2006, 2007 Red Hat, Inc.
This file is part of Cygwin.
@@ -18,12 +18,8 @@ details. */
typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
-#ifdef __x86_64__
-typedef long int64_t;
-#else
typedef long long int64_t;
#endif
-#endif
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
@@ -31,190 +27,114 @@ typedef unsigned short uint16_t;
#define __uint32_t_defined
typedef unsigned int uint32_t;
#endif
-#ifdef __x86_64__
-typedef unsigned long uint64_t;
-#else
typedef unsigned long long uint64_t;
-#endif
/* Minimum-width integer types */
typedef signed char int_least8_t;
typedef short int_least16_t;
typedef int int_least32_t;
-#ifdef __x86_64__
-typedef long int_least64_t;
-#else
typedef long long int_least64_t;
-#endif
typedef unsigned char uint_least8_t;
typedef unsigned short uint_least16_t;
typedef unsigned int uint_least32_t;
-#ifdef __x86_64__
-typedef unsigned long uint_least64_t;
-#else
typedef unsigned long long uint_least64_t;
-#endif
/* Fastest minimum-width integer types */
typedef signed char int_fast8_t;
-#ifdef __x86_64__
-typedef long int_fast16_t;
-typedef long int_fast32_t;
-typedef long int_fast64_t;
-#else
typedef int int_fast16_t;
typedef int int_fast32_t;
typedef long long int_fast64_t;
-#endif
typedef unsigned char uint_fast8_t;
-#ifdef __x86_64__
-typedef unsigned long uint_fast16_t;
-typedef unsigned long uint_fast32_t;
-typedef unsigned long uint_fast64_t;
-#else
typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
typedef unsigned long long uint_fast64_t;
-#endif
/* Integer types capable of holding object pointers */
#ifndef __intptr_t_defined
#define __intptr_t_defined
-#ifdef __x86_64__
-typedef long intptr_t;
-#else
typedef int intptr_t;
#endif
-#endif
-#ifdef __x86_64__
-typedef unsigned long uintptr_t;
-#else
typedef unsigned int uintptr_t;
-#endif
/* Greatest-width integer types */
-#ifdef __x86_64__
-typedef long intmax_t;
-typedef unsigned long uintmax_t;
-#else
typedef long long intmax_t;
typedef unsigned long long uintmax_t;
-#endif
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_LIMIT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-#if __x86_64__
-# define __I64(n) n ## L
-# define __U64(n) n ## UL
-#else
-# define __I64(n) n ## LL
-# define __U64(n) n ## ULL
-#endif
/* Limits of exact-width integer types */
#define INT8_MIN (-128)
#define INT16_MIN (-32768)
#define INT32_MIN (-2147483647 - 1)
-#define INT64_MIN (-__I64(9223372036854775807) - 1)
+#define INT64_MIN (-9223372036854775807LL - 1LL)
#define INT8_MAX (127)
#define INT16_MAX (32767)
#define INT32_MAX (2147483647)
-#define INT64_MAX (__I64(9223372036854775807))
+#define INT64_MAX (9223372036854775807LL)
#define UINT8_MAX (255)
#define UINT16_MAX (65535)
#define UINT32_MAX (4294967295U)
-#define UINT64_MAX (__U64(18446744073709551615))
+#define UINT64_MAX (18446744073709551615ULL)
/* Limits of minimum-width integer types */
#define INT_LEAST8_MIN (-128)
#define INT_LEAST16_MIN (-32768)
#define INT_LEAST32_MIN (-2147483647 - 1)
-#define INT_LEAST64_MIN (-__I64(9223372036854775807) - 1)
+#define INT_LEAST64_MIN (-9223372036854775807LL - 1LL)
#define INT_LEAST8_MAX (127)
#define INT_LEAST16_MAX (32767)
#define INT_LEAST32_MAX (2147483647)
-#define INT_LEAST64_MAX (__I64(9223372036854775807))
+#define INT_LEAST64_MAX (9223372036854775807LL)
#define UINT_LEAST8_MAX (255)
#define UINT_LEAST16_MAX (65535)
#define UINT_LEAST32_MAX (4294967295U)
-#define UINT_LEAST64_MAX (__U64(18446744073709551615))
+#define UINT_LEAST64_MAX (18446744073709551615ULL)
/* Limits of fastest minimum-width integer types */
#define INT_FAST8_MIN (-128)
-#ifdef __x86_64__
-#define INT_FAST16_MIN (-__I64(9223372036854775807) - 1)
-#define INT_FAST32_MIN (-__I64(9223372036854775807) - 1)
-#else
#define INT_FAST16_MIN (-2147483647 - 1)
#define INT_FAST32_MIN (-2147483647 - 1)
-#endif
-#define INT_FAST64_MIN (-__I64(9223372036854775807) - 1)
+#define INT_FAST64_MIN (-9223372036854775807LL - 1LL)
#define INT_FAST8_MAX (127)
-#ifdef __x86_64__
-#define INT_FAST16_MAX (__I64(9223372036854775807))
-#define INT_FAST32_MAX (__I64(9223372036854775807))
-#else
#define INT_FAST16_MAX (2147483647)
#define INT_FAST32_MAX (2147483647)
-#endif
-#define INT_FAST64_MAX (__I64(9223372036854775807))
+#define INT_FAST64_MAX (9223372036854775807LL)
#define UINT_FAST8_MAX (255)
-#ifdef __x86_64__
-#define UINT_FAST16_MAX (__U64(18446744073709551615))
-#define UINT_FAST32_MAX (__U64(18446744073709551615))
-#else
#define UINT_FAST16_MAX (4294967295U)
#define UINT_FAST32_MAX (4294967295U)
-#endif
-#define UINT_FAST64_MAX (__U64(18446744073709551615))
+#define UINT_FAST64_MAX (18446744073709551615ULL)
/* Limits of integer types capable of holding object pointers */
-#ifdef __x86_64__
-#define INTPTR_MIN (-__I64(9223372036854775807) - 1)
-#define INTPTR_MAX (__I64(9223372036854775807)
-#define UINTPTR_MAX (__U64(18446744073709551615))
-#else
#define INTPTR_MIN (-2147483647 - 1)
#define INTPTR_MAX (2147483647)
#define UINTPTR_MAX (4294967295U)
-#endif
/* Limits of greatest-width integer types */
-#define INTMAX_MIN (-__I64(9223372036854775807) - 1)
-#define INTMAX_MAX (__I64(9223372036854775807))
-#define UINTMAX_MAX (__U64(18446744073709551615))
+#define INTMAX_MIN (-9223372036854775807LL - 1LL)
+#define INTMAX_MAX (9223372036854775807LL)
+#define UINTMAX_MAX (18446744073709551615ULL)
/* Limits of other integer types */
#ifndef PTRDIFF_MIN
-#ifdef __x86_64__
-#define PTRDIFF_MIN (-9223372036854775807L - 1)
-#define PTRDIFF_MAX (9223372036854775807L)
-#else
#define PTRDIFF_MIN (-2147483647 - 1)
#define PTRDIFF_MAX (2147483647)
#endif
-#endif
#ifndef SIG_ATOMIC_MIN
#define SIG_ATOMIC_MIN (-2147483647 - 1)
@@ -224,12 +144,8 @@ typedef unsigned long long uintmax_t;
#endif
#ifndef SIZE_MAX
-#ifdef __x86_64__
-#define SIZE_MAX (18446744073709551615UL)
-#else
#define SIZE_MAX (4294967295U)
#endif
-#endif
#ifndef WCHAR_MIN
#ifdef __WCHAR_MIN__
@@ -246,43 +162,21 @@ typedef unsigned long long uintmax_t;
#define WINT_MAX (4294967295U)
#endif
-#endif /* !__cplusplus || __STDC_LIMIT_MACROS || __INSIDE_CYGWIN__ */
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_CONSTANT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
/* Macros for minimum-width integer constant expressions */
#define INT8_C(x) x
#define INT16_C(x) x
#define INT32_C(x) x
-#ifdef __x86_64__
-#define INT64_C(x) x ## L
-#else
#define INT64_C(x) x ## LL
-#endif
#define UINT8_C(x) x
#define UINT16_C(x) x
#define UINT32_C(x) x ## U
-#ifdef __x86_64__
-#define UINT64_C(x) x ## UL
-#else
#define UINT64_C(x) x ## ULL
-#endif
/* Macros for greatest-width integer constant expressions */
-#ifdef __x86_64__
-#define INTMAX_C(x) x ## L
-#define UINTMAX_C(x) x ## UL
-#else
#define INTMAX_C(x) x ## LL
#define UINTMAX_C(x) x ## ULL
-#endif
-
-#endif /* !__cplusplus || __STDC_CONSTANT_MACROS || __INSIDE_CYGWIN__ */
#endif /* _STDINT_H */
diff --git a/winsup/cygwin/include/sys/elf.h b/winsup/cygwin/include/sys/elf.h
deleted file mode 100644
index b2d6b77c9..000000000
--- a/winsup/cygwin/include/sys/elf.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c) 2001 David E. O'Brien.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * This is a Solaris compatibility header
- */
-
-#ifndef _SYS_ELF_H_
-#define _SYS_ELF_H_
-
-#include <sys/types.h>
-#include <machine/elf.h>
-#include <sys/elf32.h>
-#include <sys/elf64.h>
-
-#endif /* !_SYS_ELF_H_ */
diff --git a/winsup/cygwin/include/sys/elf32.h b/winsup/cygwin/include/sys/elf32.h
index 62bf7be68..5dfe9c8b0 100644
--- a/winsup/cygwin/include/sys/elf32.h
+++ b/winsup/cygwin/include/sys/elf32.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: src/sys/sys/elf32.h,v 1.8 2002/05/30 08:32:18 dfr Exp $
*/
#ifndef _SYS_ELF32_H_
@@ -35,18 +35,13 @@
* ELF definitions common to all 32-bit architectures.
*/
-typedef uint32_t Elf32_Addr;
-typedef uint16_t Elf32_Half;
-typedef uint32_t Elf32_Off;
+typedef u_int32_t Elf32_Addr;
+typedef u_int16_t Elf32_Half;
+typedef u_int32_t Elf32_Off;
typedef int32_t Elf32_Sword;
-typedef uint32_t Elf32_Word;
-typedef uint64_t Elf32_Lword;
-
-typedef Elf32_Word Elf32_Hashelt;
-
-/* Non-standard class-dependent datatype used for abstraction. */
-typedef Elf32_Word Elf32_Size;
-typedef Elf32_Sword Elf32_Ssize;
+typedef u_int32_t Elf32_Word;
+typedef u_int32_t Elf32_Size;
+typedef Elf32_Off Elf32_Hashelt;
/*
* ELF header.
@@ -80,11 +75,11 @@ typedef struct {
Elf32_Word sh_flags; /* Section flags. */
Elf32_Addr sh_addr; /* Address in memory image. */
Elf32_Off sh_offset; /* Offset in file. */
- Elf32_Word sh_size; /* Size in bytes. */
+ Elf32_Size sh_size; /* Size in bytes. */
Elf32_Word sh_link; /* Index of a related section. */
Elf32_Word sh_info; /* Depends on section type. */
- Elf32_Word sh_addralign; /* Alignment in bytes. */
- Elf32_Word sh_entsize; /* Size of each entry in section. */
+ Elf32_Size sh_addralign; /* Alignment in bytes. */
+ Elf32_Size sh_entsize; /* Size of each entry in section. */
} Elf32_Shdr;
/*
@@ -96,10 +91,10 @@ typedef struct {
Elf32_Off p_offset; /* File offset of contents. */
Elf32_Addr p_vaddr; /* Virtual address in memory image. */
Elf32_Addr p_paddr; /* Physical address (not used). */
- Elf32_Word p_filesz; /* Size of contents in file. */
- Elf32_Word p_memsz; /* Size of contents in memory. */
+ Elf32_Size p_filesz; /* Size of contents in file. */
+ Elf32_Size p_memsz; /* Size of contents in memory. */
Elf32_Word p_flags; /* Access permission flags. */
- Elf32_Word p_align; /* Alignment in memory and file. */
+ Elf32_Size p_align; /* Alignment in memory and file. */
} Elf32_Phdr;
/*
@@ -109,7 +104,7 @@ typedef struct {
typedef struct {
Elf32_Sword d_tag; /* Entry type. */
union {
- Elf32_Word d_val; /* Integer value. */
+ Elf32_Size d_val; /* Integer value. */
Elf32_Addr d_ptr; /* Address value. */
} d_un;
} Elf32_Dyn;
@@ -139,51 +134,13 @@ typedef struct {
#define ELF32_R_INFO(sym, type) (((sym) << 8) + (unsigned char)(type))
/*
- * Note entry header
- */
-typedef Elf_Note Elf32_Nhdr;
-
-/*
- * Move entry
- */
-typedef struct {
- Elf32_Lword m_value; /* symbol value */
- Elf32_Word m_info; /* size + index */
- Elf32_Word m_poffset; /* symbol offset */
- Elf32_Half m_repeat; /* repeat count */
- Elf32_Half m_stride; /* stride info */
-} Elf32_Move;
-
-/*
- * The macros compose and decompose values for Move.r_info
- *
- * sym = ELF32_M_SYM(M.m_info)
- * size = ELF32_M_SIZE(M.m_info)
- * M.m_info = ELF32_M_INFO(sym, size)
- */
-#define ELF32_M_SYM(info) ((info)>>8)
-#define ELF32_M_SIZE(info) ((unsigned char)(info))
-#define ELF32_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size))
-
-/*
- * Hardware/Software capabilities entry
- */
-typedef struct {
- Elf32_Word c_tag; /* how to interpret value */
- union {
- Elf32_Word c_val;
- Elf32_Addr c_ptr;
- } c_un;
-} Elf32_Cap;
-
-/*
* Symbol table entries.
*/
typedef struct {
Elf32_Word st_name; /* String table index of name. */
Elf32_Addr st_value; /* Symbol value. */
- Elf32_Word st_size; /* Size of associated object. */
+ Elf32_Size st_size; /* Size of associated object. */
unsigned char st_info; /* Type and binding information. */
unsigned char st_other; /* Reserved (not used). */
Elf32_Half st_shndx; /* Section index of symbol. */
@@ -196,50 +153,4 @@ typedef struct {
/* Macro for constructing st_info from field values. */
#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
-/* Macro for accessing the fields of st_other. */
-#define ELF32_ST_VISIBILITY(oth) ((oth) & 0x3)
-
-/* Structures used by Sun & GNU symbol versioning. */
-typedef struct
-{
- Elf32_Half vd_version;
- Elf32_Half vd_flags;
- Elf32_Half vd_ndx;
- Elf32_Half vd_cnt;
- Elf32_Word vd_hash;
- Elf32_Word vd_aux;
- Elf32_Word vd_next;
-} Elf32_Verdef;
-
-typedef struct
-{
- Elf32_Word vda_name;
- Elf32_Word vda_next;
-} Elf32_Verdaux;
-
-typedef struct
-{
- Elf32_Half vn_version;
- Elf32_Half vn_cnt;
- Elf32_Word vn_file;
- Elf32_Word vn_aux;
- Elf32_Word vn_next;
-} Elf32_Verneed;
-
-typedef struct
-{
- Elf32_Word vna_hash;
- Elf32_Half vna_flags;
- Elf32_Half vna_other;
- Elf32_Word vna_name;
- Elf32_Word vna_next;
-} Elf32_Vernaux;
-
-typedef Elf32_Half Elf32_Versym;
-
-typedef struct {
- Elf32_Half si_boundto; /* direct bindings - symbol bound to */
- Elf32_Half si_flags; /* per symbol flags */
-} Elf32_Syminfo;
-
#endif /* !_SYS_ELF32_H_ */
diff --git a/winsup/cygwin/include/sys/elf64.h b/winsup/cygwin/include/sys/elf64.h
index 4ec7d341e..48556be5f 100644
--- a/winsup/cygwin/include/sys/elf64.h
+++ b/winsup/cygwin/include/sys/elf64.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: src/sys/sys/elf64.h,v 1.10 2002/05/30 08:32:18 dfr Exp $
*/
#ifndef _SYS_ELF64_H_
@@ -37,12 +37,14 @@
typedef uint64_t Elf64_Addr;
typedef uint16_t Elf64_Half;
-typedef uint64_t Elf64_Off;
-typedef int32_t Elf64_Sword;
-typedef int64_t Elf64_Sxword;
typedef uint32_t Elf64_Word;
-typedef uint64_t Elf64_Lword;
+typedef int32_t Elf64_Sword;
typedef uint64_t Elf64_Xword;
+typedef int64_t Elf64_Sxword;
+typedef uint64_t Elf64_Off;
+typedef uint16_t Elf64_Section;
+typedef Elf64_Half Elf64_Versym;
+typedef uint16_t Elf64_Quarter;
/*
* Types of dynamic symbol hash table bucket and chain elements.
@@ -51,11 +53,11 @@ typedef uint64_t Elf64_Xword;
* typedef is required.
*/
-typedef Elf64_Word Elf64_Hashelt;
-
-/* Non-standard class-dependent datatype used for abstraction. */
-typedef Elf64_Xword Elf64_Size;
-typedef Elf64_Sxword Elf64_Ssize;
+#ifdef __alpha__
+typedef Elf64_Off Elf64_Hashelt;
+#else
+typedef Elf64_Half Elf64_Hashelt;
+#endif
/*
* ELF header.
@@ -141,47 +143,11 @@ typedef struct {
} Elf64_Rela;
/* Macros for accessing the fields of r_info. */
-#define ELF64_R_SYM(info) ((info) >> 32)
-#define ELF64_R_TYPE(info) ((info) & 0xffffffffL)
+#define ELF64_R_SYM(info) ((info) >> 32)
+#define ELF64_R_TYPE(info) ((unsigned char)(info))
/* Macro for constructing r_info from field values. */
-#define ELF64_R_INFO(sym, type) (((sym) << 32) + ((type) & 0xffffffffL))
-
-#define ELF64_R_TYPE_DATA(info) (((Elf64_Xword)(info)<<32)>>40)
-#define ELF64_R_TYPE_ID(info) (((Elf64_Xword)(info)<<56)>>56)
-#define ELF64_R_TYPE_INFO(data, type) \
- (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type))
-
-/*
- * Note entry header
- */
-typedef Elf_Note Elf64_Nhdr;
-
-/*
- * Move entry
- */
-typedef struct {
- Elf64_Lword m_value; /* symbol value */
- Elf64_Xword m_info; /* size + index */
- Elf64_Xword m_poffset; /* symbol offset */
- Elf64_Half m_repeat; /* repeat count */
- Elf64_Half m_stride; /* stride info */
-} Elf64_Move;
-
-#define ELF64_M_SYM(info) ((info)>>8)
-#define ELF64_M_SIZE(info) ((unsigned char)(info))
-#define ELF64_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size))
-
-/*
- * Hardware/Software capabilities entry
- */
-typedef struct {
- Elf64_Xword c_tag; /* how to interpret value */
- union {
- Elf64_Xword c_val;
- Elf64_Addr c_ptr;
- } c_un;
-} Elf64_Cap;
+#define ELF64_R_INFO(sym, type) (((sym) << 32) + (unsigned char)(type))
/*
* Symbol table entries.
@@ -191,58 +157,16 @@ typedef struct {
Elf64_Word st_name; /* String table index of name. */
unsigned char st_info; /* Type and binding information. */
unsigned char st_other; /* Reserved (not used). */
- Elf64_Half st_shndx; /* Section index of symbol. */
+ Elf64_Section st_shndx; /* Section index of symbol. */
Elf64_Addr st_value; /* Symbol value. */
Elf64_Xword st_size; /* Size of associated object. */
} Elf64_Sym;
/* Macros for accessing the fields of st_info. */
-#define ELF64_ST_BIND(info) ((info) >> 4)
-#define ELF64_ST_TYPE(info) ((info) & 0xf)
+#define ELF64_ST_BIND(info) ((info) >> 4)
+#define ELF64_ST_TYPE(info) ((info) & 0xf)
/* Macro for constructing st_info from field values. */
-#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
-
-/* Macro for accessing the fields of st_other. */
-#define ELF64_ST_VISIBILITY(oth) ((oth) & 0x3)
-
-/* Structures used by Sun & GNU-style symbol versioning. */
-typedef struct {
- Elf64_Half vd_version;
- Elf64_Half vd_flags;
- Elf64_Half vd_ndx;
- Elf64_Half vd_cnt;
- Elf64_Word vd_hash;
- Elf64_Word vd_aux;
- Elf64_Word vd_next;
-} Elf64_Verdef;
-
-typedef struct {
- Elf64_Word vda_name;
- Elf64_Word vda_next;
-} Elf64_Verdaux;
-
-typedef struct {
- Elf64_Half vn_version;
- Elf64_Half vn_cnt;
- Elf64_Word vn_file;
- Elf64_Word vn_aux;
- Elf64_Word vn_next;
-} Elf64_Verneed;
-
-typedef struct {
- Elf64_Word vna_hash;
- Elf64_Half vna_flags;
- Elf64_Half vna_other;
- Elf64_Word vna_name;
- Elf64_Word vna_next;
-} Elf64_Vernaux;
-
-typedef Elf64_Half Elf64_Versym;
-
-typedef struct {
- Elf64_Half si_boundto; /* direct bindings - symbol bound to */
- Elf64_Half si_flags; /* per symbol flags */
-} Elf64_Syminfo;
+#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
#endif /* !_SYS_ELF64_H_ */
diff --git a/winsup/cygwin/include/sys/elf_common.h b/winsup/cygwin/include/sys/elf_common.h
index 4b1025613..b864f0464 100644
--- a/winsup/cygwin/include/sys/elf_common.h
+++ b/winsup/cygwin/include/sys/elf_common.h
@@ -1,5 +1,4 @@
/*-
- * Copyright (c) 2000, 2001, 2008, 2011, David E. O'Brien
* Copyright (c) 1998 John D. Polstra.
* All rights reserved.
*
@@ -24,11 +23,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: src/sys/sys/elf_common.h,v 1.15 2004/05/05 02:38:54 marcel Exp $
*/
#ifndef _SYS_ELF_COMMON_H_
-#define _SYS_ELF_COMMON_H_ 1
+#define _SYS_ELF_COMMON_H_ 1
/*
* ELF definitions that are independent of architecture or word size.
@@ -49,336 +48,185 @@ typedef struct {
u_int32_t n_type; /* Type of this note. */
} Elf_Note;
-/*
- * The header for GNU-style hash sections.
- */
-
-typedef struct {
- u_int32_t gh_nbuckets; /* Number of hash buckets. */
- u_int32_t gh_symndx; /* First visible symbol in .dynsym. */
- u_int32_t gh_maskwords; /* #maskwords used in bloom filter. */
- u_int32_t gh_shift2; /* Bloom filter shift count. */
-} Elf_GNU_Hash_Header;
-
/* Indexes into the e_ident array. Keep synced with
- http://www.sco.com/developers/gabi/latest/ch4.eheader.html */
-#define EI_MAG0 0 /* Magic number, byte 0. */
-#define EI_MAG1 1 /* Magic number, byte 1. */
-#define EI_MAG2 2 /* Magic number, byte 2. */
-#define EI_MAG3 3 /* Magic number, byte 3. */
-#define EI_CLASS 4 /* Class of machine. */
-#define EI_DATA 5 /* Data format. */
-#define EI_VERSION 6 /* ELF format version. */
-#define EI_OSABI 7 /* Operating system / ABI identification */
-#define EI_ABIVERSION 8 /* ABI version */
-#define OLD_EI_BRAND 8 /* Start of architecture identification. */
-#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */
-#define EI_NIDENT 16 /* Size of e_ident array. */
+ http://www.sco.com/developer/gabi/ch4.eheader.html */
+#define EI_MAG0 0 /* Magic number, byte 0. */
+#define EI_MAG1 1 /* Magic number, byte 1. */
+#define EI_MAG2 2 /* Magic number, byte 2. */
+#define EI_MAG3 3 /* Magic number, byte 3. */
+#define EI_CLASS 4 /* Class of machine. */
+#define EI_DATA 5 /* Data format. */
+#define EI_VERSION 6 /* ELF format version. */
+#define EI_OSABI 7 /* Operating system / ABI identification */
+#define EI_ABIVERSION 8 /* ABI version */
+#define OLD_EI_BRAND 8 /* Start of architecture identification. */
+#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */
+#define EI_NIDENT 16 /* Size of e_ident array. */
/* Values for the magic number bytes. */
-#define ELFMAG0 0x7f
-#define ELFMAG1 'E'
-#define ELFMAG2 'L'
-#define ELFMAG3 'F'
-#define ELFMAG "\177ELF" /* magic string */
-#define SELFMAG 4 /* magic string size */
+#define ELFMAG0 0x7f
+#define ELFMAG1 'E'
+#define ELFMAG2 'L'
+#define ELFMAG3 'F'
+#define ELFMAG "\177ELF" /* magic string */
+#define SELFMAG 4 /* magic string size */
/* Values for e_ident[EI_VERSION] and e_version. */
-#define EV_NONE 0
-#define EV_CURRENT 1
+#define EV_NONE 0
+#define EV_CURRENT 1
/* Values for e_ident[EI_CLASS]. */
-#define ELFCLASSNONE 0 /* Unknown class. */
-#define ELFCLASS32 1 /* 32-bit architecture. */
-#define ELFCLASS64 2 /* 64-bit architecture. */
+#define ELFCLASSNONE 0 /* Unknown class. */
+#define ELFCLASS32 1 /* 32-bit architecture. */
+#define ELFCLASS64 2 /* 64-bit architecture. */
/* Values for e_ident[EI_DATA]. */
-#define ELFDATANONE 0 /* Unknown data format. */
-#define ELFDATA2LSB 1 /* 2's complement little-endian. */
-#define ELFDATA2MSB 2 /* 2's complement big-endian. */
+#define ELFDATANONE 0 /* Unknown data format. */
+#define ELFDATA2LSB 1 /* 2's complement little-endian. */
+#define ELFDATA2MSB 2 /* 2's complement big-endian. */
/* Values for e_ident[EI_OSABI]. */
-#define ELFOSABI_NONE 0 /* UNIX System V ABI */
-#define ELFOSABI_HPUX 1 /* HP-UX operating system */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* GNU/Linux */
-#define ELFOSABI_HURD 4 /* GNU/Hurd */
-#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */
-#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_AIX 7 /* AIX */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* OpenBSD */
-#define ELFOSABI_OPENVMS 13 /* Open VMS */
-#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */
-#define ELFOSABI_AROS 15 /* Amiga Research OS */
-#define ELFOSABI_ARM 97 /* ARM */
-#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-
-#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */
-#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */
+#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
+#define ELFOSABI_NONE ELFOSABI_SYSV /* symbol used in old spec */
+#define ELFOSABI_HPUX 1 /* HP-UX operating system */
+#define ELFOSABI_NETBSD 2 /* NetBSD */
+#define ELFOSABI_LINUX 3 /* GNU/Linux */
+#define ELFOSABI_HURD 4 /* GNU/Hurd */
+#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */
+#define ELFOSABI_SOLARIS 6 /* Solaris */
+#define ELFOSABI_MONTEREY 7 /* Monterey */
+#define ELFOSABI_IRIX 8 /* IRIX */
+#define ELFOSABI_FREEBSD 9 /* FreeBSD */
+#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
+#define ELFOSABI_MODESTO 11 /* Novell Modesto */
+#define ELFOSABI_OPENBSD 12 /* OpenBSD */
+#define ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
/* e_ident */
-#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
+#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
(ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
(ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
(ehdr).e_ident[EI_MAG3] == ELFMAG3)
/* Values for e_type. */
-#define ET_NONE 0 /* Unknown type. */
-#define ET_REL 1 /* Relocatable. */
-#define ET_EXEC 2 /* Executable. */
-#define ET_DYN 3 /* Shared object. */
-#define ET_CORE 4 /* Core file. */
-#define ET_LOOS 0xfe00 /* First operating system specific. */
-#define ET_HIOS 0xfeff /* Last operating system-specific. */
-#define ET_LOPROC 0xff00 /* First processor-specific. */
-#define ET_HIPROC 0xffff /* Last processor-specific. */
+#define ET_NONE 0 /* Unknown type. */
+#define ET_REL 1 /* Relocatable. */
+#define ET_EXEC 2 /* Executable. */
+#define ET_DYN 3 /* Shared object. */
+#define ET_CORE 4 /* Core file. */
/* Values for e_machine. */
-#define EM_NONE 0 /* Unknown machine. */
-#define EM_M32 1 /* AT&T WE32100. */
-#define EM_SPARC 2 /* Sun SPARC. */
-#define EM_386 3 /* Intel i386. */
-#define EM_68K 4 /* Motorola 68000. */
-#define EM_88K 5 /* Motorola 88000. */
-#define EM_860 7 /* Intel i860. */
-#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */
-#define EM_S370 9 /* IBM System/370. */
-#define EM_MIPS_RS3_LE 10 /* MIPS R3000 Little-Endian. */
-#define EM_PARISC 15 /* HP PA-RISC. */
-#define EM_VPP500 17 /* Fujitsu VPP500. */
-#define EM_SPARC32PLUS 18 /* SPARC v8plus. */
-#define EM_960 19 /* Intel 80960. */
-#define EM_PPC 20 /* PowerPC 32-bit. */
-#define EM_PPC64 21 /* PowerPC 64-bit. */
-#define EM_S390 22 /* IBM System/390. */
-#define EM_V800 36 /* NEC V800. */
-#define EM_FR20 37 /* Fujitsu FR20. */
-#define EM_RH32 38 /* TRW RH-32. */
-#define EM_RCE 39 /* Motorola RCE. */
-#define EM_ARM 40 /* ARM. */
-#define EM_SH 42 /* Hitachi SH. */
-#define EM_SPARCV9 43 /* SPARC v9 64-bit. */
-#define EM_TRICORE 44 /* Siemens TriCore embedded processor. */
-#define EM_ARC 45 /* Argonaut RISC Core. */
-#define EM_H8_300 46 /* Hitachi H8/300. */
-#define EM_H8_300H 47 /* Hitachi H8/300H. */
-#define EM_H8S 48 /* Hitachi H8S. */
-#define EM_H8_500 49 /* Hitachi H8/500. */
-#define EM_IA_64 50 /* Intel IA-64 Processor. */
-#define EM_MIPS_X 51 /* Stanford MIPS-X. */
-#define EM_COLDFIRE 52 /* Motorola ColdFire. */
-#define EM_68HC12 53 /* Motorola M68HC12. */
-#define EM_MMA 54 /* Fujitsu MMA. */
-#define EM_PCP 55 /* Siemens PCP. */
-#define EM_NCPU 56 /* Sony nCPU. */
-#define EM_NDR1 57 /* Denso NDR1 microprocessor. */
-#define EM_STARCORE 58 /* Motorola Star*Core processor. */
-#define EM_ME16 59 /* Toyota ME16 processor. */
-#define EM_ST100 60 /* STMicroelectronics ST100 processor. */
-#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ processor. */
-#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */
-#define EM_AMD64 EM_X86_64 /* Advanced Micro Devices x86-64 (compat) */
-#define EM_PDSP 63 /* Sony DSP Processor. */
-#define EM_FX66 66 /* Siemens FX66 microcontroller. */
-#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16
- microcontroller. */
-#define EM_ST7 68 /* STmicroelectronics ST7 8-bit
- microcontroller. */
-#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller. */
-#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller. */
-#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller. */
-#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller. */
-#define EM_SVX 73 /* Silicon Graphics SVx. */
-#define EM_ST19 74 /* STMicroelectronics ST19 8-bit mc. */
-#define EM_VAX 75 /* Digital VAX. */
-#define EM_CRIS 76 /* Axis Communications 32-bit embedded
- processor. */
-#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded
- processor. */
-#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor. */
-#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor. */
-#define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc. */
-#define EM_HUANY 81 /* Harvard University machine-independent
- object files. */
-#define EM_PRISM 82 /* SiTera Prism. */
-#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller. */
-#define EM_FR30 84 /* Fujitsu FR30. */
-#define EM_D10V 85 /* Mitsubishi D10V. */
-#define EM_D30V 86 /* Mitsubishi D30V. */
-#define EM_V850 87 /* NEC v850. */
-#define EM_M32R 88 /* Mitsubishi M32R. */
-#define EM_MN10300 89 /* Matsushita MN10300. */
-#define EM_MN10200 90 /* Matsushita MN10200. */
-#define EM_PJ 91 /* picoJava. */
-#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor. */
-#define EM_ARC_A5 93 /* ARC Cores Tangent-A5. */
-#define EM_XTENSA 94 /* Tensilica Xtensa Architecture. */
-#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor. */
-#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose
- Processor. */
-#define EM_NS32K 97 /* National Semiconductor 32000 series. */
-#define EM_TPC 98 /* Tenor Network TPC processor. */
-#define EM_SNP1K 99 /* Trebia SNP 1000 processor. */
-#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller. */
-#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family. */
-#define EM_MAX 102 /* MAX Processor. */
-#define EM_CR 103 /* National Semiconductor CompactRISC
- microprocessor. */
-#define EM_F2MC16 104 /* Fujitsu F2MC16. */
-#define EM_MSP430 105 /* Texas Instruments embedded microcontroller
- msp430. */
-#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor. */
-#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors. */
-#define EM_SEP 108 /* Sharp embedded microprocessor. */
-#define EM_ARCA 109 /* Arca RISC Microprocessor. */
-#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd.
- and MPRC of Peking University */
-
-/* Non-standard or deprecated. */
-#define EM_486 6 /* Intel i486. */
-#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */
-#define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */
-#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */
+#define EM_NONE 0 /* Unknown machine. */
+#define EM_M32 1 /* AT&T WE32100. */
+#define EM_SPARC 2 /* Sun SPARC. */
+#define EM_386 3 /* Intel i386. */
+#define EM_68K 4 /* Motorola 68000. */
+#define EM_88K 5 /* Motorola 88000. */
+#define EM_486 6 /* Intel i486. */
+#define EM_860 7 /* Intel i860. */
+#define EM_MIPS 8 /* MIPS R3000 Big-Endian only */
+
+/* Extensions. This list is not complete. */
+#define EM_S370 9 /* IBM System/370 */
+#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ /* Depreciated */
+#define EM_PARISC 15 /* HPPA */
+#define EM_SPARC32PLUS 18 /* SPARC v8plus */
+#define EM_PPC 20 /* PowerPC 32-bit */
+#define EM_PPC64 21 /* PowerPC 64-bit */
+#define EM_ARM 40 /* ARM */
+#define EM_SPARCV9 43 /* SPARC v9 64-bit */
+#define EM_IA_64 50 /* Intel IA-64 Processor */
+#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */
+#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI */
/* Special section indexes. */
-#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */
-#define SHN_LORESERVE 0xff00 /* First of reserved range. */
-#define SHN_LOPROC 0xff00 /* First processor-specific. */
-#define SHN_HIPROC 0xff1f /* Last processor-specific. */
-#define SHN_LOOS 0xff20 /* First operating system-specific. */
-#define SHN_HIOS 0xff3f /* Last operating system-specific. */
-#define SHN_ABS 0xfff1 /* Absolute values. */
-#define SHN_COMMON 0xfff2 /* Common data. */
-#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */
-#define SHN_HIRESERVE 0xffff /* Last of reserved range. */
+#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */
+#define SHN_LORESERVE 0xff00 /* First of reserved range. */
+#define SHN_LOPROC 0xff00 /* First processor-specific. */
+#define SHN_HIPROC 0xff1f /* Last processor-specific. */
+#define SHN_ABS 0xfff1 /* Absolute values. */
+#define SHN_COMMON 0xfff2 /* Common data. */
+#define SHN_HIRESERVE 0xffff /* Last of reserved range. */
/* sh_type */
-#define SHT_NULL 0 /* inactive */
-#define SHT_PROGBITS 1 /* program defined information */
-#define SHT_SYMTAB 2 /* symbol table section */
-#define SHT_STRTAB 3 /* string table section */
-#define SHT_RELA 4 /* relocation section with addends */
-#define SHT_HASH 5 /* symbol hash table section */
-#define SHT_DYNAMIC 6 /* dynamic section */
-#define SHT_NOTE 7 /* note section */
-#define SHT_NOBITS 8 /* no space section */
-#define SHT_REL 9 /* relocation section - no addends */
-#define SHT_SHLIB 10 /* reserved - purpose unknown */
-#define SHT_DYNSYM 11 /* dynamic symbol table section */
-#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */
-#define SHT_FINI_ARRAY 15 /* Termination function pointers. */
-#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */
-#define SHT_GROUP 17 /* Section group. */
-#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */
-#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
-#define SHT_LOSUNW 0x6ffffff4
-#define SHT_SUNW_dof 0x6ffffff4
-#define SHT_SUNW_cap 0x6ffffff5
-#define SHT_SUNW_SIGNATURE 0x6ffffff6
-#define SHT_GNU_HASH 0x6ffffff6
-#define SHT_SUNW_ANNOTATE 0x6ffffff7
-#define SHT_SUNW_DEBUGSTR 0x6ffffff8
-#define SHT_SUNW_DEBUG 0x6ffffff9
-#define SHT_SUNW_move 0x6ffffffa
-#define SHT_SUNW_COMDAT 0x6ffffffb
-#define SHT_SUNW_syminfo 0x6ffffffc
-#define SHT_SUNW_verdef 0x6ffffffd
-#define SHT_GNU_verdef 0x6ffffffd /* Symbol versions provided */
-#define SHT_SUNW_verneed 0x6ffffffe
-#define SHT_GNU_verneed 0x6ffffffe /* Symbol versions required */
-#define SHT_SUNW_versym 0x6fffffff
-#define SHT_GNU_versym 0x6fffffff /* Symbol version table */
-#define SHT_HISUNW 0x6fffffff
-#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
-#define SHT_LOPROC 0x70000000 /* reserved range for processor */
-#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */
-#define SHT_MIPS_REGINFO 0x70000006
-#define SHT_MIPS_OPTIONS 0x7000000d
-#define SHT_MIPS_DWARF 0x7000001e /* MIPS gcc uses MIPS_DWARF */
-#define SHT_HIPROC 0x7fffffff /* specific section header types */
-#define SHT_LOUSER 0x80000000 /* reserved range for application */
-#define SHT_HIUSER 0xffffffff /* specific indexes */
+#define SHT_NULL 0 /* inactive */
+#define SHT_PROGBITS 1 /* program defined information */
+#define SHT_SYMTAB 2 /* symbol table section */
+#define SHT_STRTAB 3 /* string table section */
+#define SHT_RELA 4 /* relocation section with addends */
+#define SHT_HASH 5 /* symbol hash table section */
+#define SHT_DYNAMIC 6 /* dynamic section */
+#define SHT_NOTE 7 /* note section */
+#define SHT_NOBITS 8 /* no space section */
+#define SHT_REL 9 /* relocation section - no addends */
+#define SHT_SHLIB 10 /* reserved - purpose unknown */
+#define SHT_DYNSYM 11 /* dynamic symbol table section */
+#define SHT_NUM 12 /* number of section types */
+#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
+#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
+#define SHT_LOPROC 0x70000000 /* reserved range for processor */
+#define SHT_HIPROC 0x7fffffff /* specific section header types */
+#define SHT_LOUSER 0x80000000 /* reserved range for application */
+#define SHT_HIUSER 0xffffffff /* specific indexes */
/* Flags for sh_flags. */
-#define SHF_WRITE 0x1 /* Section contains writable data. */
-#define SHF_ALLOC 0x2 /* Section occupies memory. */
-#define SHF_EXECINSTR 0x4 /* Section contains instructions. */
-#define SHF_MERGE 0x10 /* Section may be merged. */
-#define SHF_STRINGS 0x20 /* Section contains strings. */
-#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */
-#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */
-#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */
-#define SHF_GROUP 0x200 /* Member of section group. */
-#define SHF_TLS 0x400 /* Section contains TLS data. */
-#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */
-#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */
+#define SHF_WRITE 0x1 /* Section contains writable data. */
+#define SHF_ALLOC 0x2 /* Section occupies memory. */
+#define SHF_EXECINSTR 0x4 /* Section contains instructions. */
+#define SHF_TLS 0x400 /* Section contains TLS data. */
+#define SHF_MASKPROC 0xf0000000 /* Reserved for processor-specific. */
/* Values for p_type. */
-#define PT_NULL 0 /* Unused entry. */
-#define PT_LOAD 1 /* Loadable segment. */
-#define PT_DYNAMIC 2 /* Dynamic linking information segment. */
-#define PT_INTERP 3 /* Pathname of interpreter. */
-#define PT_NOTE 4 /* Auxiliary information. */
-#define PT_SHLIB 5 /* Reserved (not used). */
-#define PT_PHDR 6 /* Location of program header itself. */
+#define PT_NULL 0 /* Unused entry. */
+#define PT_LOAD 1 /* Loadable segment. */
+#define PT_DYNAMIC 2 /* Dynamic linking information segment. */
+#define PT_INTERP 3 /* Pathname of interpreter. */
+#define PT_NOTE 4 /* Auxiliary information. */
+#define PT_SHLIB 5 /* Reserved (not used). */
+#define PT_PHDR 6 /* Location of program header itself. */
#define PT_TLS 7 /* Thread local storage segment */
-#define PT_LOOS 0x60000000 /* First OS-specific. */
-#define PT_SUNW_UNWIND 0x6464e550 /* amd64 UNWIND program header */
-#define PT_GNU_EH_FRAME 0x6474e550
-#define PT_GNU_STACK 0x6474e551
-#define PT_GNU_RELRO 0x6474e552
-#define PT_LOSUNW 0x6ffffffa
-#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
-#define PT_SUNWSTACK 0x6ffffffb /* describes the stack segment */
-#define PT_SUNWDTRACE 0x6ffffffc /* private */
-#define PT_SUNWCAP 0x6ffffffd /* hard/soft capabilities segment */
-#define PT_HISUNW 0x6fffffff
-#define PT_HIOS 0x6fffffff /* Last OS-specific. */
-#define PT_LOPROC 0x70000000 /* First processor-specific type. */
-#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */
-/* Values for p_flags. */
-#define PF_X 0x1 /* Executable. */
-#define PF_W 0x2 /* Writable. */
-#define PF_R 0x4 /* Readable. */
-#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */
-#define PF_MASKPROC 0xf0000000 /* Processor-specific. */
+#define PT_COUNT 8 /* Number of defined p_type values. */
-/* Extended program header index. */
-#define PN_XNUM 0xffff
+#define PT_LOOS 0x60000000 /* OS-specific */
+#define PT_HIOS 0x6fffffff /* OS-specific */
+#define PT_LOPROC 0x70000000 /* First processor-specific type. */
+#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */
+
+/* Values for p_flags. */
+#define PF_X 0x1 /* Executable. */
+#define PF_W 0x2 /* Writable. */
+#define PF_R 0x4 /* Readable. */
/* Values for d_tag. */
-#define DT_NULL 0 /* Terminating entry. */
-#define DT_NEEDED 1 /* String table offset of a needed shared
+#define DT_NULL 0 /* Terminating entry. */
+#define DT_NEEDED 1 /* String table offset of a needed shared
library. */
-#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */
-#define DT_PLTGOT 3 /* Processor-dependent address. */
-#define DT_HASH 4 /* Address of symbol hash table. */
-#define DT_STRTAB 5 /* Address of string table. */
-#define DT_SYMTAB 6 /* Address of symbol table. */
-#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */
-#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */
-#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */
-#define DT_STRSZ 10 /* Size of string table. */
-#define DT_SYMENT 11 /* Size of each symbol table entry. */
-#define DT_INIT 12 /* Address of initialization function. */
-#define DT_FINI 13 /* Address of finalization function. */
-#define DT_SONAME 14 /* String table offset of shared object
+#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */
+#define DT_PLTGOT 3 /* Processor-dependent address. */
+#define DT_HASH 4 /* Address of symbol hash table. */
+#define DT_STRTAB 5 /* Address of string table. */
+#define DT_SYMTAB 6 /* Address of symbol table. */
+#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */
+#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */
+#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */
+#define DT_STRSZ 10 /* Size of string table. */
+#define DT_SYMENT 11 /* Size of each symbol table entry. */
+#define DT_INIT 12 /* Address of initialization function. */
+#define DT_FINI 13 /* Address of finalization function. */
+#define DT_SONAME 14 /* String table offset of shared object
name. */
-#define DT_RPATH 15 /* String table offset of library path. [sup] */
-#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */
-#define DT_REL 17 /* Address of ElfNN_Rel relocations. */
-#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */
-#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */
-#define DT_PLTREL 20 /* Type of relocation used for PLT. */
-#define DT_DEBUG 21 /* Reserved (not used). */
-#define DT_TEXTREL 22 /* Indicates there may be relocations in
+#define DT_RPATH 15 /* String table offset of library path. [sup] */
+#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */
+#define DT_REL 17 /* Address of ElfNN_Rel relocations. */
+#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */
+#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */
+#define DT_PLTREL 20 /* Type of relocation used for PLT. */
+#define DT_DEBUG 21 /* Reserved (not used). */
+#define DT_TEXTREL 22 /* Indicates there may be relocations in
non-writable segments. [sup] */
-#define DT_JMPREL 23 /* Address of PLT relocations. */
+#define DT_JMPREL 23 /* Address of PLT relocations. */
#define DT_BIND_NOW 24 /* [sup] */
#define DT_INIT_ARRAY 25 /* Address of the array of pointers to
initialization functions */
@@ -387,75 +235,25 @@ typedef struct {
#define DT_INIT_ARRAYSZ 27 /* Size in bytes of the array of
initialization functions. */
#define DT_FINI_ARRAYSZ 28 /* Size in bytes of the array of
- termination functions. */
+ terminationfunctions. */
#define DT_RUNPATH 29 /* String table offset of a null-terminated
library search path string. */
#define DT_FLAGS 30 /* Object specific flag values. */
#define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING
and less than DT_LOOS follow the rules for
the interpretation of the d_un union
- as follows: even == 'd_ptr', odd == 'd_val'
+ as follows: even == 'd_ptr', even == 'd_val'
or none */
#define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to
pre-initialization functions. */
#define DT_PREINIT_ARRAYSZ 33 /* Size in bytes of the array of
pre-initialization functions. */
-#define DT_MAXPOSTAGS 34 /* number of positive tags */
-#define DT_LOOS 0x6000000d /* First OS-specific */
-#define DT_SUNW_AUXILIARY 0x6000000d /* symbol auxiliary name */
-#define DT_SUNW_RTLDINF 0x6000000e /* ld.so.1 info (private) */
-#define DT_SUNW_FILTER 0x6000000f /* symbol filter name */
-#define DT_SUNW_CAP 0x60000010 /* hardware/software */
-#define DT_HIOS 0x6ffff000 /* Last OS-specific */
-
-/*
- * DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the
- * Dyn.d_un.d_val field of the Elf*_Dyn structure.
- */
-#define DT_VALRNGLO 0x6ffffd00
-#define DT_CHECKSUM 0x6ffffdf8 /* elf checksum */
-#define DT_PLTPADSZ 0x6ffffdf9 /* pltpadding size */
-#define DT_MOVEENT 0x6ffffdfa /* move table entry size */
-#define DT_MOVESZ 0x6ffffdfb /* move table size */
-#define DT_FEATURE_1 0x6ffffdfc /* feature holder */
-#define DT_POSFLAG_1 0x6ffffdfd /* flags for DT_* entries, effecting */
- /* the following DT_* entry. */
- /* See DF_P1_* definitions */
-#define DT_SYMINSZ 0x6ffffdfe /* syminfo table size (in bytes) */
-#define DT_SYMINENT 0x6ffffdff /* syminfo entry size (in bytes) */
-#define DT_VALRNGHI 0x6ffffdff
-
-/*
- * DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the
- * Dyn.d_un.d_ptr field of the Elf*_Dyn structure.
- *
- * If any adjustment is made to the ELF object after it has been
- * built, these entries will need to be adjusted.
- */
-#define DT_ADDRRNGLO 0x6ffffe00
-#define DT_GNU_HASH 0x6ffffef5 /* GNU-style hash table */
-#define DT_CONFIG 0x6ffffefa /* configuration information */
-#define DT_DEPAUDIT 0x6ffffefb /* dependency auditing */
-#define DT_AUDIT 0x6ffffefc /* object auditing */
-#define DT_PLTPAD 0x6ffffefd /* pltpadding (sparcv9) */
-#define DT_MOVETAB 0x6ffffefe /* move table */
-#define DT_SYMINFO 0x6ffffeff /* syminfo table */
-#define DT_ADDRRNGHI 0x6ffffeff
-#define DT_VERSYM 0x6ffffff0 /* Address of versym section. */
-#define DT_RELACOUNT 0x6ffffff9 /* number of RELATIVE relocations */
-#define DT_RELCOUNT 0x6ffffffa /* number of RELATIVE relocations */
-#define DT_FLAGS_1 0x6ffffffb /* state flags - see DF_1_* defs */
-#define DT_VERDEF 0x6ffffffc /* Address of verdef section. */
-#define DT_VERDEFNUM 0x6ffffffd /* Number of elems in verdef section */
-#define DT_VERNEED 0x6ffffffe /* Address of verneed section. */
-#define DT_VERNEEDNUM 0x6fffffff /* Number of elems in verneed section */
+#define DT_COUNT 33 /* Number of defined d_tag values. */
+#define DT_LOOS 0x6000000d /* First OS-specific */
+#define DT_HIOS 0x6fff0000 /* Last OS-specific */
#define DT_LOPROC 0x70000000 /* First processor-specific type. */
-#define DT_DEPRECATED_SPARC_REGISTER 0x7000001
-#define DT_AUXILIARY 0x7ffffffd /* shared library auxiliary name */
-#define DT_USED 0x7ffffffe /* ignored - same as needed */
-#define DT_FILTER 0x7fffffff /* shared library filter name */
#define DT_HIPROC 0x7fffffff /* Last processor-specific type. */
/* Values for DT_FLAGS */
@@ -473,638 +271,29 @@ typedef struct {
executable contains code using a static
thread-local storage scheme. */
-/* Values for DT_FLAGS_1 */
-#define DF_1_BIND_NOW 0x00000001 /* Same as DF_BIND_NOW */
-#define DF_1_GLOBAL 0x00000002 /* Set the RTLD_GLOBAL for object */
-#define DF_1_NODELETE 0x00000008 /* Set the RTLD_NODELETE for object */
-#define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */
-#define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */
-#define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */
-#define DF_1_NODEFLIB 0x00000800 /* Do not search default paths */
-
/* Values for n_type. Used in core files. */
-#define NT_PRSTATUS 1 /* Process status. */
-#define NT_FPREGSET 2 /* Floating point registers. */
-#define NT_PRPSINFO 3 /* Process state info. */
-#define NT_THRMISC 7 /* Thread miscellaneous info. */
+#define NT_PRSTATUS 1 /* Process status. */
+#define NT_FPREGSET 2 /* Floating point registers. */
+#define NT_PRPSINFO 3 /* Process state info. */
/* Symbol Binding - ELFNN_ST_BIND - st_info */
-#define STB_LOCAL 0 /* Local symbol */
-#define STB_GLOBAL 1 /* Global symbol */
-#define STB_WEAK 2 /* like global - lower precedence */
-#define STB_LOOS 10 /* Reserved range for operating system */
-#define STB_HIOS 12 /* specific semantics. */
-#define STB_LOPROC 13 /* reserved range for processor */
-#define STB_HIPROC 15 /* specific semantics. */
+#define STB_LOCAL 0 /* Local symbol */
+#define STB_GLOBAL 1 /* Global symbol */
+#define STB_WEAK 2 /* like global - lower precedence */
+#define STB_LOPROC 13 /* reserved range for processor */
+#define STB_HIPROC 15 /* specific symbol bindings */
/* Symbol type - ELFNN_ST_TYPE - st_info */
-#define STT_NOTYPE 0 /* Unspecified type. */
-#define STT_OBJECT 1 /* Data object. */
-#define STT_FUNC 2 /* Function. */
-#define STT_SECTION 3 /* Section. */
-#define STT_FILE 4 /* Source file. */
-#define STT_COMMON 5 /* Uninitialized common block. */
-#define STT_TLS 6 /* TLS object. */
-#define STT_NUM 7
-#define STT_LOOS 10 /* Reserved range for operating system */
-#define STT_GNU_IFUNC 10
-#define STT_HIOS 12 /* specific semantics. */
-#define STT_LOPROC 13 /* reserved range for processor */
-#define STT_HIPROC 15 /* specific semantics. */
-
-/* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */
-#define STV_DEFAULT 0x0 /* Default visibility (see binding). */
-#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */
-#define STV_HIDDEN 0x2 /* Not visible. */
-#define STV_PROTECTED 0x3 /* Visible but not preemptible. */
-#define STV_EXPORTED 0x4
-#define STV_SINGLETON 0x5
-#define STV_ELIMINATE 0x6
+#define STT_NOTYPE 0 /* Unspecified type. */
+#define STT_OBJECT 1 /* Data object. */
+#define STT_FUNC 2 /* Function. */
+#define STT_SECTION 3 /* Section. */
+#define STT_FILE 4 /* Source file. */
+#define STT_TLS 6 /* TLS object. */
+#define STT_LOPROC 13 /* reserved range for processor */
+#define STT_HIPROC 15 /* specific symbol types */
/* Special symbol table indexes. */
-#define STN_UNDEF 0 /* Undefined symbol index. */
-
-/* Symbol versioning flags. */
-#define VER_DEF_CURRENT 1
-#define VER_DEF_IDX(x) VER_NDX(x)
-
-#define VER_FLG_BASE 0x01
-#define VER_FLG_WEAK 0x02
-
-#define VER_NEED_CURRENT 1
-#define VER_NEED_WEAK (1u << 15)
-#define VER_NEED_HIDDEN VER_NDX_HIDDEN
-#define VER_NEED_IDX(x) VER_NDX(x)
-
-#define VER_NDX_LOCAL 0
-#define VER_NDX_GLOBAL 1
-#define VER_NDX_GIVEN 2
-
-#define VER_NDX_HIDDEN (1u << 15)
-#define VER_NDX(x) ((x) & ~(1u << 15))
-
-#define CA_SUNW_NULL 0
-#define CA_SUNW_HW_1 1 /* first hardware capabilities entry */
-#define CA_SUNW_SF_1 2 /* first software capabilities entry */
-
-/*
- * Syminfo flag values
- */
-#define SYMINFO_FLG_DIRECT 0x0001 /* symbol ref has direct association */
- /* to object containing defn. */
-#define SYMINFO_FLG_PASSTHRU 0x0002 /* ignored - see SYMINFO_FLG_FILTER */
-#define SYMINFO_FLG_COPY 0x0004 /* symbol is a copy-reloc */
-#define SYMINFO_FLG_LAZYLOAD 0x0008 /* object containing defn should be */
- /* lazily-loaded */
-#define SYMINFO_FLG_DIRECTBIND 0x0010 /* ref should be bound directly to */
- /* object containing defn. */
-#define SYMINFO_FLG_NOEXTDIRECT 0x0020 /* don't let an external reference */
- /* directly bind to this symbol */
-#define SYMINFO_FLG_FILTER 0x0002 /* symbol ref is associated to a */
-#define SYMINFO_FLG_AUXILIARY 0x0040 /* standard or auxiliary filter */
-
-/*
- * Syminfo.si_boundto values.
- */
-#define SYMINFO_BT_SELF 0xffff /* symbol bound to self */
-#define SYMINFO_BT_PARENT 0xfffe /* symbol bound to parent */
-#define SYMINFO_BT_NONE 0xfffd /* no special symbol binding */
-#define SYMINFO_BT_EXTERN 0xfffc /* symbol defined as external */
-#define SYMINFO_BT_LOWRESERVE 0xff00 /* beginning of reserved entries */
-
-/*
- * Syminfo version values.
- */
-#define SYMINFO_NONE 0 /* Syminfo version */
-#define SYMINFO_CURRENT 1
-#define SYMINFO_NUM 2
-
-/*
- * Relocation types.
- *
- * All machine architectures are defined here to allow tools on one to
- * handle others.
- */
-
-#define R_386_NONE 0 /* No relocation. */
-#define R_386_32 1 /* Add symbol value. */
-#define R_386_PC32 2 /* Add PC-relative symbol value. */
-#define R_386_GOT32 3 /* Add PC-relative GOT offset. */
-#define R_386_PLT32 4 /* Add PC-relative PLT offset. */
-#define R_386_COPY 5 /* Copy data from shared object. */
-#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */
-#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */
-#define R_386_RELATIVE 8 /* Add load address of shared object. */
-#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */
-#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */
-#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */
-#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */
-#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */
-#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */
-#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */
-#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */
-#define R_386_16 20
-#define R_386_PC16 21
-#define R_386_8 22
-#define R_386_PC8 23
-#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */
-#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */
-#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */
-#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */
-#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */
-#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */
-#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */
-#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */
-#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */
-#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */
-#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */
-#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */
-#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */
-#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */
-#define R_386_IRELATIVE 42 /* PLT entry resolved indirectly at runtime */
-
-#define R_ARM_NONE 0 /* No relocation. */
-#define R_ARM_PC24 1
-#define R_ARM_ABS32 2
-#define R_ARM_REL32 3
-#define R_ARM_PC13 4
-#define R_ARM_ABS16 5
-#define R_ARM_ABS12 6
-#define R_ARM_THM_ABS5 7
-#define R_ARM_ABS8 8
-#define R_ARM_SBREL32 9
-#define R_ARM_THM_PC22 10
-#define R_ARM_THM_PC8 11
-#define R_ARM_AMP_VCALL9 12
-#define R_ARM_SWI24 13
-#define R_ARM_THM_SWI8 14
-#define R_ARM_XPC25 15
-#define R_ARM_THM_XPC22 16
-/* TLS relocations */
-#define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */
-#define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */
-#define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */
-#define R_ARM_COPY 20 /* Copy data from shared object. */
-#define R_ARM_GLOB_DAT 21 /* Set GOT entry to data address. */
-#define R_ARM_JUMP_SLOT 22 /* Set GOT entry to code address. */
-#define R_ARM_RELATIVE 23 /* Add load address of shared object. */
-#define R_ARM_GOTOFF 24 /* Add GOT-relative symbol address. */
-#define R_ARM_GOTPC 25 /* Add PC-relative GOT table address. */
-#define R_ARM_GOT32 26 /* Add PC-relative GOT offset. */
-#define R_ARM_PLT32 27 /* Add PC-relative PLT offset. */
-#define R_ARM_GNU_VTENTRY 100
-#define R_ARM_GNU_VTINHERIT 101
-#define R_ARM_RSBREL32 250
-#define R_ARM_THM_RPC22 251
-#define R_ARM_RREL32 252
-#define R_ARM_RABS32 253
-#define R_ARM_RPC24 254
-#define R_ARM_RBASE 255
-
-/* Name Value Field Calculation */
-#define R_IA_64_NONE 0 /* None */
-#define R_IA_64_IMM14 0x21 /* immediate14 S + A */
-#define R_IA_64_IMM22 0x22 /* immediate22 S + A */
-#define R_IA_64_IMM64 0x23 /* immediate64 S + A */
-#define R_IA_64_DIR32MSB 0x24 /* word32 MSB S + A */
-#define R_IA_64_DIR32LSB 0x25 /* word32 LSB S + A */
-#define R_IA_64_DIR64MSB 0x26 /* word64 MSB S + A */
-#define R_IA_64_DIR64LSB 0x27 /* word64 LSB S + A */
-#define R_IA_64_GPREL22 0x2a /* immediate22 @gprel(S + A) */
-#define R_IA_64_GPREL64I 0x2b /* immediate64 @gprel(S + A) */
-#define R_IA_64_GPREL32MSB 0x2c /* word32 MSB @gprel(S + A) */
-#define R_IA_64_GPREL32LSB 0x2d /* word32 LSB @gprel(S + A) */
-#define R_IA_64_GPREL64MSB 0x2e /* word64 MSB @gprel(S + A) */
-#define R_IA_64_GPREL64LSB 0x2f /* word64 LSB @gprel(S + A) */
-#define R_IA_64_LTOFF22 0x32 /* immediate22 @ltoff(S + A) */
-#define R_IA_64_LTOFF64I 0x33 /* immediate64 @ltoff(S + A) */
-#define R_IA_64_PLTOFF22 0x3a /* immediate22 @pltoff(S + A) */
-#define R_IA_64_PLTOFF64I 0x3b /* immediate64 @pltoff(S + A) */
-#define R_IA_64_PLTOFF64MSB 0x3e /* word64 MSB @pltoff(S + A) */
-#define R_IA_64_PLTOFF64LSB 0x3f /* word64 LSB @pltoff(S + A) */
-#define R_IA_64_FPTR64I 0x43 /* immediate64 @fptr(S + A) */
-#define R_IA_64_FPTR32MSB 0x44 /* word32 MSB @fptr(S + A) */
-#define R_IA_64_FPTR32LSB 0x45 /* word32 LSB @fptr(S + A) */
-#define R_IA_64_FPTR64MSB 0x46 /* word64 MSB @fptr(S + A) */
-#define R_IA_64_FPTR64LSB 0x47 /* word64 LSB @fptr(S + A) */
-#define R_IA_64_PCREL60B 0x48 /* immediate60 form1 S + A - P */
-#define R_IA_64_PCREL21B 0x49 /* immediate21 form1 S + A - P */
-#define R_IA_64_PCREL21M 0x4a /* immediate21 form2 S + A - P */
-#define R_IA_64_PCREL21F 0x4b /* immediate21 form3 S + A - P */
-#define R_IA_64_PCREL32MSB 0x4c /* word32 MSB S + A - P */
-#define R_IA_64_PCREL32LSB 0x4d /* word32 LSB S + A - P */
-#define R_IA_64_PCREL64MSB 0x4e /* word64 MSB S + A - P */
-#define R_IA_64_PCREL64LSB 0x4f /* word64 LSB S + A - P */
-#define R_IA_64_LTOFF_FPTR22 0x52 /* immediate22 @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR64I 0x53 /* immediate64 @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR32MSB 0x54 /* word32 MSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR32LSB 0x55 /* word32 LSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR64MSB 0x56 /* word64 MSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR64LSB 0x57 /* word64 LSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_SEGREL32MSB 0x5c /* word32 MSB @segrel(S + A) */
-#define R_IA_64_SEGREL32LSB 0x5d /* word32 LSB @segrel(S + A) */
-#define R_IA_64_SEGREL64MSB 0x5e /* word64 MSB @segrel(S + A) */
-#define R_IA_64_SEGREL64LSB 0x5f /* word64 LSB @segrel(S + A) */
-#define R_IA_64_SECREL32MSB 0x64 /* word32 MSB @secrel(S + A) */
-#define R_IA_64_SECREL32LSB 0x65 /* word32 LSB @secrel(S + A) */
-#define R_IA_64_SECREL64MSB 0x66 /* word64 MSB @secrel(S + A) */
-#define R_IA_64_SECREL64LSB 0x67 /* word64 LSB @secrel(S + A) */
-#define R_IA_64_REL32MSB 0x6c /* word32 MSB BD + A */
-#define R_IA_64_REL32LSB 0x6d /* word32 LSB BD + A */
-#define R_IA_64_REL64MSB 0x6e /* word64 MSB BD + A */
-#define R_IA_64_REL64LSB 0x6f /* word64 LSB BD + A */
-#define R_IA_64_LTV32MSB 0x74 /* word32 MSB S + A */
-#define R_IA_64_LTV32LSB 0x75 /* word32 LSB S + A */
-#define R_IA_64_LTV64MSB 0x76 /* word64 MSB S + A */
-#define R_IA_64_LTV64LSB 0x77 /* word64 LSB S + A */
-#define R_IA_64_PCREL21BI 0x79 /* immediate21 form1 S + A - P */
-#define R_IA_64_PCREL22 0x7a /* immediate22 S + A - P */
-#define R_IA_64_PCREL64I 0x7b /* immediate64 S + A - P */
-#define R_IA_64_IPLTMSB 0x80 /* function descriptor MSB special */
-#define R_IA_64_IPLTLSB 0x81 /* function descriptor LSB speciaal */
-#define R_IA_64_SUB 0x85 /* immediate64 A - S */
-#define R_IA_64_LTOFF22X 0x86 /* immediate22 special */
-#define R_IA_64_LDXMOV 0x87 /* immediate22 special */
-#define R_IA_64_TPREL14 0x91 /* imm14 @tprel(S + A) */
-#define R_IA_64_TPREL22 0x92 /* imm22 @tprel(S + A) */
-#define R_IA_64_TPREL64I 0x93 /* imm64 @tprel(S + A) */
-#define R_IA_64_TPREL64MSB 0x96 /* word64 MSB @tprel(S + A) */
-#define R_IA_64_TPREL64LSB 0x97 /* word64 LSB @tprel(S + A) */
-#define R_IA_64_LTOFF_TPREL22 0x9a /* imm22 @ltoff(@tprel(S+A)) */
-#define R_IA_64_DTPMOD64MSB 0xa6 /* word64 MSB @dtpmod(S + A) */
-#define R_IA_64_DTPMOD64LSB 0xa7 /* word64 LSB @dtpmod(S + A) */
-#define R_IA_64_LTOFF_DTPMOD22 0xaa /* imm22 @ltoff(@dtpmod(S+A)) */
-#define R_IA_64_DTPREL14 0xb1 /* imm14 @dtprel(S + A) */
-#define R_IA_64_DTPREL22 0xb2 /* imm22 @dtprel(S + A) */
-#define R_IA_64_DTPREL64I 0xb3 /* imm64 @dtprel(S + A) */
-#define R_IA_64_DTPREL32MSB 0xb4 /* word32 MSB @dtprel(S + A) */
-#define R_IA_64_DTPREL32LSB 0xb5 /* word32 LSB @dtprel(S + A) */
-#define R_IA_64_DTPREL64MSB 0xb6 /* word64 MSB @dtprel(S + A) */
-#define R_IA_64_DTPREL64LSB 0xb7 /* word64 LSB @dtprel(S + A) */
-#define R_IA_64_LTOFF_DTPREL22 0xba /* imm22 @ltoff(@dtprel(S+A)) */
-
-/* Linux style aliases */
-#define R_IA64_NONE R_IA_64_NONE
-#define R_IA64_IMM14 R_IA_64_IMM14
-#define R_IA64_IMM22 R_IA_64_IMM22
-#define R_IA64_IMM64 R_IA_64_IMM64
-#define R_IA64_DIR32MSB R_IA_64_DIR32MSB
-#define R_IA64_DIR32LSB R_IA_64_DIR32LSB
-#define R_IA64_DIR64MSB R_IA_64_DIR64MSB
-#define R_IA64_DIR64LSB R_IA_64_DIR64LSB
-#define R_IA64_GPREL22 R_IA_64_GPREL22
-#define R_IA64_GPREL64I R_IA_64_GPREL64I
-#define R_IA64_GPREL32MSB R_IA_64_GPREL32MSB
-#define R_IA64_GPREL32LSB R_IA_64_GPREL32LSB
-#define R_IA64_GPREL64MSB R_IA_64_GPREL64MSB
-#define R_IA64_GPREL64LSB R_IA_64_GPREL64LSB
-#define R_IA64_LTOFF22 R_IA_64_LTOFF22
-#define R_IA64_LTOFF64I R_IA_64_LTOFF64I
-#define R_IA64_PLTOFF22 R_IA_64_PLTOFF22
-#define R_IA64_PLTOFF64I R_IA_64_PLTOFF64I
-#define R_IA64_PLTOFF64MSB R_IA_64_PLTOFF64MSB
-#define R_IA64_PLTOFF64LSB R_IA_64_PLTOFF64LSB
-#define R_IA64_FPTR64I R_IA_64_FPTR64I
-#define R_IA64_FPTR32MSB R_IA_64_FPTR32MSB
-#define R_IA64_FPTR32LSB R_IA_64_FPTR32LSB
-#define R_IA64_FPTR64MSB R_IA_64_FPTR64MSB
-#define R_IA64_FPTR64LSB R_IA_64_FPTR64LSB
-#define R_IA64_PCREL60B R_IA_64_PCREL60B
-#define R_IA64_PCREL21B R_IA_64_PCREL21B
-#define R_IA64_PCREL21M R_IA_64_PCREL21M
-#define R_IA64_PCREL21F R_IA_64_PCREL21F
-#define R_IA64_PCREL32MSB R_IA_64_PCREL32MSB
-#define R_IA64_PCREL32LSB R_IA_64_PCREL32LSB
-#define R_IA64_PCREL64MSB R_IA_64_PCREL64MSB
-#define R_IA64_PCREL64LSB R_IA_64_PCREL64LSB
-#define R_IA64_LTOFF_FPTR22 R_IA_64_LTOFF_FPTR22
-#define R_IA64_LTOFF_FPTR64I R_IA_64_LTOFF_FPTR64I
-#define R_IA64_LTOFF_FPTR32MSB R_IA_64_LTOFF_FPTR32MSB
-#define R_IA64_LTOFF_FPTR32LSB R_IA_64_LTOFF_FPTR32LSB
-#define R_IA64_LTOFF_FPTR64MSB R_IA_64_LTOFF_FPTR64MSB
-#define R_IA64_LTOFF_FPTR64LSB R_IA_64_LTOFF_FPTR64LSB
-#define R_IA64_SEGREL32MSB R_IA_64_SEGREL32MSB
-#define R_IA64_SEGREL32LSB R_IA_64_SEGREL32LSB
-#define R_IA64_SEGREL64MSB R_IA_64_SEGREL64MSB
-#define R_IA64_SEGREL64LSB R_IA_64_SEGREL64LSB
-#define R_IA64_SECREL32MSB R_IA_64_SECREL32MSB
-#define R_IA64_SECREL32LSB R_IA_64_SECREL32LSB
-#define R_IA64_SECREL64MSB R_IA_64_SECREL64MSB
-#define R_IA64_SECREL64LSB R_IA_64_SECREL64LSB
-#define R_IA64_REL32MSB R_IA_64_REL32MSB
-#define R_IA64_REL32LSB R_IA_64_REL32LSB
-#define R_IA64_REL64MSB R_IA_64_REL64MSB
-#define R_IA64_REL64LSB R_IA_64_REL64LSB
-#define R_IA64_LTV32MSB R_IA_64_LTV32MSB
-#define R_IA64_LTV32LSB R_IA_64_LTV32LSB
-#define R_IA64_LTV64MSB R_IA_64_LTV64MSB
-#define R_IA64_LTV64LSB R_IA_64_LTV64LSB
-#define R_IA64_PCREL21BI R_IA_64_PCREL21BI
-#define R_IA64_PCREL22 R_IA_64_PCREL22
-#define R_IA64_PCREL64I R_IA_64_PCREL64I
-#define R_IA64_IPLTMSB R_IA_64_IPLTMSB
-#define R_IA64_IPLTLSB R_IA_64_IPLTLSB
-#define R_IA64_SUB R_IA_64_SUB
-#define R_IA64_LTOFF22X R_IA_64_LTOFF22X
-#define R_IA64_LDXMOV R_IA_64_LDXMOV
-#define R_IA64_TPREL14 R_IA_64_TPREL14
-#define R_IA64_TPREL22 R_IA_64_TPREL22
-#define R_IA64_TPREL64I R_IA_64_TPREL64I
-#define R_IA64_TPREL64MSB R_IA_64_TPREL64MSB
-#define R_IA64_TPREL64LSB R_IA_64_TPREL64LSB
-#define R_IA64_LTOFF_TPREL22 R_IA_64_LTOFF_TPREL22
-#define R_IA64_DTPMOD64MSB R_IA_64_DTPMOD64MSB
-#define R_IA64_DTPMOD64LSB R_IA_64_DTPMOD64LSB
-#define R_IA64_LTOFF_DTPMOD22 R_IA_64_LTOFF_DTPMOD22
-#define R_IA64_DTPREL14 R_IA_64_DTPREL14
-#define R_IA64_DTPREL22 R_IA_64_DTPREL22
-#define R_IA64_DTPREL64I R_IA_64_DTPREL64I
-#define R_IA64_DTPREL32MSB R_IA_64_DTPREL32MSB
-#define R_IA64_DTPREL32LSB R_IA_64_DTPREL32LSB
-#define R_IA64_DTPREL64MSB R_IA_64_DTPREL64MSB
-#define R_IA64_DTPREL64LSB R_IA_64_DTPREL64LSB
-#define R_IA64_LTOFF_DTPREL22 R_IA_64_LTOFF_DTPREL22
-
-#define R_MIPS_NONE 0 /* No reloc */
-#define R_MIPS_16 1 /* Direct 16 bit */
-#define R_MIPS_32 2 /* Direct 32 bit */
-#define R_MIPS_REL32 3 /* PC relative 32 bit */
-#define R_MIPS_26 4 /* Direct 26 bit shifted */
-#define R_MIPS_HI16 5 /* High 16 bit */
-#define R_MIPS_LO16 6 /* Low 16 bit */
-#define R_MIPS_GPREL16 7 /* GP relative 16 bit */
-#define R_MIPS_LITERAL 8 /* 16 bit literal entry */
-#define R_MIPS_GOT16 9 /* 16 bit GOT entry */
-#define R_MIPS_PC16 10 /* PC relative 16 bit */
-#define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */
-#define R_MIPS_GPREL32 12 /* GP relative 32 bit */
-#define R_MIPS_64 18 /* Direct 64 bit */
-#define R_MIPS_GOTHI16 21 /* GOT HI 16 bit */
-#define R_MIPS_GOTLO16 22 /* GOT LO 16 bit */
-#define R_MIPS_CALLHI16 30 /* upper 16 bit GOT entry for function */
-#define R_MIPS_CALLLO16 31 /* lower 16 bit GOT entry for function */
-
-#define R_PPC_NONE 0 /* No relocation. */
-#define R_PPC_ADDR32 1
-#define R_PPC_ADDR24 2
-#define R_PPC_ADDR16 3
-#define R_PPC_ADDR16_LO 4
-#define R_PPC_ADDR16_HI 5
-#define R_PPC_ADDR16_HA 6
-#define R_PPC_ADDR14 7
-#define R_PPC_ADDR14_BRTAKEN 8
-#define R_PPC_ADDR14_BRNTAKEN 9
-#define R_PPC_REL24 10
-#define R_PPC_REL14 11
-#define R_PPC_REL14_BRTAKEN 12
-#define R_PPC_REL14_BRNTAKEN 13
-#define R_PPC_GOT16 14
-#define R_PPC_GOT16_LO 15
-#define R_PPC_GOT16_HI 16
-#define R_PPC_GOT16_HA 17
-#define R_PPC_PLTREL24 18
-#define R_PPC_COPY 19
-#define R_PPC_GLOB_DAT 20
-#define R_PPC_JMP_SLOT 21
-#define R_PPC_RELATIVE 22
-#define R_PPC_LOCAL24PC 23
-#define R_PPC_UADDR32 24
-#define R_PPC_UADDR16 25
-#define R_PPC_REL32 26
-#define R_PPC_PLT32 27
-#define R_PPC_PLTREL32 28
-#define R_PPC_PLT16_LO 29
-#define R_PPC_PLT16_HI 30
-#define R_PPC_PLT16_HA 31
-#define R_PPC_SDAREL16 32
-#define R_PPC_SECTOFF 33
-#define R_PPC_SECTOFF_LO 34
-#define R_PPC_SECTOFF_HI 35
-#define R_PPC_SECTOFF_HA 36
-
-/*
- * 64-bit relocations
- */
-#define R_PPC64_ADDR64 38
-#define R_PPC64_ADDR16_HIGHER 39
-#define R_PPC64_ADDR16_HIGHERA 40
-#define R_PPC64_ADDR16_HIGHEST 41
-#define R_PPC64_ADDR16_HIGHESTA 42
-#define R_PPC64_UADDR64 43
-#define R_PPC64_REL64 44
-#define R_PPC64_PLT64 45
-#define R_PPC64_PLTREL64 46
-#define R_PPC64_TOC16 47
-#define R_PPC64_TOC16_LO 48
-#define R_PPC64_TOC16_HI 49
-#define R_PPC64_TOC16_HA 50
-#define R_PPC64_TOC 51
-#define R_PPC64_DTPMOD64 68
-#define R_PPC64_TPREL64 73
-#define R_PPC64_DTPREL64 78
-
-/*
- * TLS relocations
- */
-#define R_PPC_TLS 67
-#define R_PPC_DTPMOD32 68
-#define R_PPC_TPREL16 69
-#define R_PPC_TPREL16_LO 70
-#define R_PPC_TPREL16_HI 71
-#define R_PPC_TPREL16_HA 72
-#define R_PPC_TPREL32 73
-#define R_PPC_DTPREL16 74
-#define R_PPC_DTPREL16_LO 75
-#define R_PPC_DTPREL16_HI 76
-#define R_PPC_DTPREL16_HA 77
-#define R_PPC_DTPREL32 78
-#define R_PPC_GOT_TLSGD16 79
-#define R_PPC_GOT_TLSGD16_LO 80
-#define R_PPC_GOT_TLSGD16_HI 81
-#define R_PPC_GOT_TLSGD16_HA 82
-#define R_PPC_GOT_TLSLD16 83
-#define R_PPC_GOT_TLSLD16_LO 84
-#define R_PPC_GOT_TLSLD16_HI 85
-#define R_PPC_GOT_TLSLD16_HA 86
-#define R_PPC_GOT_TPREL16 87
-#define R_PPC_GOT_TPREL16_LO 88
-#define R_PPC_GOT_TPREL16_HI 89
-#define R_PPC_GOT_TPREL16_HA 90
-
-/*
- * The remaining relocs are from the Embedded ELF ABI, and are not in the
- * SVR4 ELF ABI.
- */
-
-#define R_PPC_EMB_NADDR32 101
-#define R_PPC_EMB_NADDR16 102
-#define R_PPC_EMB_NADDR16_LO 103
-#define R_PPC_EMB_NADDR16_HI 104
-#define R_PPC_EMB_NADDR16_HA 105
-#define R_PPC_EMB_SDAI16 106
-#define R_PPC_EMB_SDA2I16 107
-#define R_PPC_EMB_SDA2REL 108
-#define R_PPC_EMB_SDA21 109
-#define R_PPC_EMB_MRKREF 110
-#define R_PPC_EMB_RELSEC16 111
-#define R_PPC_EMB_RELST_LO 112
-#define R_PPC_EMB_RELST_HI 113
-#define R_PPC_EMB_RELST_HA 114
-#define R_PPC_EMB_BIT_FLD 115
-#define R_PPC_EMB_RELSDA 116
-
-#define R_SH_NONE 0
-#define R_SH_DIR32 1
-#define R_SH_REL32 2
-#define R_SH_DIR8WPN 3
-#define R_SH_IND12W 4
-#define R_SH_DIR8WPL 5
-#define R_SH_DIR8WPZ 6
-#define R_SH_DIR8BP 7
-#define R_SH_DIR8W 8
-#define R_SH_DIR8L 9
-#define R_SH_GOT32 0xa0
-#define R_SH_PLT32 0xa1
-#define R_SH_COPY 0xa2
-#define R_SH_GLOB_DAT 0xa3
-#define R_SH_JMP_SLOT 0xa4
-#define R_SH_RELATIVE 0xa5
-#define R_SH_GOTOFF 0xa6
-#define R_SH_GOTPC 0xa7
-
-#define R_SPARC_NONE 0
-#define R_SPARC_8 1
-#define R_SPARC_16 2
-#define R_SPARC_32 3
-#define R_SPARC_DISP8 4
-#define R_SPARC_DISP16 5
-#define R_SPARC_DISP32 6
-#define R_SPARC_WDISP30 7
-#define R_SPARC_WDISP22 8
-#define R_SPARC_HI22 9
-#define R_SPARC_22 10
-#define R_SPARC_13 11
-#define R_SPARC_LO10 12
-#define R_SPARC_GOT10 13
-#define R_SPARC_GOT13 14
-#define R_SPARC_GOT22 15
-#define R_SPARC_PC10 16
-#define R_SPARC_PC22 17
-#define R_SPARC_WPLT30 18
-#define R_SPARC_COPY 19
-#define R_SPARC_GLOB_DAT 20
-#define R_SPARC_JMP_SLOT 21
-#define R_SPARC_RELATIVE 22
-#define R_SPARC_UA32 23
-#define R_SPARC_PLT32 24
-#define R_SPARC_HIPLT22 25
-#define R_SPARC_LOPLT10 26
-#define R_SPARC_PCPLT32 27
-#define R_SPARC_PCPLT22 28
-#define R_SPARC_PCPLT10 29
-#define R_SPARC_10 30
-#define R_SPARC_11 31
-#define R_SPARC_64 32
-#define R_SPARC_OLO10 33
-#define R_SPARC_HH22 34
-#define R_SPARC_HM10 35
-#define R_SPARC_LM22 36
-#define R_SPARC_PC_HH22 37
-#define R_SPARC_PC_HM10 38
-#define R_SPARC_PC_LM22 39
-#define R_SPARC_WDISP16 40
-#define R_SPARC_WDISP19 41
-#define R_SPARC_GLOB_JMP 42
-#define R_SPARC_7 43
-#define R_SPARC_5 44
-#define R_SPARC_6 45
-#define R_SPARC_DISP64 46
-#define R_SPARC_PLT64 47
-#define R_SPARC_HIX22 48
-#define R_SPARC_LOX10 49
-#define R_SPARC_H44 50
-#define R_SPARC_M44 51
-#define R_SPARC_L44 52
-#define R_SPARC_REGISTER 53
-#define R_SPARC_UA64 54
-#define R_SPARC_UA16 55
-#define R_SPARC_TLS_GD_HI22 56
-#define R_SPARC_TLS_GD_LO10 57
-#define R_SPARC_TLS_GD_ADD 58
-#define R_SPARC_TLS_GD_CALL 59
-#define R_SPARC_TLS_LDM_HI22 60
-#define R_SPARC_TLS_LDM_LO10 61
-#define R_SPARC_TLS_LDM_ADD 62
-#define R_SPARC_TLS_LDM_CALL 63
-#define R_SPARC_TLS_LDO_HIX22 64
-#define R_SPARC_TLS_LDO_LOX10 65
-#define R_SPARC_TLS_LDO_ADD 66
-#define R_SPARC_TLS_IE_HI22 67
-#define R_SPARC_TLS_IE_LO10 68
-#define R_SPARC_TLS_IE_LD 69
-#define R_SPARC_TLS_IE_LDX 70
-#define R_SPARC_TLS_IE_ADD 71
-#define R_SPARC_TLS_LE_HIX22 72
-#define R_SPARC_TLS_LE_LOX10 73
-#define R_SPARC_TLS_DTPMOD32 74
-#define R_SPARC_TLS_DTPMOD64 75
-#define R_SPARC_TLS_DTPOFF32 76
-#define R_SPARC_TLS_DTPOFF64 77
-#define R_SPARC_TLS_TPOFF32 78
-#define R_SPARC_TLS_TPOFF64 79
-
-#define R_X86_64_NONE 0 /* No relocation. */
-#define R_X86_64_64 1 /* Add 64 bit symbol value. */
-#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */
-#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */
-#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */
-#define R_X86_64_COPY 5 /* Copy data from shared object. */
-#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */
-#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */
-#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */
-#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */
-#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */
-#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */
-#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */
-#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */
-#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */
-#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */
-#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */
-#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */
-#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */
-#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */
-#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */
-#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */
-#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */
-#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */
-#define R_X86_64_IRELATIVE 37
-
-#define R_390_NONE 0
-#define R_390_8 1
-#define R_390_12 2
-#define R_390_16 3
-#define R_390_32 4
-#define R_390_PC32 5
-#define R_390_GOT12 6
-#define R_390_GOT32 7
-#define R_390_PLT32 8
-#define R_390_COPY 9
-#define R_390_GLOB_DAT 10
-#define R_390_JMP_SLOT 11
-#define R_390_RELATIVE 12
-#define R_390_GOTOFF 13
-#define R_390_GOTPC 14
-#define R_390_GOT16 15
-#define R_390_PC16 16
-#define R_390_PC16DBL 17
-#define R_390_PLT16DBL 18
-#define R_390_PC32DBL 19
-#define R_390_PLT32DBL 20
-#define R_390_GOTPCDBL 21
-#define R_390_64 22
-#define R_390_PC64 23
-#define R_390_GOT64 24
-#define R_390_PLT64 25
-#define R_390_GOTENT 26
+#define STN_UNDEF 0 /* Undefined symbol index. */
#endif /* !_SYS_ELF_COMMON_H_ */
diff --git a/winsup/cygwin/include/sys/elf_generic.h b/winsup/cygwin/include/sys/elf_generic.h
index 95a682f25..dbe9f1e83 100644
--- a/winsup/cygwin/include/sys/elf_generic.h
+++ b/winsup/cygwin/include/sys/elf_generic.h
@@ -23,11 +23,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: src/sys/sys/elf_generic.h,v 1.6 2002/07/20 02:56:11 peter Exp $
*/
#ifndef _SYS_ELF_GENERIC_H_
-#define _SYS_ELF_GENERIC_H_ 1
+#define _SYS_ELF_GENERIC_H_ 1
#include <sys/cdefs.h>
@@ -36,30 +36,43 @@
* needing to know the word size.
*/
+#ifndef __ELF_WORD_SIZE
+# define __ELF_WORD_SIZE 32
+#endif
+
#if __ELF_WORD_SIZE != 32 && __ELF_WORD_SIZE != 64
#error "__ELF_WORD_SIZE must be defined as 32 or 64"
#endif
-#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE)
+#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE)
#if BYTE_ORDER == LITTLE_ENDIAN
-#define ELF_DATA ELFDATA2LSB
+#define ELF_DATA ELFDATA2LSB
#elif BYTE_ORDER == BIG_ENDIAN
-#define ELF_DATA ELFDATA2MSB
+#define ELF_DATA ELFDATA2MSB
#else
#error "Unknown byte order"
#endif
-#define __elfN(x) __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x)
-#define __ElfN(x) __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x)
-#define __ELFN(x) __CONCAT(__CONCAT(__CONCAT(ELF,__ELF_WORD_SIZE),_),x)
-#define __ElfType(x) typedef __ElfN(x) __CONCAT(Elf_,x)
+#if __ELF_WORD_SIZE == 32
+#define __elfN(x) elf32_##x
+#define __ElfN(x) Elf32_##x
+#define __ELFN(x) ELF32_##x
+#else
+#define __elfN(x) elf364_##x
+#define __ElfN(x) Elf364_##x
+#define __ELFN(x) ELF364_##x
+#endif
+#define __ElfType(x) typedef __ElfN(x) Elf_##x
+#define FOO
__ElfType(Addr);
__ElfType(Half);
__ElfType(Off);
__ElfType(Sword);
__ElfType(Word);
+__ElfType(Size);
+__ElfType(Hashelt);
__ElfType(Ehdr);
__ElfType(Shdr);
__ElfType(Phdr);
@@ -67,22 +80,12 @@ __ElfType(Dyn);
__ElfType(Rel);
__ElfType(Rela);
__ElfType(Sym);
-__ElfType(Verdef);
-__ElfType(Verdaux);
-__ElfType(Verneed);
-__ElfType(Vernaux);
-__ElfType(Versym);
-
-/* Non-standard ELF types. */
-__ElfType(Hashelt);
-__ElfType(Size);
-__ElfType(Ssize);
-#define ELF_R_SYM __ELFN(R_SYM)
-#define ELF_R_TYPE __ELFN(R_TYPE)
-#define ELF_R_INFO __ELFN(R_INFO)
-#define ELF_ST_BIND __ELFN(ST_BIND)
-#define ELF_ST_TYPE __ELFN(ST_TYPE)
-#define ELF_ST_INFO __ELFN(ST_INFO)
+#define ELF_R_SYM __ELFN(R_SYM)
+#define ELF_R_TYPE __ELFN(R_TYPE)
+#define ELF_R_INFO __ELFN(R_INFO)
+#define ELF_ST_BIND __ELFN(ST_BIND)
+#define ELF_ST_TYPE __ELFN(ST_TYPE)
+#define ELF_ST_INFO __ELFN(ST_INFO)
#endif /* !_SYS_ELF_GENERIC_H_ */
diff --git a/winsup/cygwin/include/sys/wait.h b/winsup/cygwin/include/sys/wait.h
index be3e56fd2..5dea7283a 100644
--- a/winsup/cygwin/include/sys/wait.h
+++ b/winsup/cygwin/include/sys/wait.h
@@ -1,6 +1,6 @@
/* sys/wait.h
- Copyright 1997, 1998, 2001, 2002, 2003, 2004, 2006, 2011, 2012 Red Hat, Inc.
+ Copyright 1997, 1998, 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -44,10 +44,6 @@ pid_t waitpid (pid_t __pid, __wait_status_ptr_t __status, int __options);
pid_t wait3 (__wait_status_ptr_t __status, int __options, struct rusage *__rusage);
pid_t wait4 (pid_t __pid, __wait_status_ptr_t __status, int __options, struct rusage *__rusage);
-#ifdef _COMPILING_NEWLIB
-pid_t _wait (__wait_status_ptr_t __status);
-#endif
-
union wait
{
int w_status;
diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc
index e95a43121..fd25358aa 100644
--- a/winsup/cygwin/kernel32.cc
+++ b/winsup/cygwin/kernel32.cc
@@ -1,6 +1,6 @@
/* kernel32.cc: Win32 replacement functions.
- Copyright 2008, 2010, 2011, 2012 Red Hat, Inc.
+ Copyright 2008, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -11,6 +11,7 @@ details. */
#include "winsup.h"
#include "shared_info.h"
#include "ntdll.h"
+#include <wchar.h>
/* Implement CreateEvent/OpenEvent so that named objects are always created in
Cygwin shared object namespace. */
@@ -307,8 +308,8 @@ CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
| PAGE_WRITECOPY | PAGE_EXECUTE
| PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE
| PAGE_EXECUTE_WRITECOPY);
- ULONG attribs = flProtect & (SEC_COMMIT | SEC_IMAGE | SEC_NOCACHE
- | SEC_RESERVE);
+ ULONG attribs = flProtect & (SEC_BASED | SEC_NO_CHANGE | SEC_IMAGE | SEC_VLM
+ | SEC_RESERVE | SEC_COMMIT | SEC_NOCACHE);
LARGE_INTEGER size = {{ LowPart : dwMaximumSizeLow,
HighPart : dwMaximumSizeHigh }};
PLARGE_INTEGER psize = size.QuadPart ? &size : NULL;
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
index a0dfb8fe4..d44b7c453 100644
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc
@@ -49,6 +49,7 @@ extern "C"
{
char **environ;
int _fmode;
+void _pei386_runtime_relocator (void);
extern char __RUNTIME_PSEUDO_RELOC_LIST__;
extern char __RUNTIME_PSEUDO_RELOC_LIST_END__;
@@ -154,7 +155,7 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
u->image_base = &_image_base__;
/* This is actually a dummy call to force the linker to load this
symbol for older apps which need it. */
- _pei386_runtime_relocator (NULL);
+ _pei386_runtime_relocator ();
return 1;
}
} /* "C" */
diff --git a/winsup/cygwin/lib/crt0.h b/winsup/cygwin/lib/crt0.h
index 878db05ed..461ea9b2e 100644
--- a/winsup/cygwin/lib/crt0.h
+++ b/winsup/cygwin/lib/crt0.h
@@ -12,7 +12,7 @@ details. */
extern "C" {
#endif
-#include "winlean.h"
+#include <windows.h>
struct per_process;
typedef int (*MainFunc) (int argc, char *argv[], char **env);
int __stdcall _cygwin_crt0_common (MainFunc, struct per_process *);
diff --git a/winsup/cygwin/libc/inet_addr.c b/winsup/cygwin/libc/inet_addr.c
index 465e86ed3..24028ad95 100644
--- a/winsup/cygwin/libc/inet_addr.c
+++ b/winsup/cygwin/libc/inet_addr.c
@@ -72,7 +72,8 @@ static const char rcsid[] = "$Id$";
#ifndef __CYGWIN__
__FBSDID("$FreeBSD$");
#else
-#include "winsup.h"
+#define __INSIDE_CYGWIN__
+#define __INSIDE_CYGWIN_NET__
#endif
#ifndef __CYGWIN__
diff --git a/winsup/cygwin/libc/inet_network.c b/winsup/cygwin/libc/inet_network.c
index 01e1a7682..52286f453 100644
--- a/winsup/cygwin/libc/inet_network.c
+++ b/winsup/cygwin/libc/inet_network.c
@@ -34,7 +34,8 @@ static const char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
#ifndef __CYGWIN__
__FBSDID("$FreeBSD$");
#else
-#include "winsup.h"
+#define __INSIDE_CYGWIN__
+#define __INSIDE_CYGWIN_NET__
#endif
#ifndef __CYGWIN__
diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c
index 46e8297fd..f59369827 100644
--- a/winsup/cygwin/libc/minires-os-if.c
+++ b/winsup/cygwin/libc/minires-os-if.c
@@ -1,6 +1,6 @@
/* minires-os-if.c. Stub synchronous resolver for Cygwin.
- Copyright 2006, 2007, 2008, 2009, 2011, 2012 Red Hat, Inc.
+ Copyright 2006, 2007, 2008, 2009, 2011 Red Hat, Inc.
Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
@@ -10,14 +10,6 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#define __INSIDE_CYGWIN_NET__
-#define USE_SYS_TYPES_FD_SET
-#include <winsup.h>
-#include <ws2tcpip.h>
-#include <iphlpapi.h>
-#include <windns.h>
-#include "ntdll.h"
-#undef h_errno
#include "minires.h"
#ifdef __CYGWIN__
@@ -32,6 +24,13 @@ details. */
#undef NOERROR
#undef DELETE
+#include <windows.h>
+#include <iphlpapi.h>
+#include <windns.h>
+#include <ntdef.h>
+#include "ntdll.h"
+#include <wchar.h>
+
/***********************************************************************
* write_record: Translates a Windows DNS record into a compressed record
***********************************************************************/
diff --git a/winsup/cygwin/libc/minires.h b/winsup/cygwin/libc/minires.h
index 028b1e084..cda0b4c51 100644
--- a/winsup/cygwin/libc/minires.h
+++ b/winsup/cygwin/libc/minires.h
@@ -1,6 +1,6 @@
/* minires.h. Stub synchronous resolver for Cygwin.
- Copyright 2006, 2012 Red Hat, Inc.
+ Copyright 2006 Red Hat, Inc.
Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
@@ -10,10 +10,13 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#define __INSIDE_CYGWIN_NET__
+
#include "winsup.h"
#include <string.h>
#include <malloc.h>
#include <stdlib.h>
+#include <netdb.h>
#include <ctype.h>
#include <sys/time.h>
#include <sys/socket.h>
@@ -24,7 +27,6 @@ details. */
#include <stdio.h>
#include <stdarg.h>
#include <sys/unistd.h>
-#define __INSIDE_CYGWIN_NET__
#include <netdb.h>
#include <arpa/nameser.h>
#include <resolv.h>
diff --git a/winsup/cygwin/libc/rcmd.cc b/winsup/cygwin/libc/rcmd.cc
index 16c05b01b..8012790ec 100644
--- a/winsup/cygwin/libc/rcmd.cc
+++ b/winsup/cygwin/libc/rcmd.cc
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
#else
#define __INSIDE_CYGWIN_NET__
#include "winsup.h"
-#undef __INSIDE_CYGWIN_NET__
#endif
#ifndef __CYGWIN__
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index 10bf4f7e9..4a4cd3ee5 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -365,7 +365,7 @@ ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len, LPDWORD ret_len,
}
BOOL WINAPI
-WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len, LPDWORD ret_len,
+WritePipeOverlapped (HANDLE h, PCVOID buf, DWORD len, LPDWORD ret_len,
DWORD timeout)
{
OVERLAPPED ov;
diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/miscfuncs.h
index ff5fa1ef7..9ec6f5916 100644
--- a/winsup/cygwin/miscfuncs.h
+++ b/winsup/cygwin/miscfuncs.h
@@ -1,7 +1,7 @@
/* miscfuncs.h: main Cygwin header file.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -21,7 +21,7 @@ BOOL WINAPI CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle,
LPSECURITY_ATTRIBUTES sa);
BOOL WINAPI ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len,
LPDWORD ret_len, DWORD timeout);
-BOOL WINAPI WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len,
+BOOL WINAPI WritePipeOverlapped (HANDLE h, PCVOID buf, DWORD len,
LPDWORD ret_len, DWORD timeout);
extern "C" void yield ();
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index d8d78a51a..2a22a4323 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -526,8 +526,7 @@ mmap_record::alloc_fh ()
fdev.name = fdev.native = "";
fdev.parse (get_device ());
fhandler_base *fh = build_fh_dev (fdev);
- if (fh)
- fh->set_access (get_openflags ());
+ fh->set_access (get_openflags ());
return fh;
}
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index 125f248e4..ddbccae21 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -402,7 +402,6 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
if (!got_fs ()
&& !is_ntfs (RtlEqualUnicodeString (&fsname, &ro_u_ntfs, FALSE))
&& !is_fat (RtlEqualUnicodePathPrefix (&fsname, &ro_u_fat, TRUE))
- && !is_refs (RtlEqualUnicodeString (&fsname, &ro_u_refs, FALSE))
&& !is_csc_cache (RtlEqualUnicodeString (&fsname, &ro_u_csc, FALSE))
&& is_cdrom (ffdi.DeviceType == FILE_DEVICE_CD_ROM))
is_udf (RtlEqualUnicodeString (&fsname, &ro_u_udf, FALSE));
@@ -648,6 +647,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
if (!src_path[n])
{
+ unit = 0;
dst[0] = '\0';
if (mount_table->cygdrive_len > 1)
dev = *cygdrive_dev;
@@ -1899,34 +1899,6 @@ getmntent (FILE *)
return mount_table->getmntent (_my_tls.locals.iteration++);
}
-extern "C" struct mntent *
-getmntent_r (FILE *, struct mntent *mntbuf, char *buf, int buflen)
-{
- struct mntent *mnt = mount_table->getmntent (_my_tls.locals.iteration++);
- int fsname_len, dir_len, type_len, tmplen = buflen;
-
- if (!mnt)
- return NULL;
-
- fsname_len = strlen (mnt->mnt_fsname) + 1;
- dir_len = strlen (mnt->mnt_dir) + 1;
- type_len = strlen (mnt->mnt_type) + 1;
-
- snprintf (buf, buflen, "%s%c%s%c%s%c%s", mnt->mnt_fsname, '\0',
- mnt->mnt_dir, '\0', mnt->mnt_type, '\0', mnt->mnt_opts);
-
- mntbuf->mnt_fsname = buf;
- tmplen -= fsname_len;
- mntbuf->mnt_dir = tmplen > 0 ? buf + fsname_len : (char *)"";
- tmplen -= dir_len;
- mntbuf->mnt_type = tmplen > 0 ? buf + fsname_len + dir_len : (char *)"";
- tmplen -= type_len;
- mntbuf->mnt_opts = tmplen > 0 ? buf + fsname_len + dir_len + type_len : (char *)"";
- mntbuf->mnt_freq = mnt->mnt_freq;
- mntbuf->mnt_passno = mnt->mnt_passno;
- return mntbuf;
-}
-
extern "C" int
endmntent (FILE *)
{
diff --git a/winsup/cygwin/mount.h b/winsup/cygwin/mount.h
index 1d3b7451b..187972464 100644
--- a/winsup/cygwin/mount.h
+++ b/winsup/cygwin/mount.h
@@ -29,7 +29,6 @@ enum fs_info_type
none = 0,
fat,
ntfs,
- refs,
samba,
nfs,
netapp,
@@ -99,7 +98,6 @@ class fs_info
IMPLEMENT_STATUS_FLAG (bool, has_dos_filenames_only)
IMPLEMENT_FS_FLAG (fat)
IMPLEMENT_FS_FLAG (ntfs)
- IMPLEMENT_FS_FLAG (refs)
IMPLEMENT_FS_FLAG (samba)
IMPLEMENT_FS_FLAG (nfs)
IMPLEMENT_FS_FLAG (netapp)
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 8b91e940a..830a80051 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -12,27 +12,27 @@ details. */
/* #define DEBUG_NEST_ON 1 */
#define __INSIDE_CYGWIN_NET__
-#define USE_SYS_TYPES_FD_SET
-#define __WSA_ERR_MACROS_DEFINED
-/* FIXME: Collision with different declarations of if_nametoindex and
- if_indextoname functions in iphlpapi.h since Vista.
- TODO: Convert if_nametoindex to cygwin_if_nametoindex and call
- system functions on Vista and later. */
-#define _INC_NETIOAPI
+
#include "winsup.h"
-#include <ws2tcpip.h>
-#include <mswsock.h>
-#include <iphlpapi.h>
+
+/* unfortunately defined in windows header file but used in
+ cygwin header files too */
+#undef NOERROR
+#undef DELETE
+
#include "miscfuncs.h"
#include <ctype.h>
#include <wchar.h>
+
#include <stdlib.h>
#define gethostname cygwin_gethostname
#include <unistd.h>
#undef gethostname
#include <netdb.h>
-#include <cygwin/in.h>
#include <asm/byteorder.h>
+#define USE_SYS_TYPES_FD_SET
+#include <winsock2.h>
+#include <iphlpapi.h>
#include <assert.h>
#include "cygerrno.h"
#include "security.h"
@@ -46,13 +46,10 @@ details. */
#include "sigproc.h"
#include "registry.h"
#include "cygtls.h"
+#include "cygwin/in6.h"
#include "ifaddrs.h"
#include "tls_pbuf.h"
#include "ntdll.h"
-
-/* Unfortunately defined in Windows header files and arpa/nameser_compat.h. */
-#undef NOERROR
-#undef DELETE
#define _CYGWIN_IN_H
#include <resolv.h>
@@ -715,11 +712,7 @@ cygwin_recvfrom (int fd, void *buf, size_t len, int flags,
myfault efault;
if (efault.faulted (EFAULT) || !fh)
res = -1;
- else
- /* Originally we shortcircuited here if res == 0.
- Allow 0 bytes buffer. This is valid in POSIX and handled in
- fhandler_socket::recv_internal. If we shortcircuit, we fail
- to deliver valid error conditions and peer address. */
+ else if ((res = len) != 0)
res = fh->recvfrom (buf, len, flags, from, fromlen);
syscall_printf ("%R = recvfrom(%d, %p, %d, %x, %p, %p)",
@@ -1472,11 +1465,7 @@ cygwin_recv (int fd, void *buf, size_t len, int flags)
myfault efault;
if (efault.faulted (EFAULT) || !fh)
res = -1;
- else
- /* Originally we shortcircuited here if res == 0.
- Allow 0 bytes buffer. This is valid in POSIX and handled in
- fhandler_socket::recv_internal. If we shortcircuit, we fail
- to deliver valid error conditions. */
+ else if ((res = len) != 0)
res = fh->recvfrom (buf, len, flags, NULL, NULL);
syscall_printf ("%R = recv(%d, %p, %d, %x)", res, fd, buf, len, flags);
@@ -1525,8 +1514,6 @@ getdomainname (char *domain, size_t len)
/* Fill out an ifconf struct. */
-#ifndef __MINGW64_VERSION_MAJOR
-
/* Vista/Longhorn: unicast address has additional OnLinkPrefixLength member. */
typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
_ANONYMOUS_UNION union {
@@ -1584,9 +1571,29 @@ typedef struct _IP_ADAPTER_ADDRESSES_LH {
ULONG Ipv6Metric;
} IP_ADAPTER_ADDRESSES_LH,*PIP_ADAPTER_ADDRESSES_LH;
+/* We can't include ws2tcpip.h. */
+
#define SIO_GET_INTERFACE_LIST _IOR('t', 127, u_long)
-#endif /* !__MINGW64_VERSION_MAJOR */
+struct sockaddr_in6_old {
+ short sin6_family;
+ u_short sin6_port;
+ u_long sin6_flowinfo;
+ struct in6_addr sin6_addr;
+};
+
+typedef union sockaddr_gen{
+ struct sockaddr Address;
+ struct sockaddr_in AddressIn;
+ struct sockaddr_in6_old AddressIn6;
+} sockaddr_gen;
+
+typedef struct _INTERFACE_INFO {
+ u_long iiFlags;
+ sockaddr_gen iiAddress;
+ sockaddr_gen iiBroadcastAddress;
+ sockaddr_gen iiNetmask;
+} INTERFACE_INFO, *LPINTERFACE_INFO;
#ifndef IN_LOOPBACK
#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
@@ -1688,17 +1695,13 @@ get_adapters_addresses (PIP_ADAPTER_ADDRESSES *pa_ret, ULONG family)
DWORD ret;
gaa_wa param = { family, pa_ret ?: NULL };
- if ((uintptr_t) &param >= (uintptr_t) 0x80000000L
- && wincap.has_gaa_largeaddress_bug ())
+ if ((uintptr_t) &param >= (uintptr_t) 0x80000000L)
{
- /* In Windows Vista and Windows 7 under WOW64, GetAdaptersAddresses fails
+ /* Starting with Windows Vista, GetAdaptersAddresses fails with error 998,
if it's running in a thread with a stack located in the large address
area. So, if we're running in a pthread with such a stack, we call
- GetAdaptersAddresses in a child thread with an OS-allocated stack.
- The OS allocates stacks bottom up, so chances are good that the new
- stack will be located in the lower address area.
- FIXME: The problem is fixed in W8CP, but needs testing before W8 goes
- gold. */
+ GetAdaptersAddresses in a child thread with an OS-allocated stack,
+ which is guaranteed to be located in the lower address area. */
HANDLE thr = CreateThread (NULL, 0, call_gaa, &param, 0, NULL);
if (!thr)
{
@@ -2858,11 +2861,7 @@ cygwin_recvmsg (int fd, struct msghdr *msg, int flags)
else
{
res = check_iovec_for_read (msg->msg_iov, msg->msg_iovlen);
- /* Originally we shortcircuited here if res == 0.
- Allow 0 bytes buffer. This is valid in POSIX and handled in
- fhandler_socket::recv_internal. If we shortcircuit, we fail
- to deliver valid error conditions and peer address. */
- if (res >= 0)
+ if (res > 0)
res = fh->recvmsg (msg, flags);
}
@@ -3154,8 +3153,6 @@ inet_ntop6 (const u_char *src, char *dst, size_t size)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
cur.base = -1;
- best.len = 0;
- cur.len = 0;
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
{
if (words[i] == 0)
@@ -4215,24 +4212,24 @@ w32_to_gai_err (int w32_err)
are implemented in ws2_32.dll. For older systems we use the ipv4-only
version above. */
-static void (WINAPI *ws_freeaddrinfo)(const struct addrinfo *);
-static int (WINAPI *ws_getaddrinfo)(const char *, const char *,
- const struct addrinfo *,
- struct addrinfo **);
-static int (WINAPI *ws_getnameinfo)(const struct sockaddr *, socklen_t,
- char *, size_t, char *, size_t, int);
+static void (WINAPI *freeaddrinfo)(const struct addrinfo *);
+static int (WINAPI *getaddrinfo)(const char *, const char *,
+ const struct addrinfo *,
+ struct addrinfo **);
+static int (WINAPI *getnameinfo)(const struct sockaddr *, socklen_t,
+ char *, size_t, char *, size_t, int);
static bool
get_ipv6_funcs (HMODULE lib)
{
- return ((ws_freeaddrinfo = (void (WINAPI *)(const struct addrinfo *))
+ return ((freeaddrinfo = (void (WINAPI *)(const struct addrinfo *))
GetProcAddress (lib, "freeaddrinfo"))
- && (ws_getaddrinfo = (int (WINAPI *)(const char *, const char *,
- const struct addrinfo *,
- struct addrinfo **))
+ && (getaddrinfo = (int (WINAPI *)(const char *, const char *,
+ const struct addrinfo *,
+ struct addrinfo **))
GetProcAddress (lib, "getaddrinfo"))
- && (ws_getnameinfo = (int (WINAPI *)(const struct sockaddr *,
- socklen_t, char *, size_t,
- char *, size_t, int))
+ && (getnameinfo = (int (WINAPI *)(const struct sockaddr *,
+ socklen_t, char *, size_t,
+ char *, size_t, int))
GetProcAddress (lib, "getnameinfo")));
}
@@ -4267,9 +4264,9 @@ load_ipv6_funcs ()
goto out;
FreeLibrary (lib);
}
- ws_freeaddrinfo = NULL;
- ws_getaddrinfo = NULL;
- ws_getnameinfo = NULL;
+ freeaddrinfo = NULL;
+ getaddrinfo = NULL;
+ getnameinfo = NULL;
out:
ipv6_inited = true;
@@ -4309,7 +4306,7 @@ cygwin_getaddrinfo (const char *hostname, const char *servname,
return EAI_NONAME;
}
load_ipv6 ();
- if (!ws_getaddrinfo)
+ if (!getaddrinfo)
return ipv4_getaddrinfo (hostname, servname, hints, res);
struct addrinfo nhints, *dupres;
@@ -4326,12 +4323,12 @@ cygwin_getaddrinfo (const char *hostname, const char *servname,
hints = &nhints;
nhints.ai_flags |= AI_ALL;
}
- int ret = w32_to_gai_err (ws_getaddrinfo (hostname, servname, hints, res));
+ int ret = w32_to_gai_err (getaddrinfo (hostname, servname, hints, res));
/* Always copy over to self-allocated memory. */
if (!ret)
{
dupres = ga_duplist (*res, false);
- ws_freeaddrinfo (*res);
+ freeaddrinfo (*res);
*res = dupres;
if (!dupres)
return EAI_MEMORY;
@@ -4351,12 +4348,12 @@ cygwin_getaddrinfo (const char *hostname, const char *servname,
struct addrinfo *v4res;
nhints = *hints;
nhints.ai_family = AF_INET;
- int ret2 = w32_to_gai_err (ws_getaddrinfo (hostname, servname,
- &nhints, &v4res));
+ int ret2 = w32_to_gai_err (getaddrinfo (hostname, servname,
+ &nhints, &v4res));
if (!ret2)
{
dupres = ga_duplist (v4res, true);
- ws_freeaddrinfo (v4res);
+ freeaddrinfo (v4res);
if (!dupres)
{
if (!ret)
@@ -4389,7 +4386,7 @@ cygwin_getnameinfo (const struct sockaddr *sa, socklen_t salen,
if (efault.faulted (EFAULT))
return EAI_SYSTEM;
load_ipv6 ();
- if (!ws_getnameinfo)
+ if (!getnameinfo)
return ipv4_getnameinfo (sa, salen, host, hostlen, serv, servlen, flags);
/* When the incoming port number does not resolve to a well-known service,
@@ -4414,8 +4411,8 @@ cygwin_getnameinfo (const struct sockaddr *sa, socklen_t salen,
if (!port || !getservbyport (port, flags & NI_DGRAM ? "udp" : "tcp"))
flags |= NI_NUMERICSERV;
}
- int ret = w32_to_gai_err (ws_getnameinfo (sa, salen, host, hostlen, serv,
- servlen, flags));
+ int ret = w32_to_gai_err (getnameinfo (sa, salen, host, hostlen, serv,
+ servlen, flags));
if (ret)
set_winsock_errno ();
return ret;
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 2ca6a5ab3..7eee720aa 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -9,20 +9,70 @@
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#pragma once
-
-#ifndef __MINGW64_VERSION_MAJOR
-# include <ddk/ntstatus.h>
-#else
-# include <ntstatus.h>
+#ifndef _NTDLL_H
+#define _NTDLL_H 1
+
+/* NTSTATUS values. */
+#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106)
+#define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS) 0x40000000)
+#define STATUS_BUFFER_OVERFLOW ((NTSTATUS) 0x80000005)
+#define STATUS_NO_MORE_FILES ((NTSTATUS) 0x80000006)
+#ifdef STATUS_INVALID_INFO_CLASS /* Defined as unsigned value in subauth.h */
+#undef STATUS_INVALID_INFO_CLASS
+#endif
+#define STATUS_INVALID_INFO_CLASS ((NTSTATUS) 0xc0000003)
+#define STATUS_NOT_IMPLEMENTED ((NTSTATUS) 0xc0000002)
+#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS) 0xc0000004)
+#ifdef STATUS_INVALID_HANDLE /* Defined as unsigned value in winbase.h */
+#undef STATUS_INVALID_HANDLE
#endif
+#define STATUS_INVALID_HANDLE ((NTSTATUS) 0xc0000008)
+#define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xc000000d)
+#define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xc000000f)
+#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xc0000010)
+#define STATUS_END_OF_FILE ((NTSTATUS) 0xc0000011)
+#define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS) 0xc0000013)
+#define STATUS_ACCESS_DENIED ((NTSTATUS) 0xc0000022)
+#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS) 0xc0000023)
+#define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS) 0xc0000024)
+#define STATUS_OBJECT_NAME_INVALID ((NTSTATUS) 0xc0000033)
+#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS) 0xc0000034)
+#define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS) 0xc0000035)
+#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS) 0xc000003A)
+#define STATUS_SHARING_VIOLATION ((NTSTATUS) 0xc0000043)
+#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS) 0xc000004f)
+#define STATUS_EA_TOO_LARGE ((NTSTATUS) 0xc0000050)
+#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS) 0xc0000051)
+#define STATUS_NO_EAS_ON_FILE ((NTSTATUS) 0xc0000052)
+#define STATUS_LOCK_NOT_GRANTED ((NTSTATUS) 0xc0000055)
+#define STATUS_DELETE_PENDING ((NTSTATUS) 0xc0000056)
+#define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS) 0xc000007a)
+#define STATUS_DISK_FULL ((NTSTATUS) 0xc000007f)
+#define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xc00000a1)
+#define STATUS_INSTANCE_NOT_AVAILABLE ((NTSTATUS) 0xc00000ab)
+#define STATUS_PIPE_NOT_AVAILABLE ((NTSTATUS) 0xc00000ac)
+#define STATUS_INVALID_PIPE_STATE ((NTSTATUS) 0xc00000ad)
+#define STATUS_PIPE_BUSY ((NTSTATUS) 0xc00000ae)
+#define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xc00000bb)
+#define STATUS_BAD_NETWORK_PATH ((NTSTATUS) 0xc00000be)
+#define STATUS_INVALID_NETWORK_RESPONSE ((NTSTATUS) 0xc00000c3)
+#define STATUS_BAD_NETWORK_NAME ((NTSTATUS) 0xc00000cc)
+#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xc0000101)
+#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS) 0xc000010a)
+#define STATUS_CANNOT_DELETE ((NTSTATUS) 0xc0000121)
+#define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148)
+#define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xc0000135)
+#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xc0000139)
+#define STATUS_NOT_FOUND ((NTSTATUS) 0xc0000225)
+#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xc0000251)
+#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS) 0xc0000269)
/* custom status code: */
#define STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION ((NTSTATUS) 0xe0000269)
#define NtCurrentProcess() ((HANDLE) 0xffffffff)
#define NtCurrentThread() ((HANDLE) 0xfffffffe)
-/* Creation information returned in IO_STATUS_BLOCK. */
+/* CreateDisposition in NtCreateFile call. */
#define FILE_SUPERSEDED 0
#define FILE_OPENED 1
#define FILE_CREATED 2
@@ -490,8 +540,7 @@ typedef enum _PROCESSINFOCLASS
ProcessVmCounters = 3,
ProcessTimes = 4,
ProcessSessionInformation = 24,
- ProcessWow64Information = 26,
- ProcessImageFileName = 27
+ ProcessWow64Information = 26
} PROCESSINFOCLASS;
typedef struct _DEBUG_BUFFER
@@ -973,13 +1022,11 @@ typedef struct _FILE_MAILSLOT_SET_INFORMATION
typedef VOID NTAPI (*PIO_APC_ROUTINE)(PVOID, PIO_STATUS_BLOCK, ULONG);
-#ifndef __MINGW64_VERSION_MAJOR
typedef enum _EVENT_TYPE
{
NotificationEvent = 0,
SynchronizationEvent
} EVENT_TYPE, *PEVENT_TYPE;
-#endif
typedef struct _EVENT_BASIC_INFORMATION
{
@@ -1046,21 +1093,11 @@ typedef struct _KEY_VALUE_PARTIAL_INFORMATION
UCHAR Data[1];
} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
-#ifndef __MINGW64_VERSION_MAJOR
typedef enum _TIMER_TYPE
{
NotificationTimer,
SynchronisationTimer
} TIMER_TYPE, *PTIMER_TYPE;
-#endif
-
-#ifdef __MINGW64_VERSION_MAJOR
-typedef enum _SECTION_INHERIT
-{
- ViewShare = 1,
- ViewUnmap = 2
-} SECTION_INHERIT;
-#endif
typedef VOID (APIENTRY *PTIMER_APC_ROUTINE)(PVOID, ULONG, ULONG);
@@ -1215,11 +1252,7 @@ extern "C"
PSECURITY_DESCRIPTOR, PULONG);
VOID NTAPI RtlAcquirePebLock ();
NTSTATUS NTAPI RtlAddAccessAllowedAce (PACL, ULONG, ACCESS_MASK, PSID);
- NTSTATUS NTAPI RtlAddAccessAllowedAceEx (PACL, ULONG, ULONG, ACCESS_MASK,
- PSID);
NTSTATUS NTAPI RtlAddAccessDeniedAce (PACL, ULONG, ACCESS_MASK, PSID);
- NTSTATUS NTAPI RtlAddAccessDeniedAceEx (PACL, ULONG, ULONG, ACCESS_MASK,
- PSID);
NTSTATUS NTAPI RtlAddAce (PACL, ULONG, ULONG, PVOID, ULONG);
PVOID NTAPI RtlAllocateHeap (PVOID, ULONG, SIZE_T);
NTSTATUS NTAPI RtlAppendUnicodeToString (PUNICODE_STRING, PCWSTR);
@@ -1270,7 +1303,6 @@ extern "C"
PBOOLEAN);
PSID_IDENTIFIER_AUTHORITY NTAPI RtlIdentifierAuthoritySid (PSID);
VOID NTAPI RtlInitEmptyUnicodeString (PUNICODE_STRING, PCWSTR, USHORT);
- VOID NTAPI RtlInitAnsiString (PANSI_STRING, PCSTR);
NTSTATUS NTAPI RtlInitializeSid (PSID, PSID_IDENTIFIER_AUTHORITY, UCHAR);
VOID NTAPI RtlInitUnicodeString (PUNICODE_STRING, PCWSTR);
NTSTATUS NTAPI RtlIntegerToUnicodeString (ULONG, ULONG, PUNICODE_STRING);
@@ -1302,7 +1334,6 @@ extern "C"
BOOLEAN);
PUCHAR NTAPI RtlSubAuthorityCountSid (PSID);
PULONG NTAPI RtlSubAuthoritySid (PSID, ULONG);
- ULONG NTAPI RtlUnicodeStringToAnsiSize (PUNICODE_STRING);
NTSTATUS NTAPI RtlUnicodeStringToAnsiString (PANSI_STRING, PUNICODE_STRING,
BOOLEAN);
NTSTATUS NTAPI RtlUnicodeStringToOemString (PANSI_STRING, PUNICODE_STRING,
@@ -1424,3 +1455,4 @@ extern "C"
}
}
#endif
+#endif /*_NTDLL_H*/
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
index c6abb0205..962bf776e 100644
--- a/winsup/cygwin/passwd.cc
+++ b/winsup/cygwin/passwd.cc
@@ -58,7 +58,7 @@ pwdgrp::read_passwd ()
bool searchentry = true;
struct passwd *pw;
/* must be static */
- static char NO_COPY pretty_ls[] = "????????:*:-1:-1:::";
+ static char NO_COPY pretty_ls[] = "????????:*:-1:-1:";
add_line (pretty_ls);
cygsid tu = cygheap->user.sid ();
@@ -269,55 +269,29 @@ setpassent ()
return 0;
}
-static void
-_getpass_close_fd (void *arg)
-{
- if (arg)
- fclose ((FILE *) arg);
-}
-
extern "C" char *
getpass (const char * prompt)
{
char *pass = _my_tls.locals.pass;
struct termios ti, newti;
- bool tc_set = false;
-
- /* Try to use controlling tty in the first place. Use stdin and stderr
- only as fallback. */
- FILE *in = stdin, *err = stderr;
- FILE *tty = fopen ("/dev/tty", "w+b");
- pthread_cleanup_push (_getpass_close_fd, tty);
- if (tty)
- {
- /* Set close-on-exec for obvious reasons. */
- fcntl (fileno (tty), F_SETFD, fcntl (fileno (tty), F_GETFD) | FD_CLOEXEC);
- in = err = tty;
- }
- /* Make sure to notice if stdin is closed. */
- if (fileno (in) >= 0)
+ cygheap_fdget fhstdin (0);
+
+ if (fhstdin < 0)
+ pass[0] = '\0';
+ else
{
- flockfile (in);
- /* Change tty attributes if possible. */
- if (!tcgetattr (fileno (in), &ti))
- {
- newti = ti;
- newti.c_lflag &= ~(ECHO | ISIG); /* No echo, no signal handling. */
- if (!tcsetattr (fileno (in), TCSANOW, &newti))
- tc_set = true;
- }
- fputs (prompt, err);
- fflush (err);
- fgets (pass, _PASSWORD_LEN, in);
- fprintf (err, "\n");
- if (tc_set)
- tcsetattr (fileno (in), TCSANOW, &ti);
- funlockfile (in);
- char *crlf = strpbrk (pass, "\r\n");
- if (crlf)
- *crlf = '\0';
+ fhstdin->tcgetattr (&ti);
+ newti = ti;
+ newti.c_lflag &= ~ECHO;
+ fhstdin->tcsetattr (TCSANOW, &newti);
+ fputs (prompt, stderr);
+ fgets (pass, _PASSWORD_LEN, stdin);
+ fprintf (stderr, "\n");
+ for (int i=0; pass[i]; i++)
+ if (pass[i] == '\r' || pass[i] == '\n')
+ pass[i] = '\0';
+ fhstdin->tcsetattr (TCSANOW, &ti);
}
- pthread_cleanup_pop (1);
return pass;
}
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index d1a881c39..87389141a 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -112,8 +112,7 @@ muto NO_COPY cwdstuff::cwd_lock;
static const GUID GUID_shortcut
= { 0x00021401L, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}};
-enum
-{
+enum {
WSH_FLAG_IDLIST = 0x01, /* Contains an ITEMIDLIST. */
WSH_FLAG_FILE = 0x02, /* Contains a file locator element. */
WSH_FLAG_DESC = 0x04, /* Contains a description. */
@@ -124,24 +123,24 @@ enum
};
struct win_shortcut_hdr
-{
- DWORD size; /* Header size in bytes. Must contain 0x4c. */
- GUID magic; /* GUID of shortcut files. */
- DWORD flags; /* Content flags. See above. */
-
- /* The next fields from attr to icon_no are always set to 0 in Cygwin
- and U/Win shortcuts. */
- DWORD attr; /* Target file attributes. */
- FILETIME ctime; /* These filetime items are never touched by the */
- FILETIME mtime; /* system, apparently. Values don't matter. */
- FILETIME atime;
- DWORD filesize; /* Target filesize. */
- DWORD icon_no; /* Icon number. */
-
- DWORD run; /* Values defined in winuser.h. Use SW_NORMAL. */
- DWORD hotkey; /* Hotkey value. Set to 0. */
- DWORD dummy[2]; /* Future extension probably. Always 0. */
-};
+ {
+ DWORD size; /* Header size in bytes. Must contain 0x4c. */
+ GUID magic; /* GUID of shortcut files. */
+ DWORD flags; /* Content flags. See above. */
+
+ /* The next fields from attr to icon_no are always set to 0 in Cygwin
+ and U/Win shortcuts. */
+ DWORD attr; /* Target file attributes. */
+ FILETIME ctime; /* These filetime items are never touched by the */
+ FILETIME mtime; /* system, apparently. Values don't matter. */
+ FILETIME atime;
+ DWORD filesize; /* Target filesize. */
+ DWORD icon_no; /* Icon number. */
+
+ DWORD run; /* Values defined in winuser.h. Use SW_NORMAL. */
+ DWORD hotkey; /* Hotkey value. Set to 0. */
+ DWORD dummy[2]; /* Future extension probably. Always 0. */
+ };
/* Return non-zero if PATH1 is a prefix of PATH2.
Both are assumed to be of the same path style and / vs \ usage.
@@ -745,19 +744,13 @@ path_conv::check (const char *src, unsigned opt,
{
/* FIXME: Calling build_fhandler here is not the right way to handle this. */
fhandler_virtual *fh = (fhandler_virtual *) build_fh_dev (dev, path_copy);
- virtual_ftype_t file_type;
- if (!fh)
- file_type = virt_none;
- else
+ virtual_ftype_t file_type = fh->exists ();
+ if (file_type == virt_symlink)
{
- file_type = fh->exists ();
- if (file_type == virt_symlink)
- {
- fh->fill_filebuf ();
- symlen = sym.set (fh->get_filebuf ());
- }
- delete fh;
+ fh->fill_filebuf ();
+ symlen = sym.set (fh->get_filebuf ());
}
+ delete fh;
switch (file_type)
{
case virt_directory:
@@ -889,22 +882,6 @@ is_virtual_symlink:
: sym.fileattr;
path_flags = sym.pflags;
}
- else if (isdev_dev (dev))
- {
- /* If we're looking for a file below /dev, which doesn't exist,
- make sure that the device type is converted to FH_FS, so that
- subsequent code handles the file correctly.
- Unless /dev itself doesn't exist on disk. In that case /dev
- is handled as virtual filesystem, and virtual filesystems are
- read-only. The PC_KEEP_HANDLE check allows to check for
- a call from an informational system call. In that case we
- just stick to ENOENT, and the device type doesn't matter
- anyway. */
- if (sym.error == ENOENT && !(opt & PC_KEEP_HANDLE))
- sym.error = EROFS;
- else
- dev = FH_FS;
- }
/* If symlink.check found an existing non-symlink file, then
it sets the appropriate flag. It also sets any suffix found
@@ -1153,7 +1130,7 @@ out:
if (opt & PC_CTTY)
path_flags |= PATH_CTTY;
- if (opt & PC_POSIX)
+ if ((opt & PC_POSIX))
{
if (tail < path_end && tail > path_copy + 1)
*tail = '/';
@@ -1352,8 +1329,8 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
if ((tail - dst) >= NT_MAX_PATH)
return ENAMETOOLONG;
}
- if (tail > dst + 1 && tail[-1] == '.' && tail[-2] == '\\')
- tail--;
+ if (tail > dst + 1 && tail[-1] == '.' && tail[-2] == '\\')
+ tail--;
*tail = '\0';
debug_printf ("%s = normalize_win32_path (%s)", dst, src_start);
return 0;
@@ -2372,6 +2349,8 @@ restart:
bool had_ext = !!*ext_here;
while (suffix.next ())
{
+ bool no_ea = false;
+
error = 0;
get_nt_native_path (suffix.path, upath, pflags & PATH_DOS);
if (h)
@@ -2402,6 +2381,7 @@ restart:
root dir which has EAs enabled? */
|| status == STATUS_INVALID_PARAMETER))
{
+ no_ea = true;
/* If EAs are not supported, there's no sense to check them again
with suffixes attached. So we set eabuf/easize to 0 here once. */
if (status == STATUS_EAS_NOT_SUPPORTED
@@ -3204,14 +3184,11 @@ realpath (const char *path, char *resolved)
if (efault.faulted (EFAULT))
return NULL;
- /* Win32 drive letter paths have to be converted to a POSIX path first,
- because path_conv leaves the incoming path untouched except for
- converting backslashes to forward slashes. */
char *tpath;
if (isdrive (path))
{
tpath = tp.c_get ();
- mount_table->conv_to_posix_path (path, tpath, 0);
+ mount_table->cygdrive_posix_path (path, tpath, 0);
}
else
tpath = (char *) path;
@@ -3700,64 +3677,31 @@ find_fast_cwd_pointer ()
/* ...which should be followed by "mov edi, crit-sect-addr" then
"push edi", or by just a single "push crit-sect-addr". */
const uint8_t *movedi = pushedi + 1;
- const uint8_t *mov_pfast_cwd;
- if (movedi[0] == 0x8b && movedi[1] == 0xff) /* mov edi,edi -> W8 */
- {
- /* Windows 8 CP 32 bit (after a Windows Update?) does not call
- RtlEnterCriticalSection. For some reason the function manipulates
- the FastPebLock manually, kind of like RtlEnterCriticalSection has
- been converted to an inline function.
-
- Next we search for a `mov eax, some address'. This address points
- to the LockCount member of the FastPebLock structure, so the address
- is equal to FastPebLock + 4. */
- const uint8_t *moveax = (const uint8_t *) memchr (movedi, 0xb8, 16);
- if (!moveax)
- return NULL;
- offset = (ptrdiff_t) peek32 (moveax + 1) - 4;
- /* Compare the address with the known PEB lock as stored in the PEB. */
- if ((PRTL_CRITICAL_SECTION) offset != NtCurrentTeb ()->Peb->FastPebLock)
- return NULL;
- /* Now search for the mov instruction fetching the address of the global
- PFAST_CWD *. */
- mov_pfast_cwd = moveax;
- do
- {
- mov_pfast_cwd = (const uint8_t *) memchr (++mov_pfast_cwd, 0x8b, 48);
- }
- while (mov_pfast_cwd && mov_pfast_cwd[1] != 0x1d
- && (mov_pfast_cwd - moveax) < 48);
- if (!mov_pfast_cwd || mov_pfast_cwd[1] != 0x1d)
- return NULL;
- }
+ if (movedi[0] == 0xbf && movedi[5] == 0x57)
+ rcall = movedi + 6;
+ else if (movedi[0] == 0x68)
+ rcall = movedi + 5;
else
- {
- if (movedi[0] == 0xbf && movedi[5] == 0x57)
- rcall = movedi + 6;
- else if (movedi[0] == 0x68)
- rcall = movedi + 5;
- else
- return NULL;
- /* Compare the address used for the critical section with the known
- PEB lock as stored in the PEB. */
- if ((PRTL_CRITICAL_SECTION) peek32 (movedi + 1)
- != NtCurrentTeb ()->Peb->FastPebLock)
- return NULL;
- /* To check we are seeing the right code, we check our expectation that
- the next instruction is a relative call into RtlEnterCriticalSection. */
- if (rcall[0] != 0xe8)
- return NULL;
- /* Check that this is a relative call to RtlEnterCriticalSection. */
- offset = (ptrdiff_t) peek32 (rcall + 1);
- if (rcall + 5 + offset != ent_crit)
- return NULL;
- mov_pfast_cwd = rcall + 5;
- }
+ return NULL;
+ /* Compare the address used for the critical section with the known
+ PEB lock as stored in the PEB. */
+ if ((PRTL_CRITICAL_SECTION) peek32 (movedi + 1)
+ != NtCurrentTeb ()->Peb->FastPebLock)
+ return NULL;
+ /* To check we are seeing the right code, we check our expectation that
+ the next instruction is a relative call into RtlEnterCriticalSection. */
+ if (rcall[0] != 0xe8)
+ return NULL;
+ /* Check that this is a relative call to RtlEnterCriticalSection. */
+ offset = (ptrdiff_t) peek32 (rcall + 1);
+ if (rcall + 5 + offset != ent_crit)
+ return NULL;
/* After locking the critical section, the code should read the global
PFAST_CWD * pointer that is guarded by that critical section. */
- if (mov_pfast_cwd[0] != 0x8b)
+ const uint8_t *movesi = rcall + 5;
+ if (movesi[0] != 0x8b)
return NULL;
- return (fcwd_access_t **) peek32 (mov_pfast_cwd + 2);
+ return (fcwd_access_t **) peek32 (movesi + 2);
}
static fcwd_access_t **
@@ -4311,15 +4255,11 @@ etc::test_file_change (int n)
bool
etc::dir_changed (int n)
{
- /* io MUST be static because NtNotifyChangeDirectoryFile works asynchronously.
- It may write into io after the function has left, which may result in all
- sorts of stack corruption. */
- static IO_STATUS_BLOCK io NO_COPY;
- static HANDLE changed_h NO_COPY;
-
if (!change_possible[n])
{
+ static HANDLE changed_h NO_COPY;
NTSTATUS status;
+ IO_STATUS_BLOCK io;
if (!changed_h)
{
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index cb7480a58..3bbab4df7 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -347,7 +347,6 @@ class path_conv
bool fs_got_fs () const { return fs.got_fs (); }
bool fs_is_fat () const {return fs.is_fat ();}
bool fs_is_ntfs () const {return fs.is_ntfs ();}
- bool fs_is_refs () const {return fs.is_refs ();}
bool fs_is_samba () const {return fs.is_samba ();}
bool fs_is_nfs () const {return fs.is_nfs ();}
bool fs_is_netapp () const {return fs.is_netapp ();}
@@ -438,6 +437,7 @@ class etc
{
friend class dtable;
static int curr_ix;
+ static HANDLE changed_h;
static bool change_possible[MAX_ETC_FILES + 1];
static OBJECT_ATTRIBUTES fn[MAX_ETC_FILES + 1];
static LARGE_INTEGER last_modified[MAX_ETC_FILES + 1];
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index eb4923e9b..a13100cfc 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -77,6 +77,11 @@ pinfo::thisproc (HANDLE h)
else if (!child_proc_info) /* child_proc_info is only set when this process
was started by another cygwin process */
procinfo->start_time = time (NULL); /* Register our starting time. */
+ else if (::cygheap->pid_handle)
+ {
+ ForceCloseHandle (::cygheap->pid_handle);
+ ::cygheap->pid_handle = NULL;
+ }
}
/* Initialize the process table entry for the current task.
@@ -114,6 +119,7 @@ pinfo_init (char **envp, int envc)
static DWORD
status_exit (DWORD x)
{
+ const char *find_first_notloaded_dll (path_conv &);
switch (x)
{
case STATUS_DLL_NOT_FOUND:
@@ -299,16 +305,8 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0)
bool created = shloc != SH_JUSTOPEN;
- if (!created && createit && (procinfo->process_state & PID_REAPED))
- {
- memset (procinfo, 0, sizeof (*procinfo));
- created = true; /* Lie that we created this - just reuse old
- shared memory */
- }
-
- if ((procinfo->process_state & PID_REAPED)
- || ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)
- && cygwin_pid (procinfo->dwProcessId) != procinfo->pid))
+ if ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)
+ && cygwin_pid (procinfo->dwProcessId) != procinfo->pid)
{
set_errno (ESRCH);
break;
@@ -655,6 +653,7 @@ _pinfo::commune_request (__uint32_t code, ...)
HANDLE& hp = si._si_commune._si_process_handle;
HANDLE& fromthem = si._si_commune._si_read_handle;
HANDLE request_sync = NULL;
+ bool locked = false;
res.s = NULL;
res.n = 0;
@@ -681,6 +680,7 @@ _pinfo::commune_request (__uint32_t code, ...)
}
va_end (args);
+ locked = true;
char name_buf[MAX_PATH];
request_sync = CreateSemaphore (&sec_none_nih, 0, LONG_MAX,
shared_name (name_buf, "commune", myself->pid));
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index 6a88d4f1c..52f2ba058 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -211,22 +211,10 @@ fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
psize = DEFAULT_PIPEBUFSIZE;
char pipename[MAX_PATH];
- size_t len = __small_sprintf (pipename, PIPE_INTRO "%S-",
+ const size_t len = __small_sprintf (pipename, PIPE_INTRO "%S-",
&cygheap->installation_key);
- DWORD pipe_mode = PIPE_READMODE_BYTE;
- if (!name)
- pipe_mode |= pipe_byte ? PIPE_TYPE_BYTE : PIPE_TYPE_MESSAGE;
- else
- pipe_mode |= PIPE_TYPE_MESSAGE;
-
- if (!name || (open_mode & PIPE_ADD_PID))
- {
- len += __small_sprintf (pipename + len, "%u-", GetCurrentProcessId ());
- open_mode &= ~PIPE_ADD_PID;
- }
-
if (name)
- len += __small_sprintf (pipename + len, "%s", name);
+ strcpy (pipename + len, name);
open_mode |= PIPE_ACCESS_INBOUND;
@@ -238,12 +226,10 @@ fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
{
static volatile ULONG pipe_unique_id;
if (!name)
- __small_sprintf (pipename + len, "pipe-%p",
- InterlockedIncrement ((LONG *) &pipe_unique_id));
+ __small_sprintf (pipename + len, "pipe-%p-%p", myself->pid,
+ InterlockedIncrement ((LONG *) &pipe_unique_id));
- debug_printf ("name %s, size %lu, mode %s", pipename, psize,
- (pipe_mode & PIPE_TYPE_MESSAGE)
- ? "PIPE_TYPE_MESSAGE" : "PIPE_TYPE_BYTE");
+ debug_printf ("CreateNamedPipe: name %s, size %lu", pipename, psize);
/* Use CreateNamedPipe instead of CreatePipe, because the latter
returns a write handle that does not permit FILE_READ_ATTRIBUTES
@@ -260,7 +246,8 @@ fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
definitely required for pty handling since fhandler_pty_master
writes to the pipe in chunks, terminated by newline when CANON mode
is specified. */
- *r = CreateNamedPipe (pipename, open_mode, pipe_mode, 1, psize,
+ *r = CreateNamedPipe (pipename, open_mode,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_BYTE, 1, psize,
psize, NMPWAIT_USE_DEFAULT_WAIT, sa_ptr);
if (*r != INVALID_HANDLE_VALUE)
diff --git a/winsup/cygwin/poll.cc b/winsup/cygwin/poll.cc
index cbb68bf04..ea86ab5aa 100644
--- a/winsup/cygwin/poll.cc
+++ b/winsup/cygwin/poll.cc
@@ -152,9 +152,9 @@ ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts,
? -1
: (timeout_ts->tv_sec * 1000 + timeout_ts->tv_nsec / 1000000);
if (sigmask)
- set_signal_mask (_my_tls.sigmask, *sigmask);
+ set_signal_mask (*sigmask, _my_tls.sigmask);
int ret = poll (fds, nfds, timeout);
if (sigmask)
- set_signal_mask (_my_tls.sigmask, oldset);
+ set_signal_mask (oldset, _my_tls.sigmask);
return ret;
}
diff --git a/winsup/cygwin/posix.sgml b/winsup/cygwin/posix.sgml
index 0c6f6e502..5e5df463b 100644
--- a/winsup/cygwin/posix.sgml
+++ b/winsup/cygwin/posix.sgml
@@ -1115,7 +1115,6 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
get_phys_pages
get_nprocs
get_nprocs_conf
- getmntent_r
getopt_long
getopt_long_only
getpt
@@ -1127,7 +1126,6 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
lsetxattr
memmem
mempcpy
- memrchr
mkostemp
mkostemps
pipe2
diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc
index d09abf190..b9d224e43 100644
--- a/winsup/cygwin/posix_ipc.cc
+++ b/winsup/cygwin/posix_ipc.cc
@@ -119,12 +119,14 @@ ipc_mutex_init (HANDLE *pmtx, const char *name)
static int
ipc_mutex_lock (HANDLE mtx)
{
- switch (cancelable_wait (mtx, cw_infinite, cw_sig_eintr | cw_cancel | cw_cancel_self))
+ HANDLE h[2] = { mtx, signal_arrived };
+
+ switch (WaitForMultipleObjects (2, h, FALSE, INFINITE))
{
case WAIT_OBJECT_0:
case WAIT_ABANDONED_0:
return 0;
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0 + 1:
set_errno (EINTR);
return 1;
default:
@@ -172,12 +174,11 @@ ipc_cond_init (HANDLE *pevt, const char *name, char sr)
static int
ipc_cond_timedwait (HANDLE evt, HANDLE mtx, const struct timespec *abstime)
{
- HANDLE w4[4] = { evt, };
+ HANDLE w4[4] = { evt, signal_arrived, NULL, NULL };
DWORD cnt = 2;
DWORD timer_idx = 0;
int ret = 0;
- set_signal_arrived here (w4[1]);
if ((w4[cnt] = pthread::get_cancel_event ()) != NULL)
++cnt;
if (abstime)
diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc
index 04d5d9862..ea10d9220 100644
--- a/winsup/cygwin/pseudo-reloc.cc
+++ b/winsup/cygwin/pseudo-reloc.cc
@@ -20,6 +20,8 @@
# define NO_COPY
#else
# include "winsup.h"
+# include <wchar.h>
+# include <ntdef.h>
# include <sys/cygwin.h>
/* custom status code: */
# define STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION ((NTSTATUS) 0xe0000269)
@@ -85,7 +87,7 @@ __report_error (const char *msg, ...)
* cygwin ptys.
*/
char buf[128];
- WCHAR module[MAX_PATH];
+ wchar_t module[MAX_PATH];
char * posix_module = NULL;
static const char UNKNOWN_MODULE[] = "<unknown module>: ";
static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: ";
@@ -326,10 +328,10 @@ do_pseudo_reloc (void * start, void * end, void * base)
}
#ifdef __CYGWIN__
-extern "C" void
+void
_pei386_runtime_relocator (per_process *u)
{
- if (u && CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL (u))
+ if (CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL (u))
do_pseudo_reloc (u->pseudo_reloc_start, u->pseudo_reloc_end, u->image_base);
}
#else
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c
index b44ba2c62..30502f7f1 100644
--- a/winsup/cygwin/regex/regcomp.c
+++ b/winsup/cygwin/regex/regcomp.c
@@ -324,10 +324,7 @@ p_ere(struct parse *p,
conc = HERE();
while (MORE() && (c = PEEK()) != '|' && c != stop)
p_ere_exp(p);
-#ifndef __CYGWIN__
- /* undefined behaviour according to POSIX; allowed by glibc */
(void)REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */
-#endif
if (!EAT('|'))
break; /* NOTE BREAK OUT */
diff --git a/winsup/cygwin/registry.cc b/winsup/cygwin/registry.cc
index 9f791d2df..3047e269c 100644
--- a/winsup/cygwin/registry.cc
+++ b/winsup/cygwin/registry.cc
@@ -115,7 +115,7 @@ reg_key::build_reg (HKEY top, REGSAM access, va_list av)
if (!NT_SUCCESS (status))
{
key_is_invalid = status;
- debug_printf ("failed to create key %S in the registry", &uname);
+ debug_printf ("failed to create key %S in the registry", uname);
break;
}
}
diff --git a/winsup/cygwin/release/1.7.10 b/winsup/cygwin/release/1.7.10
new file mode 100644
index 000000000..33a2f20dd
--- /dev/null
+++ b/winsup/cygwin/release/1.7.10
@@ -0,0 +1,126 @@
+What's new:
+-----------
+
+- New getconf tool for querying confstr(3), pathconf(3), sysconf(3), and
+ limits.h configuration.
+
+- New tzset utility to generate a POSIX-compatible TZ environment
+ variable from the Windows timezone settings.
+
+- The passwd tool now allows an administrator to use the -R command for
+ other user accounts: passwd -R username.
+
+- Experimental: Change the way sockets are created so that Cygwin always
+ circumvents so-called "layered service providers" (LSPs) starting with
+ Windows Vista.
+
+- signal handler functions are now dispatched in threads other than the
+ main thread.
+
+- Support NcFsd filesystem.
+
+- clock_gettime(3) and clock_getres(3) accept per-process and per-thread
+ CPU-time clocks, including CLOCK_PROCESS_CPUTIME_ID and
+ CLOCK_THREAD_CPUTIME_ID.
+
+- New pthread functions:
+
+ - Spin Locks: pthread_spin_destroy, pthread_spin_init, pthread_spin_lock,
+ pthread_spin_trylock, pthread_spin_unlock.
+
+ - Stack management: pthread_attr_getstack, pthread_attr_getstackaddr,
+ pthread_attr_getguardsize, pthread_attr_setstack, pthread_attr_setstackaddr,
+ pthread_attr_setguardsize, pthread_getattr_np.
+
+ - Clock Selection: pthread_getcpuclockid, pthread_condattr_getclock,
+ pthread_condattr_setclock.
+
+ - Scheduling: pthread_setschedprio.
+
+ - Signalling: pthread_sigqueue.
+
+- Add /proc/devices, /proc/misc, /proc/sysvipc, /proc/swaps.
+
+- Make various system functions thread cancelation points per POSIX.
+
+- Add ioctl FIONREAD handling for non-sockets.
+
+- dlopen now supports the Glibc-specific RTLD_NODELETE and RTLD_NOOPEN flags.
+
+- The printf and wprintf families of functions now support the %m conversion
+ flag.
+
+- Execed processes now inherit the children of their predecessor.
+
+- Fifos have been rewritten and should now be more reliable.
+
+- GNU/glibc error.h error reporting functions: error, error_at_line,
+ error_message_count, error_one_per_line, error_print_progname.
+
+- C99 <tgmath.h> type-generic macros.
+
+- Other new API: clock_getcpuclockid, clock_nanosleep, clock_settime, __fpurge,
+ get_current_dir_name, getgrouplist, getpt, ppoll, psiginfo, psignal,
+ ptsname_r, sys_siglist, sysinfo.
+
+- cygwin_conv_path_list finally supports CCP_WIN_W_TO_POSIX and
+ CCP_POSIX_TO_WIN_W conversions.
+
+
+What changed:
+-------------
+
+- Drop support for Windows NT4.
+
+- The CYGWIN=tty mode using pipes to communicate with the console in a pseudo
+ tty-like mode has been removed. Either just use the normal Windows console
+ as is, or use a terminal application like mintty.
+
+- The CYGWIN environment variable options "envcache", "strip_title", "title",
+ "tty", and "upcaseenv" have been removed.
+
+- New heap management. Drop registry setting "heap_chunk_in_mb" in favor of
+ a new per-executable setting in the executable file header which can be set
+ using the peflags tool. Drop registry setting "heap_slop_in_mb" entirely.
+
+- Revamp console and pseudo tty handling. Rename /dev/ttyX to /dev/consX,
+ /dev/ttyX to /dev/ptyX.
+
+- Improve fork/exec performance on 64 bit systems.
+
+- Improve Ctrl-C handling in console.
+
+- Try harder to let fork not fail if DLLs are moved in memory which should,
+ in some cases, minimize the need for rebaseall.
+
+- Try harder to send SIGHUP to children when process group leader fails.
+
+- Deal with Windows problem where non-blocking pipe I/O was not flushed
+ properly on close.
+
+- Attempt to regularize most syscall-related strace output.
+
+- Improve behavior of Cygwin when started from a 64-bit process, especially
+ under Windows 2003.
+
+- Improve multi-thread/reentrancy safety with syscalls that deal with fds.
+
+- dlopen can now find "cygFOO.dll", even if the caller specified "libFOO.so".
+ This is supposed to support applications which are no aware of Windows DLLs.
+
+- Make accept(2), poll(2) and shutdown(2) behave more like on Linux.
+
+- Raise max number of mount points from 30 to 64.
+
+- Output of /proc/maps is closer to what Linux prints and much more useful to
+ examine process VM layout.
+
+- /proc/loadavg now shows the number of currently running processes and the
+ total number of processes.
+
+- /proc/version now shows the username of whomever compiled the Cygwin DLL
+ as well as the version of GCC used when compiling.
+
+- Various assorted bugfixes and improvements.
+
+- Preliminary, no guarantee, may be broken in subtle ways, Windows 8 support.
diff --git a/winsup/cygwin/release/1.7.11 b/winsup/cygwin/release/1.7.11
new file mode 100644
index 000000000..d4e0911d2
--- /dev/null
+++ b/winsup/cygwin/release/1.7.11
@@ -0,0 +1,29 @@
+What's new:
+-----------
+
+- New pldd command for listing DLLs loaded by a process.
+
+- New API: scandirat.
+
+
+What changed:
+-------------
+
+- Fixed problem where background Cygwin processes kept the windows
+ console window from exiting.
+
+- Change the way remote shares mapped to drive letters are recognized
+ when creating the cygdrive directory. If Windows claims the drive
+ is unavailable, don't show it in the cygdrive directory listing.
+
+- Lower the stack pressure in some Cygwin calls by reducing the buffer
+ space allocated on the stack.
+
+- Raise default stacksize of pthreads from 512K to 1 Meg. It can still
+ be changed using the pthread_attr_setstacksize call.
+
+- process.h header has been moved back from /usr/include/cygwin to
+ /usr/include.
+
+- Make <sys/wait.h> header C++ clean.
+
diff --git a/winsup/cygwin/release/1.7.12 b/winsup/cygwin/release/1.7.12
new file mode 100644
index 000000000..641e73062
--- /dev/null
+++ b/winsup/cygwin/release/1.7.12
@@ -0,0 +1,21 @@
+What's new:
+-----------
+
+- Cygwin now automatically populates the /dev directory with all
+ existing POSIX devices.
+
+- Add virtual /proc/PID/mountinfo file.
+
+- flock now additionally supports the following scenario, which requires
+ to propagate locks to the parent process:
+
+ (
+ flock -n 9 || exit 1
+ # ... commands executed under lock ...
+ } 9>/var/lock/mylockfile
+
+ Only propagation to the direct parent process is supported so far,
+ not to grand parents or sibling processes.
+
+- Add a "detect_bloda" setting for the CYGWIN environment variable to help
+ finding potential BLODAs.
diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc
index e990c996c..9c8aa0467 100644
--- a/winsup/cygwin/sched.cc
+++ b/winsup/cygwin/sched.cc
@@ -21,9 +21,7 @@
#include <unistd.h>
#include "registry.h"
-#ifndef __MINGW64_VERSION_MAJOR
extern "C" HWND WINAPI GetForegroundWindow();
-#endif
/* Win32 priority to UNIX priority Mapping.
For now, I'm just following the spec: any range of priorities is ok.
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc
index 0b505a7e8..eee4886b1 100644
--- a/winsup/cygwin/sec_helper.cc
+++ b/winsup/cygwin/sec_helper.cc
@@ -1,7 +1,7 @@
/* sec_helper.cc: NT security helper functions
Copyright 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009,
- 2010, 2011, 2012 Red Hat, Inc.
+ 2010, 2011 Red Hat, Inc.
Written by Corinna Vinschen <corinna@vinschen.de>
@@ -25,10 +25,6 @@ details. */
#include "pwdgrp.h"
#include "ntdll.h"
-#ifndef __MINGW64_VERSION_MAJOR
-#define SECURITY_NT_NON_UNIQUE SECURITY_NT_NON_UNIQUE_RID
-#endif
-
/* General purpose security attribute objects for global use. */
SECURITY_ATTRIBUTES NO_COPY sec_none;
SECURITY_ATTRIBUTES NO_COPY sec_none_nih;
@@ -179,7 +175,7 @@ cygsid::get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known)
well_known_sid = well_known;
else
well_known_sid = (s != SECURITY_NT_AUTH
- || r[0] != SECURITY_NT_NON_UNIQUE);
+ || r[0] != SECURITY_NT_NON_UNIQUE_RID);
return psid;
}
@@ -378,11 +374,7 @@ static const struct {
{ SE_CREATE_GLOBAL_NAME, false },
{ SE_TRUSTED_CREDMAN_ACCESS_NAME, false },
{ SE_RELABEL_NAME, true },
-#ifndef __MINGW64_VERSION_MAJOR
{ SE_INCREASE_WORKING_SET_NAME, false },
-#else
- { SE_INC_WORKING_SET_NAME, false },
-#endif
{ SE_TIME_ZONE_NAME, true },
{ SE_CREATE_SYMBOLIC_LINK_NAME, true }
};
@@ -563,7 +555,7 @@ PSECURITY_ATTRIBUTES __stdcall
__sec_user (PVOID sa_buf, PSID sid1, PSID sid2, DWORD access2, BOOL inherit)
{
PSECURITY_ATTRIBUTES psa = (PSECURITY_ATTRIBUTES) sa_buf;
- PISECURITY_DESCRIPTOR psd = (PISECURITY_DESCRIPTOR)
+ PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR)
((char *) sa_buf + sizeof (*psa));
PACL acl = (PACL) ((char *) sa_buf + sizeof (*psa) + sizeof (*psd));
NTSTATUS status;
@@ -586,64 +578,6 @@ __sec_user (PVOID sa_buf, PSID sid1, PSID sid2, DWORD access2, BOOL inherit)
return psa;
}
-/* Helper function to create a file security descriptor which allows
- full access to admins, system, and the sid given as parameter. See
- try_to_bin for how it's used. */
-
-PSECURITY_DESCRIPTOR
-_recycler_sd (void *buf, bool users, bool dir)
-{
- NTSTATUS status;
- PISECURITY_DESCRIPTOR psd = (PISECURITY_DESCRIPTOR) buf;
-
- if (!psd)
- return NULL;
- RtlCreateSecurityDescriptor (psd, SECURITY_DESCRIPTOR_REVISION);
- PACL dacl = (PACL) (psd + 1);
- /* Pre-Vista, the per-user recycler dir has a rather too complicated
- ACL by default, which has distinct ACEs for inheritable and non-inheritable
- permissions. However, this ACL is practically equivalent to the ACL
- created since Vista. Therefore we simplify our job here and create the
- pre-Vista permissions the same way as on Vista and later. */
- RtlCreateAcl (dacl, MAX_DACL_LEN (3), ACL_REVISION);
- RtlAddAccessAllowedAceEx (dacl, ACL_REVISION,
- dir ? CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
- : NO_INHERITANCE,
- FILE_ALL_ACCESS, well_known_admins_sid);
- RtlAddAccessAllowedAceEx (dacl, ACL_REVISION,
- dir ? CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
- : NO_INHERITANCE,
- FILE_ALL_ACCESS, well_known_system_sid);
- if (users)
- RtlAddAccessAllowedAceEx (dacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE,
- FILE_GENERIC_READ | FILE_GENERIC_EXECUTE
- | FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES,
- well_known_users_sid);
- else
- RtlAddAccessAllowedAceEx (dacl, ACL_REVISION,
- dir ? CONTAINER_INHERIT_ACE
- | OBJECT_INHERIT_ACE
- : NO_INHERITANCE,
- FILE_ALL_ACCESS, cygheap->user.sid ());
- LPVOID ace;
- status = RtlFirstFreeAce (dacl, &ace);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("RtlFirstFreeAce: %p", status);
- return NULL;
- }
- dacl->AclSize = (char *) ace - (char *) dacl;
- RtlSetDaclSecurityDescriptor (psd, TRUE, dacl, FALSE);
- /* If the directory DACL is not marked as protected, shell32 thinks
- the recycle dir is corrupted. As soon as Explorer accesses the
- Recycler, the user will get a GUI dialog "The Recycle Bin on X:\
- is corrupted. Do you want to empty the Recycle Bin for this drive?"
- Of course we want to avoid that. */
- if (dir)
- psd->Control |= SE_DACL_PROTECTED;
- return psd;
-}
-
/* Helper function to create an event security descriptor which only allows
specific access to everyone. Only the creating process has all access
rights. */
@@ -652,7 +586,7 @@ PSECURITY_DESCRIPTOR
_everyone_sd (void *buf, ACCESS_MASK access)
{
NTSTATUS status;
- PISECURITY_DESCRIPTOR psd = (PISECURITY_DESCRIPTOR) buf;
+ PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR) buf;
if (psd)
{
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index cf3888bd3..3afd2b458 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -1,7 +1,7 @@
/* security.cc: NT file access control functions
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
Originaly written by Gunther Ebert, gunther.ebert@ixos-leipzig.de
Completely rewritten by Corinna Vinschen <corinna@vinschen.de>
@@ -469,13 +469,15 @@ bool
add_access_allowed_ace (PACL acl, int offset, DWORD attributes,
PSID sid, size_t &len_add, DWORD inherit)
{
- NTSTATUS status = RtlAddAccessAllowedAceEx (acl, ACL_REVISION, inherit,
- attributes, sid);
+ NTSTATUS status = RtlAddAccessAllowedAce (acl, ACL_REVISION, attributes, sid);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
return false;
}
+ ACCESS_ALLOWED_ACE *ace;
+ if (inherit && NT_SUCCESS (RtlGetAce (acl, offset, (PVOID *) &ace)))
+ ace->Header.AceFlags |= inherit;
len_add += sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD) + RtlLengthSid (sid);
return true;
}
@@ -484,13 +486,15 @@ bool
add_access_denied_ace (PACL acl, int offset, DWORD attributes,
PSID sid, size_t &len_add, DWORD inherit)
{
- NTSTATUS status = RtlAddAccessDeniedAceEx (acl, ACL_REVISION, inherit,
- attributes, sid);
+ NTSTATUS status = RtlAddAccessDeniedAce (acl, ACL_REVISION, attributes, sid);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
return false;
}
+ ACCESS_DENIED_ACE *ace;
+ if (inherit && NT_SUCCESS (RtlGetAce (acl, offset, (PVOID *) &ace)))
+ ace->Header.AceFlags |= inherit;
len_add += sizeof (ACCESS_DENIED_ACE) - sizeof (DWORD) + RtlLengthSid (sid);
return true;
}
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h
index 2ac101a69..6629260d2 100644
--- a/winsup/cygwin/security.h
+++ b/winsup/cygwin/security.h
@@ -1,7 +1,7 @@
/* security.h: security declarations
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011, 2012 Red Hat, Inc.
+ 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -9,7 +9,8 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#pragma once
+#ifndef _SECURITY_H
+#define _SECURITY_H
#include <accctrl.h>
@@ -222,12 +223,9 @@ public:
/* += adds a "normal" SID, *= adds a well-known SID. See comment in class
cygsid above. */
- BOOL operator+= (cygsid &si) { return add ((PSID) si,
- si.is_well_known_sid ()); }
+ BOOL operator+= (cygsid &si) { return add ((PSID) si, false); }
BOOL operator+= (const char *sidstr) { cygsid nsi (sidstr);
- return add ((PSID) nsi,
- nsi.is_well_known_sid ());
- }
+ return add ((PSID) nsi, false); }
BOOL operator+= (const PSID psid) { return add (psid, false); }
BOOL operator*= (cygsid &si) { return add ((PSID) si, true); }
BOOL operator*= (const char *sidstr) { cygsid nsi (sidstr);
@@ -475,13 +473,6 @@ extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID, PSID, PSID,
DWORD, BOOL)
__attribute__ ((regparm (3)));
-
-extern PSECURITY_DESCRIPTOR _recycler_sd (void *buf, bool users, bool dir);
-#define recycler_sd(users,dir) \
- (_recycler_sd (alloca (sizeof (SECURITY_DESCRIPTOR) + MAX_DACL_LEN (3)), \
- (users), \
- (dir)))
-
extern PSECURITY_DESCRIPTOR _everyone_sd (void *buf, ACCESS_MASK access);
#define everyone_sd(access) (_everyone_sd (alloca (SD_MIN_SIZE), (access)))
@@ -512,3 +503,5 @@ sec_user (SECURITY_ATTRIBUTES *sa_buf, PSID sid1, PSID sid2 = NULL,
{
return __sec_user (sa_buf, sid1, sid2, access2, TRUE);
}
+
+#endif /*_SECURITY_H*/
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 3122c8203..72900866e 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -21,9 +21,9 @@ details. */
#include <wingdi.h>
#include <winuser.h>
+#include <netdb.h>
#define USE_SYS_TYPES_FD_SET
#include <winsock2.h>
-#include <netdb.h>
#include "cygerrno.h"
#include "security.h"
#include "path.h"
@@ -34,7 +34,6 @@ details. */
#include "pinfo.h"
#include "sigproc.h"
#include "cygtls.h"
-#include "cygwait.h"
/*
* All these defines below should be in sys/types.h
@@ -73,13 +72,7 @@ typedef long fd_mask;
#define UNIX_FD_ZERO(p, n) \
memset ((caddr_t) (p), 0, sizeof_fd_set ((n)))
-#define allocfd_set(n) ({\
- size_t __sfds = sizeof_fd_set (n) + 8; \
- void *__res = alloca (__sfds); \
- memset (__res, 0, __sfds); \
- (fd_set *) __res; \
-})
-
+#define allocfd_set(n) ((fd_set *) memset (alloca (sizeof_fd_set (n)), 0, sizeof_fd_set (n)))
#define copyfd_set(to, from, n) memcpy (to, from, sizeof_fd_set (n));
#define set_handle_or_return_if_not_open(h, s) \
@@ -88,139 +81,91 @@ typedef long fd_mask;
{ \
(s)->thread_errno = EBADF; \
return -1; \
- }
+ } \
-static int select (int, fd_set *, fd_set *, fd_set *, DWORD);
-
-/* The main select code. */
+/* The main select code.
+ */
extern "C" int
cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
struct timeval *to)
{
+ select_stuff sel;
+ fd_set *dummy_readfds = allocfd_set (maxfds);
+ fd_set *dummy_writefds = allocfd_set (maxfds);
+ fd_set *dummy_exceptfds = allocfd_set (maxfds);
+
select_printf ("select(%d, %p, %p, %p, %p)", maxfds, readfds, writefds, exceptfds, to);
pthread_testcancel ();
- int res;
- if (maxfds < 0)
- {
- set_errno (EINVAL);
- res = -1;
- }
- else
- {
- /* Convert to milliseconds or INFINITE if to == NULL */
- DWORD ms = to ? (to->tv_sec * 1000) + (to->tv_usec / 1000) : INFINITE;
- if (ms == 0 && to->tv_usec)
- ms = 1; /* At least 1 ms granularity */
- if (to)
- select_printf ("to->tv_sec %d, to->tv_usec %d, ms %d", to->tv_sec, to->tv_usec, ms);
- else
- select_printf ("to NULL, ms %x", ms);
+ if (!readfds)
+ readfds = dummy_readfds;
+ if (!writefds)
+ writefds = dummy_writefds;
+ if (!exceptfds)
+ exceptfds = dummy_exceptfds;
- res = select (maxfds, readfds ?: allocfd_set (maxfds),
- writefds ?: allocfd_set (maxfds),
- exceptfds ?: allocfd_set (maxfds), ms);
- }
- syscall_printf ("%R = select(%d, %p, %p, %p, %p)", res, maxfds, readfds,
- writefds, exceptfds, to);
- return res;
-}
+ for (int i = 0; i < maxfds; i++)
+ if (!sel.test_and_set (i, readfds, writefds, exceptfds))
+ {
+ select_printf ("aborting due to test_and_set error");
+ return -1; /* Invalid fd, maybe? */
+ }
-/* This function is arbitrarily split out from cygwin_select to avoid odd
- gcc issues with the use of allocfd_set and improper constructor handling
- for the sel variable. */
-static int
-select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- DWORD ms)
-{
- int res = select_stuff::select_loop;
+ /* Convert to milliseconds or INFINITE if to == NULL */
+ DWORD ms = to ? (to->tv_sec * 1000) + (to->tv_usec / 1000) : INFINITE;
+ if (ms == 0 && to->tv_usec)
+ ms = 1; /* At least 1 ms granularity */
- LONGLONG start_time = gtod.msecs (); /* Record the current time for later use. */
+ if (to)
+ select_printf ("to->tv_sec %d, to->tv_usec %d, ms %d", to->tv_sec, to->tv_usec, ms);
+ else
+ select_printf ("to NULL, ms %x", ms);
- select_stuff sel;
- sel.return_on_signal = 0;
+ select_printf ("sel.always_ready %d", sel.always_ready);
/* Allocate some fd_set structures using the number of fds as a guide. */
fd_set *r = allocfd_set (maxfds);
fd_set *w = allocfd_set (maxfds);
fd_set *e = allocfd_set (maxfds);
- while (res == select_stuff::select_loop)
- {
- /* Build the select record per fd linked list and set state as
- needed. */
- for (int i = 0; i < maxfds; i++)
- if (!sel.test_and_set (i, readfds, writefds, exceptfds))
- {
- select_printf ("aborting due to test_and_set error");
- return -1; /* Invalid fd, maybe? */
- }
- select_printf ("sel.always_ready %d", sel.always_ready);
-
- /* Degenerate case. No fds to wait for. Just wait for time to run out
- or signal to arrive. */
- if (sel.start.next == NULL)
- switch (cygwait (ms))
- {
- case WAIT_SIGNALED:
- select_printf ("signal received");
- if (_my_tls.call_signal_handler ())
- res = select_stuff::select_loop; /* Emulate linux behavior */
- else
- {
- set_sig_errno (EINTR);
- res = select_stuff::select_error;
- }
- break;
- case WAIT_CANCELED:
- sel.destroy ();
- pthread::static_cancel_self ();
- /*NOTREACHED*/
- default:
- res = select_stuff::select_set_zero; /* Set res to zero below. */
- break;
- }
- else if (sel.always_ready || ms == 0)
- res = 0; /* Catch any active fds via
- sel.poll() below */
- else
- res = sel.wait (r, w, e, ms); /* wait for an fd to become
- become active or time out */
- select_printf ("res %d", res);
- if (res >= 0)
+ int res = 0;
+ sel.return_on_signal = &_my_tls == _main_tls;
+ /* Degenerate case. No fds to wait for. Just wait. */
+ if (sel.start.next == NULL)
+ while (!res)
+ switch (cygwait (ms))
{
- copyfd_set (readfds, r, maxfds);
- copyfd_set (writefds, w, maxfds);
- copyfd_set (exceptfds, e, maxfds);
- /* Actually set the bit mask from sel records */
- res = (res == select_stuff::select_set_zero) ? 0 : sel.poll (readfds, writefds, exceptfds);
- }
- /* Always clean up everything here. If we're looping then build it
- all up again. */
- sel.cleanup ();
- sel.destroy ();
- /* Recalculate the time remaining to wait if we are going to be looping. */
- if (res == select_stuff::select_loop && ms != INFINITE)
- {
- select_printf ("recalculating ms");
- LONGLONG now = gtod.msecs ();
- if (now > (start_time + ms))
- {
- select_printf ("timed out after verification");
- res = select_stuff::select_error;
- }
- else
- {
- ms -= (now - start_time);
- start_time = now;
- select_printf ("ms now %u", ms);
- }
+ case WAIT_OBJECT_0:
+ select_printf ("signal received");
+ _my_tls.call_signal_handler ();
+ if (!sel.return_on_signal)
+ continue; /* Emulate linux behavior */
+ set_sig_errno (EINTR);
+ res = -1;
+ break;
+ case WAIT_OBJECT_0 + 1:
+ sel.destroy ();
+ pthread::static_cancel_self ();
+ /*NOTREACHED*/
+ default:
+ res = 1; /* temporary flag. Will be set to zero below. */
+ break;
}
+ else if (sel.always_ready || ms == 0)
+ res = 0;
+ else
+ res = sel.wait (r, w, e, ms);
+ if (res >= 0)
+ {
+ copyfd_set (readfds, r, maxfds);
+ copyfd_set (writefds, w, maxfds);
+ copyfd_set (exceptfds, e, maxfds);
+ res = (res > 0) ? 0 : sel.poll (readfds, writefds, exceptfds);
}
- if (res < -1)
- res = -1;
+ syscall_printf ("%R = select(%d, %p, %p, %p, %p)", res, maxfds, readfds,
+ writefds, exceptfds, to);
return res;
}
@@ -240,11 +185,11 @@ pselect(int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
tv.tv_usec = ts->tv_nsec / 1000;
}
if (set)
- set_signal_mask (_my_tls.sigmask, *set);
+ set_signal_mask (*set, _my_tls.sigmask);
int ret = cygwin_select (maxfds, readfds, writefds, exceptfds,
ts ? &tv : NULL);
if (set)
- set_signal_mask (_my_tls.sigmask, oldset);
+ set_signal_mask (oldset, _my_tls.sigmask);
return ret;
}
@@ -268,7 +213,7 @@ select_stuff::cleanup ()
inline void
select_stuff::destroy ()
{
- select_record *s;
+ select_record *s = &start;
select_record *snext = start.next;
select_printf ("deleting select records");
@@ -277,7 +222,6 @@ select_stuff::destroy ()
snext = s->next;
delete s;
}
- start.next = NULL;
}
select_stuff::~select_stuff ()
@@ -324,19 +268,24 @@ err:
}
/* The heart of select. Waits for an fd to do something interesting. */
-select_stuff::wait_states
+int
select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
DWORD ms)
{
+ int wait_ret;
HANDLE w4[MAXIMUM_WAIT_OBJECTS];
select_record *s = &start;
- DWORD m = 0;
+ int m = 0;
+ int res = 0;
+ bool is_cancelable = false;
- set_signal_arrived here (w4[m++]);
+ w4[m++] = signal_arrived; /* Always wait for the arrival of a signal. */
if ((w4[m] = pthread::get_cancel_event ()) != NULL)
- m++;
+ {
+ ++m;
+ is_cancelable = true;
+ }
- DWORD startfds = m;
/* Loop through the select chain, starting up anything appropriate and
counting the number of active fds. */
while ((s = s->next))
@@ -344,76 +293,73 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
if (m >= MAXIMUM_WAIT_OBJECTS)
{
set_sig_errno (EINVAL);
- return select_error;
+ return -1;
}
if (!s->startup (s, this))
{
s->set_select_errno ();
- return select_error;
- }
- if (s->h != NULL)
- {
- for (DWORD i = startfds; i < m; i++)
- if (w4[i] == s->h)
- goto next_while;
- w4[m++] = s->h;
+ return -1;
}
-next_while:;
+ if (s->h == NULL)
+ continue;
+ for (int i = 1; i < m; i++)
+ if (w4[i] == s->h)
+ goto next_while;
+ w4[m++] = s->h;
+ next_while:
+ continue;
}
- debug_printf ("m %d, ms %u", m, ms);
+ LONGLONG start_time = gtod.msecs (); /* Record the current time for later use. */
- DWORD wait_ret;
- if (!windows_used)
- wait_ret = WaitForMultipleObjects (m, w4, FALSE, ms);
- else
- /* Using MWMO_INPUTAVAILABLE is the officially supported solution for
- the problem that the call to PeekMessage disarms the queue state
- so that a subsequent MWFMO hangs, even if there are still messages
- in the queue. */
- wait_ret = MsgWaitForMultipleObjectsEx (m, w4, ms,
- QS_ALLINPUT | QS_ALLPOSTMESSAGE,
- MWMO_INPUTAVAILABLE);
- select_printf ("wait_ret %d. verifying", wait_ret);
-
- wait_states res;
- switch (wait_ret)
+ debug_printf ("m %d, ms %u", m, ms);
+ for (;;)
{
- case WAIT_OBJECT_0:
- select_printf ("signal received");
- /* Need to get rid of everything when a signal occurs since we can't
- be assured that a signal handler won't jump out of select entirely. */
- cleanup ();
- destroy ();
- if (_my_tls.call_signal_handler ())
- res = select_loop;
+ if (!windows_used)
+ wait_ret = WaitForMultipleObjects (m, w4, FALSE, ms);
else
+ /* Using MWMO_INPUTAVAILABLE is the officially supported solution for
+ the problem that the call to PeekMessage disarms the queue state
+ so that a subsequent MWFMO hangs, even if there are still messages
+ in the queue. */
+ wait_ret = MsgWaitForMultipleObjectsEx (m, w4, ms,
+ QS_ALLINPUT | QS_ALLPOSTMESSAGE,
+ MWMO_INPUTAVAILABLE);
+
+ switch (wait_ret)
{
+ case WAIT_OBJECT_0:
+ select_printf ("signal received");
+ _my_tls.call_signal_handler ();
+ if (!return_on_signal)
+ continue; /* Emulate linux behavior */
+ cleanup ();
set_sig_errno (EINTR);
- res = select_signalled; /* Cause loop exit in cygwin_select */
- }
- break;
- case WAIT_FAILED:
- system_printf ("WaitForMultipleObjects failed");
- s = &start;
- s->set_select_errno ();
- res = select_error;
- break;
- case WAIT_TIMEOUT:
- select_printf ("timed out");
- res = select_set_zero;
- break;
- case WAIT_OBJECT_0 + 1:
- if (startfds > 1)
- {
+ return -1;
+ case WAIT_OBJECT_0 + 1:
+ if (is_cancelable)
+ {
+ cleanup ();
+ destroy ();
+ pthread::static_cancel_self ();
+ }
+ /* This wasn't a cancel event. It was just a normal object to wait
+ for. */
+ break;
+ case WAIT_FAILED:
cleanup ();
- destroy ();
- pthread::static_cancel_self ();
- /*NOTREACHED*/
+ system_printf ("WaitForMultipleObjects failed");
+ s = &start;
+ s->set_select_errno ();
+ return -1;
+ case WAIT_TIMEOUT:
+ cleanup ();
+ select_printf ("timed out");
+ res = 1;
+ goto out;
}
- /* Fall through. This wasn't a cancel event. It was just a normal object
- to wait for. */
- default:
+
+ select_printf ("woke up. wait_ret %d. verifying", wait_ret);
s = &start;
bool gotone = false;
/* Some types of objects (e.g., consoles) wake up on "inappropriate" events
@@ -423,21 +369,40 @@ next_while:;
while ((s = s->next))
if (s->saw_error ())
{
+ cleanup ();
set_errno (s->saw_error ());
- res = select_error; /* Somebody detected an error */
- goto out;
+ return -1; /* Somebody detected an error */
}
else if ((((wait_ret >= m && s->windows_handle) || s->h == w4[wait_ret]))
&& s->verify (s, readfds, writefds, exceptfds))
gotone = true;
- if (!gotone)
- res = select_loop;
- else
- res = select_ok;
select_printf ("gotone %d", gotone);
- break;
+ if (gotone)
+ {
+ cleanup ();
+ goto out;
+ }
+
+ if (ms == INFINITE)
+ {
+ select_printf ("looping");
+ continue;
+ }
+ select_printf ("recalculating ms");
+
+ LONGLONG now = gtod.msecs ();
+ if (now > (start_time + ms))
+ {
+ cleanup ();
+ select_printf ("timed out after verification");
+ goto out;
+ }
+ ms -= (now - start_time);
+ start_time = now;
+ select_printf ("ms now %u", ms);
}
+
out:
select_printf ("returning %d", res);
return res;
@@ -587,15 +552,11 @@ peek_pipe (select_record *s, bool from_select)
switch (fh->get_major ())
{
case DEV_PTYM_MAJOR:
- {
- fhandler_pty_master *fhm = (fhandler_pty_master *) fh;
- fhm->flush_to_slave ();
- if (fhm->need_nl)
- {
- gotone = s->read_ready = true;
- goto out;
- }
- }
+ if (((fhandler_pty_master *) fh)->need_nl)
+ {
+ gotone = s->read_ready = true;
+ goto out;
+ }
break;
default:
if (fh->get_readahead_valid ())
@@ -1323,7 +1284,7 @@ thread_socket (void *arg)
/ MAXIMUM_WAIT_OBJECTS));
bool event = false;
- select_printf ("stuff_start %p, timeout %u", si->start, timeout);
+ select_printf ("stuff_start %p", si->start);
while (!event)
{
for (select_record *s = si->start; (s = s->next); )
diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h
index fe0c206d5..57cd59673 100644
--- a/winsup/cygwin/select.h
+++ b/winsup/cygwin/select.h
@@ -69,15 +69,6 @@ struct select_mailslot_info: public select_info
class select_stuff
{
public:
- enum wait_states
- {
- select_signalled = -3,
- select_loop = -2,
- select_error = -1,
- select_ok = 0,
- select_set_zero = 1
- };
-
~select_stuff ();
bool return_on_signal;
bool always_ready, windows_used;
@@ -91,15 +82,14 @@ public:
bool test_and_set (int i, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds);
int poll (fd_set *readfds, fd_set *writefds, fd_set *exceptfds);
- wait_states wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms);
+ int wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms);
void cleanup ();
void destroy ();
-
select_stuff (): return_on_signal (false), always_ready (false),
windows_used (false), start (0),
- device_specific_pipe (NULL),
- device_specific_socket (NULL),
- device_specific_serial (NULL),
- device_specific_mailslot (NULL) {}
+ device_specific_pipe (0),
+ device_specific_socket (0),
+ device_specific_serial (0),
+ device_specific_mailslot (0) {}
};
#endif /* _SELECT_H_ */
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 83402a2c8..7a0b2510b 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -377,8 +377,4 @@ memory_init (bool init_cygheap)
shared_info::create (); /* Initialize global shared memory */
user_info::create (false); /* Initialize per-user shared memory */
- /* Initialize tty list session stuff. Doesn't really belong here but
- this needs to be initialized before any tty or console manipulation
- happens and it is a common location. */
- tty_list::init_session ();
}
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index f3a3a3a07..649cda694 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -22,11 +22,10 @@ details. */
#include "fhandler.h"
#include "dtable.h"
#include "cygheap.h"
-#include "cygwait.h"
#define _SA_NORESTART 0x8000
-static int sigaction_worker (int, const struct sigaction *, struct sigaction *, bool)
+static int sigaction_worker (int, const struct sigaction *, struct sigaction *, bool, const char *)
__attribute__ ((regparm (3)));
#define sigtrapped(func) ((func) != SIG_IGN && (func) != SIG_DFL)
@@ -120,9 +119,12 @@ clock_nanosleep (clockid_t clk_id, int flags, const struct timespec *rqtp,
syscall_printf ("clock_nanosleep (%ld.%09ld)", rqtp->tv_sec, rqtp->tv_nsec);
- int rc = cancelable_wait (NULL, &timeout, cw_sig_eintr | cw_cancel | cw_cancel_self);
- if (rc == WAIT_SIGNALED)
- res = EINTR;
+ int rc = cancelable_wait (signal_arrived, &timeout);
+ if (rc == WAIT_OBJECT_0)
+ {
+ _my_tls.call_signal_handler ();
+ res = EINTR;
+ }
/* according to POSIX, rmtp is used only if !abstime */
if (rmtp && !abstime)
@@ -223,7 +225,7 @@ handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& op
newmask = *set;
break;
}
- set_signal_mask (opmask, newmask);
+ set_signal_mask (newmask, opmask);
}
return 0;
}
@@ -376,7 +378,7 @@ abort (void)
sigset_t sig_mask;
sigfillset (&sig_mask);
sigdelset (&sig_mask, SIGABRT);
- set_signal_mask (_my_tls.sigmask, sig_mask);
+ set_signal_mask (sig_mask, _my_tls.sigmask);
raise (SIGABRT);
_my_tls.call_signal_handler (); /* Call any signal handler */
@@ -387,9 +389,9 @@ abort (void)
do_exit (SIGABRT); /* signal handler didn't exit. Goodbye. */
}
-static int __attribute__ ((regparm (3)))
+static int
sigaction_worker (int sig, const struct sigaction *newact,
- struct sigaction *oldact, bool isinternal)
+ struct sigaction *oldact, bool isinternal, const char *fnname)
{
int res = -1;
myfault efault;
@@ -442,15 +444,14 @@ sigaction_worker (int sig, const struct sigaction *newact,
}
out:
+ syscall_printf ("%R = %s(%d, %p, %p)", res, fnname, sig, newact, oldact);
return res;
}
extern "C" int
sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
{
- int res = sigaction_worker (sig, newact, oldact, false);
- syscall_printf ("%R = sigaction(%d, %p, %p)", res, sig, newact, oldact);
- return res;
+ return sigaction_worker (sig, newact, oldact, false, "sigaction");
}
extern "C" int
@@ -517,25 +518,19 @@ sigfillset (sigset_t *set)
extern "C" int
sigsuspend (const sigset_t *set)
{
- int res = handle_sigsuspend (*set);
- syscall_printf ("%R = sigsuspend(%p)", res, set);
- return res;
+ return handle_sigsuspend (*set);
}
extern "C" int
sigpause (int signal_mask)
{
- int res = handle_sigsuspend ((sigset_t) signal_mask);
- syscall_printf ("%R = sigpause(%p)", res, signal_mask);
- return res;
+ return handle_sigsuspend ((sigset_t) signal_mask);
}
extern "C" int
pause (void)
{
- int res = handle_sigsuspend (_my_tls.sigmask);
- syscall_printf ("%R = pause()", res);
- return res;
+ return handle_sigsuspend (_my_tls.sigmask);
}
extern "C" int
@@ -553,9 +548,7 @@ siginterrupt (int sig, int flag)
act.sa_flags &= ~_SA_NORESTART;
act.sa_flags |= SA_RESTART;
}
- int res = sigaction_worker (sig, &act, NULL, true);
- syscall_printf ("%R = siginterrupt(%d, %p)", sig, flag);
- return res;
+ return sigaction_worker (sig, &act, NULL, true, "siginterrupt");
}
extern "C" int
@@ -571,18 +564,21 @@ extern "C" int
sigwaitinfo (const sigset_t *set, siginfo_t *info)
{
pthread_testcancel ();
+ HANDLE h;
+ h = _my_tls.event = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
+ if (!h)
+ {
+ __seterrno ();
+ return -1;
+ }
- myfault efault;
- if (efault.faulted (EFAULT))
- return EFAULT;
-
- set_signal_mask (_my_tls.sigwait_mask, *set);
+ _my_tls.sigwait_mask = *set;
sig_dispatch_pending (true);
int res;
- switch (cancelable_wait (NULL, cw_infinite, cw_sig_eintr | cw_cancel | cw_cancel_self))
+ switch (WaitForSingleObject (h, INFINITE))
{
- case WAIT_SIGNALED:
+ case WAIT_OBJECT_0:
if (!sigismember (set, _my_tls.infodata.si_signo))
{
set_errno (EINTR);
@@ -601,6 +597,8 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info)
res = -1;
}
+ _my_tls.event = NULL;
+ CloseHandle (h);
sigproc_printf ("returning signal %d", res);
return res;
}
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index d893fc2d8..a8a85ebb6 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -43,10 +43,14 @@ int __sp_ln;
char NO_COPY myself_nowait_dummy[1] = {'0'};// Flag to sig_send that signal goes to
// current process but no wait is required
+HANDLE NO_COPY signal_arrived; // Event signaled when a signal has
+ // resulted in a user-specified
+ // function call
#define Static static NO_COPY
-Static HANDLE sig_hold; // Used to stop signal processing
+HANDLE NO_COPY sigCONT; // Used to "STOP" a process
+
Static bool sigheld; // True if holding signals
Static int nprocs; // Number of deceased children
@@ -441,17 +445,9 @@ proc_terminate ()
/* Clean out proc processes from the pid list. */
for (int i = 0; i < nprocs; i++)
{
- /* If we've execed then the execed process will handle setting ppid
- to 1 iff it is a Cygwin process. */
- if (!have_execed || !have_execed_cygwin)
- procs[i]->ppid = 1;
+ procs[i]->ppid = 1;
if (procs[i].wait_thread)
procs[i].wait_thread->terminate_thread ();
- /* Release memory associated with this process unless it is 'myself'.
- 'myself' is only in the procs table when we've execed. We reach
- here when the next process has finished initializing but we still
- can't free the memory used by 'myself' since it is used later on
- during cygwin tear down. */
if (procs[i] != myself)
procs[i].release ();
}
@@ -514,6 +510,17 @@ sig_dispatch_pending (bool fast)
sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
}
+void __stdcall
+create_signal_arrived ()
+{
+ if (signal_arrived)
+ return;
+ /* local event signaled when main thread has been dispatched
+ to a signal handler function. */
+ signal_arrived = CreateEvent (&sec_none_nih, false, false, NULL);
+ ProtectHandle (signal_arrived);
+}
+
/* Signal thread initialization. Called from dll_crt0_1.
This routine starts the signal handling thread. */
void __stdcall
@@ -522,8 +529,7 @@ sigproc_init ()
char char_sa_buf[1024];
PSECURITY_ATTRIBUTES sa = sec_user_nih ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid());
DWORD err = fhandler_pipe::create (sa, &my_readsig, &my_sendsig,
- sizeof (sigpacket), "sigwait",
- PIPE_ADD_PID);
+ sizeof (sigpacket), NULL, 0);
if (err)
{
SetLastError (err);
@@ -567,7 +573,7 @@ sig_send (_pinfo *p, int sig)
return 0;
else if (sig == __SIGNOHOLD || sig == __SIGEXIT)
{
- SetEvent (sig_hold);
+ SetEvent (sigCONT);
sigheld = false;
}
else if (&_my_tls == _main_tls)
@@ -1218,7 +1224,7 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child)
int might_match;
waitq *w = parent_w->next;
- sigproc_printf ("considering pid %d, pgid %d, w->pid %d", child->pid, child->pgid, w->pid);
+ sigproc_printf ("considering pid %d", child->pid);
if (w->pid == -1)
might_match = 1;
else if (w->pid == 0)
@@ -1344,7 +1350,7 @@ static void WINAPI
wait_sig (VOID *)
{
_sig_tls = &_my_tls;
- sig_hold = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
+ sigCONT = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
sigproc_printf ("entering ReadFile loop, my_readsig %p, my_sendsig %p",
my_readsig, my_sendsig);
@@ -1354,7 +1360,7 @@ wait_sig (VOID *)
for (;;)
{
if (pack.si.si_signo == __SIGHOLD)
- WaitForSingleObject (sig_hold, INFINITE);
+ WaitForSingleObject (sigCONT, INFINITE);
DWORD nb;
pack.tls = NULL;
if (!ReadFile (my_readsig, &pack, sizeof (pack), &nb, NULL))
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index 06ebd68d8..a86c6bc42 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -58,9 +58,13 @@ struct sigpacket
int __stdcall process () __attribute__ ((regparm (1)));
};
-void __stdcall sig_dispatch_pending (bool fast = false)
- __attribute__ ((regparm (1)));
-void set_signal_mask (sigset_t&, sigset_t) __attribute__ ((regparm (2)));
+extern HANDLE signal_arrived;
+extern HANDLE sigCONT;
+
+void __stdcall sig_dispatch_pending (bool fast = false);
+#ifdef EXITCODE_SET
+extern "C" void __stdcall set_signal_mask (sigset_t newmask, sigset_t&);
+#endif
int __stdcall handle_sigprocmask (int sig, const sigset_t *set,
sigset_t *oldset, sigset_t& opmask)
__attribute__ ((regparm (3)));
@@ -76,12 +80,40 @@ void __stdcall proc_terminate ();
void __stdcall sigproc_init ();
#ifdef __INSIDE_CYGWIN__
void __stdcall sigproc_terminate (enum exit_states);
+
+static inline DWORD __attribute__ ((always_inline))
+cygwait (HANDLE h, DWORD howlong = INFINITE)
+{
+ HANDLE w4[3];
+ DWORD n = 0;
+ DWORD wait_signal;
+ if ((w4[n] = h) != NULL)
+ wait_signal = WAIT_OBJECT_0 + ++n;
+ else
+ wait_signal = WAIT_OBJECT_0 + 15; /* Arbitrary. Don't call signal
+ handler if only waiting for signal */
+ w4[n++] = signal_arrived;
+ if ((w4[n] = pthread::get_cancel_event ()) != NULL)
+ n++;
+ DWORD res;
+ while ((res = WaitForMultipleObjects (n, w4, FALSE, howlong)) == wait_signal
+ && (_my_tls.call_signal_handler () || &_my_tls != _main_tls))
+ continue;
+ return res;
+}
+
+static inline DWORD __attribute__ ((always_inline))
+cygwait (DWORD wait)
+{
+ return cygwait ((HANDLE) NULL, wait);
+}
#endif
bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1)));
int __stdcall sig_send (_pinfo *, siginfo_t&, class _cygtls *tls = NULL) __attribute__ ((regparm (3)));
int __stdcall sig_send (_pinfo *, int) __attribute__ ((regparm (2)));
void __stdcall signal_fixup_after_exec ();
void __stdcall sigalloc ();
+void __stdcall create_signal_arrived ();
int kill_pgrp (pid_t, siginfo_t&);
int killsys (pid_t, int);
diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc
index fa7706b47..1ca7ca817 100644
--- a/winsup/cygwin/smallprint.cc
+++ b/winsup/cygwin/smallprint.cc
@@ -147,15 +147,15 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
continue;
case 'c':
{
- unsigned char c = (va_arg (ap, int) & 0xff);
- if (isprint (c) || pad != '0')
+ int c = va_arg (ap, int);
+ if (c > ' ' && c <= 127)
*dst++ = c;
else
- {
- *dst++ = '0';
- *dst++ = 'x';
- dst = __rn (dst, 16, 0, c, len, pad, LMASK);
- }
+ {
+ *dst++ = '0';
+ *dst++ = 'x';
+ dst = __rn (dst, 16, 0, c, len, pad, LMASK);
+ }
}
break;
case 'C':
@@ -164,7 +164,14 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
char buf[4], *c;
sys_wcstombs (buf, 4, &wc, 1);
for (c = buf; *c; ++c)
- *dst++ = *c;
+ if (isprint (*c))
+ *dst++ = *c;
+ else
+ {
+ *dst++ = '0';
+ *dst++ = 'x';
+ dst = __rn (dst, 16, 0, *c, len, pad, LMASK);
+ }
}
case 'E':
strcpy (dst, "Win32 error ");
@@ -438,7 +445,17 @@ __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap)
continue;
case L'c':
case L'C':
- *dst++ = va_arg (ap, unsigned);
+ {
+ unsigned int c = va_arg (ap, unsigned int);
+ if (c > L' ' && c <= 127)
+ *dst++ = c;
+ else
+ {
+ *dst++ = L'0';
+ *dst++ = L'x';
+ dst = __wrn (dst, 16, 0, c, len, pad, LMASK);
+ }
+ }
break;
case L'E':
wcscpy (dst, L"Win32 error ");
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 8a82f8a11..c05c7af9f 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -422,10 +422,10 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
moreinfo->argc = newargv.argc;
moreinfo->argv = newargv;
- if (mode != _P_OVERLAY || !real_path.iscygexec ()
- || !DuplicateHandle (GetCurrentProcess (), myself.shared_handle (),
- GetCurrentProcess (), &moreinfo->myself_pinfo,
- 0, TRUE, DUPLICATE_SAME_ACCESS))
+ if (mode != _P_OVERLAY ||
+ !DuplicateHandle (GetCurrentProcess (), myself.shared_handle (),
+ GetCurrentProcess (), &moreinfo->myself_pinfo,
+ 0, TRUE, DUPLICATE_SAME_ACCESS))
moreinfo->myself_pinfo = NULL;
else
VerifyHandle (moreinfo->myself_pinfo);
@@ -453,7 +453,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
c_flags |= CREATE_SEPARATE_WOW_VDM | CREATE_UNICODE_ENVIRONMENT;
- if (wincap.has_program_compatibility_assistant ())
+ if (wincap.has_program_compatibility_assitant ())
{
/* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround
issues with the "Program Compatibility Assistant (PCA) Service"
@@ -517,6 +517,17 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
myself->sendsig = NULL;
reset_sendsig = true;
}
+ /* Save a copy of a handle to the current process around the first time we
+ exec so that the pid will not be reused. Why did I stop cygwin from
+ generating its own pids again? */
+ if (::cygheap->pid_handle)
+ /* already done previously */;
+ else if (DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (),
+ GetCurrentProcess (), &::cygheap->pid_handle,
+ PROCESS_QUERY_INFORMATION, TRUE, 0))
+ ProtectHandleINH (::cygheap->pid_handle);
+ else
+ system_printf ("duplicate to pid_handle failed, %E");
}
if (null_app_name)
@@ -596,7 +607,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
in a console will break native processes running in the background,
because the Ctrl-C event is sent to all processes in the console, unless
they ignore it explicitely. CREATE_NEW_PROCESS_GROUP does that for us. */
- if (!iscygwin () && fhandler_console::exists ()
+ if (!iscygwin () && myself->ctty >= 0 && iscons_dev (myself->ctty)
&& fhandler_console::tc_getpgid () != myself->pgid)
c_flags |= CREATE_NEW_PROCESS_GROUP;
refresh_cygheap ();
@@ -608,20 +619,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
else
wr_proc_pipe = my_wr_proc_pipe;
- /* Don't allow child to inherit these handles if it's not a Cygwin program.
- wr_proc_pipe will be injected later. parent won't be used by the child
- so there is no reason for the child to have it open as it can confuse
- ps into thinking that children of windows processes are all part of
- the same "execed" process.
- FIXME: Someday, make it so that parent is never created when starting
- non-Cygwin processes. */
- if (!iscygwin ())
- {
- SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, 0);
- SetHandleInformation (parent, HANDLE_FLAG_INHERIT, 0);
- }
- parent_winpid = GetCurrentProcessId ();
-
/* When ruid != euid we create the new process under the current original
account and impersonate in child, this way maintaining the different
effective vs. real ids.
@@ -743,12 +740,6 @@ loop:
myself->exec_sendsig = NULL;
}
myself->process_state &= ~PID_NOTCYGWIN;
- /* Reset handle inheritance to default when the execution of a non-Cygwin
- process fails. Only need to do this for _P_OVERLAY since the handle will
- be closed otherwise. Don't need to do this for 'parent' since it will
- be closed in every case. See FIXME above. */
- if (!iscygwin () && mode == _P_OVERLAY)
- SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
if (wr_proc_pipe == my_wr_proc_pipe)
wr_proc_pipe = NULL; /* We still own it: don't nuke in destructor */
res = -1;
@@ -770,7 +761,7 @@ loop:
cygpid = myself->pid;
/* We print the original program name here so the user can see that too. */
- syscall_printf ("pid %d, prog_arg %s, cmd line %.9500s)",
+ syscall_printf ("%d = child_info_spawn::worker(%s, %.9500s)",
rc ? cygpid : (unsigned int) -1, prog_arg, one_line.buf);
/* Name the handle similarly to proc_subproc. */
@@ -830,12 +821,6 @@ loop:
/* Start the child running */
if (c_flags & CREATE_SUSPENDED)
{
- /* Inject a non-inheritable wr_proc_pipe handle into child so that we
- can accurately track when the child exits without keeping this
- process waiting around for it to exit. */
- if (!iscygwin ())
- DuplicateHandle (GetCurrentProcess (), wr_proc_pipe, pi.hProcess, NULL,
- 0, false, DUPLICATE_SAME_ACCESS);
ResumeThread (pi.hThread);
if (iscygwin ())
strace.write_childpid (pi.dwProcessId);
@@ -848,9 +833,7 @@ loop:
if ((mode == _P_DETACH || mode == _P_NOWAIT) && !iscygwin ())
synced = false;
else
- /* Just mark a non-cygwin process as 'synced'. We will still eventually
- wait for it to exit in maybe_set_exit_code_from_windows(). */
- synced = iscygwin () ? sync (pi.dwProcessId, pi.hProcess, INFINITE) : true;
+ synced = sync (pi.dwProcessId, pi.hProcess, INFINITE);
switch (mode)
{
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index 60e56fe5f..49b4c5ab9 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -1,7 +1,7 @@
/* strace.cc: system/windows tracing
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -59,6 +59,8 @@ strace::activate (bool isfork)
prntf (1, NULL, "**********************************************");
prntf (1, NULL, "Program name: %W %s", progname, pidbuf);
prntf (1, NULL, "OS version: Windows %s", wincap.osname ());
+ if (cygheap && cygheap->user_heap.chunk)
+ prntf (1, NULL, "Heap size: %u", cygheap->user_heap.chunk);
prntf (1, NULL, "**********************************************");
}
}
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc
index 22ba4d619..467f54e87 100644
--- a/winsup/cygwin/strfuncs.cc
+++ b/winsup/cygwin/strfuncs.cc
@@ -393,23 +393,9 @@ __big5_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n,
sequence in by treating it as an UTF-8 char. If that fails, the ASCII
CAN was probably standalone and it gets just copied over as ASCII CAN.
- - Three cases have to be distinguished for the return value:
-
- - dst == NULL; len is ignored, the return value is the number of bytes
- required for the string without the trailing NUL, just like the return
- value of the wcstombs function.
-
- - dst != NULL, len == (size_t) -1; the return value is the size in bytes
- of the destination string without the trailing NUL. If the incoming
- wide char string was not NUL-terminated, the target string won't be
- NUL-terminated either.
-
- - dst != NULL; len != (size_t) -1; the return value is the size in bytes
- of the destination string without the trailing NUL. The target string
- will be NUL-terminated, no matter what. If the result is truncated due
- to buffer size, it's a bug in Cygwin and the buffer in the calling
- function should be raised.
-*/
+ - The functions always create 0-terminated results, no matter what.
+ If the result is truncated due to buffer size, it's a bug in Cygwin
+ and the buffer in the calling function should be raised. */
size_t __stdcall
sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
const wchar_t *src, size_t nwc)
@@ -487,7 +473,7 @@ sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
else
break;
}
- if (n && dst && len != (size_t) -1)
+ if (n && dst)
{
n = (n < len) ? n : len - 1;
dst[n] = '\0';
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 1b047aaff..3ea4a6f8b 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -126,18 +126,6 @@ dup (int fd)
return res;
}
-inline int
-dup_finish (int oldfd, int newfd, int flags)
-{
- int res;
- if ((res = cygheap->fdtab.dup3 (oldfd, newfd, flags | O_EXCL)) == newfd)
- {
- cygheap_fdget (newfd)->inc_refcnt ();
- cygheap->fdtab.unlock (); /* dup3 exits with lock set on success */
- }
- return res;
-}
-
extern "C" int
dup2 (int oldfd, int newfd)
{
@@ -152,8 +140,8 @@ dup2 (int oldfd, int newfd)
cygheap_fdget cfd (oldfd);
res = (cfd >= 0) ? oldfd : -1;
}
- else
- res = dup_finish (oldfd, newfd, 0);
+ else if ((res = cygheap->fdtab.dup3 (oldfd, newfd, 0)) == newfd)
+ cygheap->fdtab[newfd]->refcnt (1);
syscall_printf ("%R = dup2(%d, %d)", res, oldfd, newfd);
return res;
@@ -174,8 +162,8 @@ dup3 (int oldfd, int newfd, int flags)
set_errno (cfd < 0 ? EBADF : EINVAL);
res = -1;
}
- else
- res = dup_finish (oldfd, newfd, flags);
+ else if ((res = cygheap->fdtab.dup3 (oldfd, newfd, flags)) == newfd)
+ cygheap->fdtab[newfd]->refcnt (1);
syscall_printf ("%R = dup3(%d, %d, %p)", res, oldfd, newfd, flags);
return res;
@@ -212,12 +200,7 @@ stop_transaction (NTSTATUS status, HANDLE old_trans, HANDLE trans)
}
static char desktop_ini[] =
- "[.ShellClassInfo]\r\n"
- "CLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n";
-
-static char desktop_ini_ext[] =
- "LocalizedResourceName=@%SystemRoot%\\system32\\shell32.dll,-8964\r\n";
-
+ "[.ShellClassInfo]\r\nCLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n";
static BYTE info2[] =
{
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -228,8 +211,7 @@ enum bin_status
{
dont_move,
move_to_bin,
- has_been_moved,
- dir_not_empty
+ has_been_moved
};
static bin_status
@@ -246,9 +228,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
PFILE_NAME_INFORMATION pfni;
PFILE_INTERNAL_INFORMATION pfii;
PFILE_RENAME_INFORMATION pfri;
- ULONG frisiz;
FILE_DISPOSITION_INFORMATION disp = { TRUE };
- bool fs_has_per_user_recycler = pc.fs_is_ntfs () || pc.fs_is_refs ();
tmp_pathbuf tp;
PBYTE infobuf = (PBYTE) tp.w_get ();
@@ -273,8 +253,8 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
RtlInitEmptyUnicodeString (&recycler, recyclerbuf, sizeof recyclerbuf);
if (!pc.isremote ())
{
- if (wincap.has_recycle_dot_bin ()) /* NTFS and FAT since Vista, ReFS */
- RtlAppendUnicodeToString (&recycler, L"\\$RECYCLE.BIN\\");
+ if (wincap.has_recycle_dot_bin ()) /* NTFS and FAT since Vista */
+ RtlAppendUnicodeToString (&recycler, L"\\$Recycle.Bin\\");
else if (pc.fs_is_ntfs ()) /* NTFS up to 2K3 */
RtlAppendUnicodeToString (&recycler, L"\\RECYCLER\\");
else if (pc.fs_is_fat ()) /* FAT up to 2K3 */
@@ -311,10 +291,10 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
recycler.Length -= sizeof (WCHAR);
/* Store length of recycler base dir, if it's necessary to create it. */
recycler_base_len = recycler.Length;
- /* On NTFS or ReFS the recycler dir contains user specific subdirs, which
- are the actual recycle bins per user. The name if this dir is the
- string representation of the user SID. */
- if (fs_has_per_user_recycler)
+ /* On NTFS the recycler dir contains user specific subdirs, which are the
+ actual recycle bins per user. The name if this dir is the string
+ representation of the user SID. */
+ if (pc.fs_is_ntfs ())
{
UNICODE_STRING sid;
WCHAR sidbuf[128];
@@ -341,10 +321,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
pc.fs_flags () & FILE_UNICODE_ON_DISK
? L".\xdc63\xdc79\xdc67" : L".cyg");
pfii = (PFILE_INTERNAL_INFORMATION) infobuf;
- /* Note: Modern Samba versions apparently don't like buffer sizes of more
- than 65535 in some NtQueryInformationFile/NtSetInformationFile calls.
- Therefore we better use exact buffer sizes from now on. */
- status = NtQueryInformationFile (fh, &io, pfii, sizeof *pfii,
+ status = NtQueryInformationFile (fh, &io, pfii, 65536,
FileInternalInformation);
if (!NT_SUCCESS (status))
{
@@ -361,15 +338,12 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
pfri->RootDirectory = pc.isremote () ? NULL : rootdir;
pfri->FileNameLength = recycler.Length;
memcpy (pfri->FileName, recycler.Buffer, recycler.Length);
- frisiz = sizeof *pfri + pfri->FileNameLength - sizeof (WCHAR);
- status = NtSetInformationFile (fh, &io, pfri, frisiz, FileRenameInformation);
+ status = NtSetInformationFile (fh, &io, pfri, 65536, FileRenameInformation);
if (status == STATUS_OBJECT_PATH_NOT_FOUND && !pc.isremote ())
{
/* Ok, so the recycler and/or the recycler/SID directory don't exist.
First reopen root dir with permission to create subdirs. */
NtClose (rootdir);
- InitializeObjectAttributes (&attr, &root, OBJ_CASE_INSENSITIVE,
- NULL, NULL);
status = NtOpenFile (&rootdir, FILE_ADD_SUBDIRECTORY, &attr, &io,
FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
if (!NT_SUCCESS (status))
@@ -380,17 +354,14 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
}
/* Then check if recycler exists by opening and potentially creating it.
Yes, we can really do that. Typically the recycle bin is created
- by the first user actually using the bin. Pre-Vista, the permissions
- are the default permissions propagated from the root directory.
- Since Vista the top-level recycle dir has explicit permissions. */
+ by the first user actually using the bin. The permissions are the
+ default permissions propagated from the root directory. */
InitializeObjectAttributes (&attr, &recycler, OBJ_CASE_INSENSITIVE,
- rootdir,
- wincap.has_recycle_dot_bin ()
- ? recycler_sd (true, true) : NULL);
+ rootdir, NULL);
recycler.Length = recycler_base_len;
status = NtCreateFile (&recyclerdir,
READ_CONTROL
- | (fs_has_per_user_recycler ? 0 : FILE_ADD_FILE),
+ | (pc.fs_is_ntfs () ? 0 : FILE_ADD_FILE),
&attr, &io, NULL,
FILE_ATTRIBUTE_DIRECTORY
| FILE_ATTRIBUTE_SYSTEM
@@ -405,12 +376,10 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
}
/* Next, if necessary, check if the recycler/SID dir exists and
create it if not. */
- if (fs_has_per_user_recycler)
+ if (pc.fs_is_ntfs ())
{
NtClose (recyclerdir);
recycler.Length = recycler_user_len;
- InitializeObjectAttributes (&attr, &recycler, OBJ_CASE_INSENSITIVE,
- rootdir, recycler_sd (false, true));
status = NtCreateFile (&recyclerdir, READ_CONTROL | FILE_ADD_FILE,
&attr, &io, NULL, FILE_ATTRIBUTE_DIRECTORY
| FILE_ATTRIBUTE_SYSTEM
@@ -431,7 +400,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
{
RtlInitUnicodeString (&fname, L"desktop.ini");
InitializeObjectAttributes (&attr, &fname, OBJ_CASE_INSENSITIVE,
- recyclerdir, recycler_sd (false, false));
+ recyclerdir, NULL);
status = NtCreateFile (&tmp_fh, FILE_GENERIC_WRITE, &attr, &io, NULL,
FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN,
FILE_SHARE_VALID_FLAGS, FILE_CREATE,
@@ -447,15 +416,6 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
if (!NT_SUCCESS (status))
debug_printf ("NtWriteFile (%S) failed, status = %p",
&fname, status);
- else if (wincap.has_recycle_dot_bin ())
- {
- status = NtWriteFile (tmp_fh, NULL, NULL, NULL, &io,
- desktop_ini_ext,
- sizeof desktop_ini_ext - 1, NULL, NULL);
- if (!NT_SUCCESS (status))
- debug_printf ("NtWriteFile (%S) failed, status = %p",
- &fname, status);
- }
NtClose (tmp_fh);
}
if (!wincap.has_recycle_dot_bin ()) /* No INFO2 file since Vista */
@@ -483,7 +443,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
}
NtClose (recyclerdir);
/* Shoot again. */
- status = NtSetInformationFile (fh, &io, pfri, frisiz,
+ status = NtSetInformationFile (fh, &io, pfri, 65536,
FileRenameInformation);
}
if (!NT_SUCCESS (status))
@@ -499,26 +459,6 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
Otherwise the below code closes the handle to allow replacing the file. */
status = NtSetInformationFile (fh, &io, &disp, sizeof disp,
FileDispositionInformation);
- if (status == STATUS_DIRECTORY_NOT_EMPTY)
- {
- /* Uh oh! This was supposed to be avoided by the check_dir_not_empty
- test in unlink_nt, but given that the test isn't atomic, this *can*
- happen. Try to move the dir back ASAP. */
- pfri->RootDirectory = NULL;
- pfri->FileNameLength = pc.get_nt_native_path ()->Length;
- memcpy (pfri->FileName, pc.get_nt_native_path ()->Buffer,
- pc.get_nt_native_path ()->Length);
- frisiz = sizeof *pfri + pfri->FileNameLength - sizeof (WCHAR);
- if (NT_SUCCESS (NtSetInformationFile (fh, &io, pfri, frisiz,
- FileRenameInformation)))
- {
- /* Give notice to unlink_nt and leave immediately. This avoids
- closing the handle, which might still be used if called from
- the rm -r workaround code. */
- bin_stat = dir_not_empty;
- goto out;
- }
- }
/* In case of success, restore R/O attribute to accommodate hardlinks.
That leaves potentially hardlinks around with the R/O bit suddenly
off if setting the delete disposition failed, but please, keep in
@@ -550,7 +490,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
status);
goto out;
}
- status = NtSetInformationFile (tmp_fh, &io, pfri, frisiz,
+ status = NtSetInformationFile (tmp_fh, &io, pfri, 65536,
FileRenameInformation);
NtClose (tmp_fh);
if (!NT_SUCCESS (status))
@@ -717,45 +657,46 @@ unlink_nt (path_conv &pc)
if a file is already open elsewhere for other purposes than
reading and writing data. */
status = NtOpenFile (&fh, access, &attr, &io, FILE_SHARE_DELETE, flags);
- /* STATUS_SHARING_VIOLATION is what we expect. STATUS_LOCK_NOT_GRANTED can
- be generated under not quite clear circumstances when trying to open a
- file on NFS with FILE_SHARE_DELETE only. This has been observed with
- SFU 3.5 if the NFS share has been mounted under a drive letter. It's
- not generated for all files, but only for some. If it's generated once
- for a file, it will be generated all the time. It looks as if wrong file
- state information is stored within the NFS client which never times out.
- Opening the file with FILE_SHARE_VALID_FLAGS will work, though, and it
- is then possible to delete the file quite normally. */
if (status == STATUS_SHARING_VIOLATION || status == STATUS_LOCK_NOT_GRANTED)
{
- debug_printf ("Sharing violation when opening %S",
- pc.get_nt_native_path ());
- /* We never call try_to_bin on NFS and NetApp for the follwing reasons:
-
- NFS implements its own mechanism to remove in-use files, which looks
- quite similar to what we do in try_to_bin for remote files.
+ /* STATUS_LOCK_NOT_GRANTED can be generated under not quite clear
+ circumstances when trying to open a file on NFS with FILE_SHARE_DELETE
+ only. This has been observed with SFU 3.5 if the NFS share has been
+ mounted under a drive letter. It's not generated for all files, but
+ only for some. If it's generated once for a file, it will be
+ generated all the time. It looks like wrong file state information
+ is stored within the NFS client, for no apparent reason, which never
+ times out. Opening the file with FILE_SHARE_VALID_FLAGS will work,
+ though, and it is then possible to delete the file quite normally.
+
+ NFS implements its own mechanism to remove in-use files which
+ looks quite similar to what we do in try_to_bin for remote files.
+ That's why we don't call try_to_bin on NFS.
Netapp filesystems don't understand the "move and delete" method
at all and have all kinds of weird effects. Just setting the delete
dispositon usually works fine, though. */
+ debug_printf ("Sharing violation when opening %S",
+ pc.get_nt_native_path ());
if (!pc.fs_is_nfs () && !pc.fs_is_netapp ())
bin_stat = move_to_bin;
- /* If the file is not a directory, of if we didn't set the move_to_bin
- flag, just proceed with the FILE_SHARE_VALID_FLAGS set. */
- if (!pc.isdir () || bin_stat == dont_move)
+ if (!pc.isdir () || pc.isremote ())
status = NtOpenFile (&fh, access, &attr, &io,
FILE_SHARE_VALID_FLAGS, flags);
else
{
- /* Otherwise it's getting tricky. The directory is opened in some
- process, so we're supposed to move it to the recycler and mark it
- for deletion. But what if the directory is not empty? The move
+ /* It's getting tricky. The directory is opened in some process,
+ so we're supposed to move it to the recycler and mark it for
+ deletion. But what if the directory is not empty? The move
will work, but the subsequent delete will fail. So we would
- have to move it back. While we do that in try_to_bin, it's bad,
- because the move results in a temporary inconsistent state.
- So, we test first if the directory is empty. If not, we bail
- out with STATUS_DIRECTORY_NOT_EMPTY. This avoids most of the
- problems. */
+ have to move it back. That's bad, because the directory would
+ be moved around which results in a temporary inconsistent state.
+ So, what we do here is to test if the directory is empty. If
+ not, we bail out with STATUS_DIRECTORY_NOT_EMPTY. The below code
+ tests for at least three entries in the directory, ".", "..",
+ and another one. Three entries means, not empty. This doesn't
+ work for the root directory of a drive, but the root dir can
+ neither be deleted, nor moved anyway. */
status = NtOpenFile (&fh, access | FILE_LIST_DIRECTORY | SYNCHRONIZE,
&attr, &io, FILE_SHARE_VALID_FLAGS,
flags | FILE_SYNCHRONOUS_IO_NONALERT);
@@ -789,15 +730,9 @@ unlink_nt (path_conv &pc)
/* Try to move to bin if a sharing violation occured. If that worked,
we're done. */
if (bin_stat == move_to_bin
- && (bin_stat = try_to_bin (pc, fh, access)) >= has_been_moved)
+ && (bin_stat = try_to_bin (pc, fh, access)) == has_been_moved)
{
- if (bin_stat == has_been_moved)
- status = STATUS_SUCCESS;
- else
- {
- status = STATUS_DIRECTORY_NOT_EMPTY;
- NtClose (fh);
- }
+ status = STATUS_SUCCESS;
goto out;
}
@@ -862,7 +797,6 @@ try_again:
bin_stat = try_to_bin (pc, fh, access);
}
}
- /* Do NOT handle bin_stat == dir_not_empty here! */
if (bin_stat == has_been_moved)
status = STATUS_SUCCESS;
else
@@ -874,15 +808,12 @@ try_again:
}
}
}
- else if (status2 != STATUS_OBJECT_PATH_NOT_FOUND
- && status2 != STATUS_OBJECT_NAME_NOT_FOUND)
+ else
{
fh = NULL;
debug_printf ("Opening dir %S for check_dir_not_empty failed, "
"status = %p", pc.get_nt_native_path (), status2);
}
- else /* Directory disappeared between NtClose and NtOpenFile. */
- status = STATUS_SUCCESS;
}
/* Trying to delete a hardlink to a file in use by the system in some
way (for instance, font files) by setting the delete disposition fails
@@ -920,10 +851,8 @@ try_again:
unlinking didn't work. */
if (bin_stat == dont_move)
bin_stat = try_to_bin (pc, fh, access);
- if (bin_stat >= has_been_moved)
- status = bin_stat == has_been_moved
- ? STATUS_SUCCESS
- : STATUS_DIRECTORY_NOT_EMPTY;
+ if (bin_stat == has_been_moved)
+ status = STATUS_SUCCESS;
}
else
NtClose (fh2);
@@ -933,7 +862,7 @@ try_again:
{
if (access & FILE_WRITE_ATTRIBUTES)
{
- /* Restore R/O attribute if setting the delete disposition failed. */
+ /* Restore R/O attribute if setting the delete dispostion failed. */
if (!NT_SUCCESS (status))
NtSetAttributesFile (fh, pc.file_attributes ());
/* If we succeeded, restore R/O attribute to accommodate hardlinks.
@@ -1662,11 +1591,10 @@ static bool dev_st_inited;
void
fhandler_base::stat_fixup (struct __stat64 *buf)
{
- /* For devices, set inode number to device number. This gives us a valid,
- unique inode number without having to call hash_path_name. */
+ /* Set inode number to device number. This gives us a valid, unique
+ inode number and we especially don't have to call hash_path_name. */
if (!buf->st_ino)
- buf->st_ino = (get_major () == DEV_VIRTFS_MAJOR) ? get_ino ()
- : get_device ();
+ buf->st_ino = get_device ();
/* For /dev-based devices, st_dev must be set to the device number of /dev,
not it's own device major/minor numbers. What we do here to speed up
the process is to fetch the device number of /dev only once, liberally
@@ -2332,7 +2260,7 @@ retry:
{
debug_printf ("status %p", status);
if (status == STATUS_SHARING_VIOLATION
- && cygwait (10L) != WAIT_SIGNALED)
+ && WaitForSingleObject (signal_arrived, 10L) != WAIT_OBJECT_0)
{
/* Typical BLODA problem. Some virus scanners check newly generated
files and while doing that disallow DELETE access. That's really
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc
index aeba5a926..6d42f1b00 100644
--- a/winsup/cygwin/syslog.cc
+++ b/winsup/cygwin/syslog.cc
@@ -1,7 +1,7 @@
/* syslog.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2009, 2011, 2012 Red Hat, Inc.
+ 2006, 2007, 2009, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -10,15 +10,15 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#define __INSIDE_CYGWIN_NET__
-#define USE_SYS_TYPES_FD_SET
+
#include "winsup.h"
-#include <ws2tcpip.h>
-#include <iphlpapi.h>
#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
#include <unistd.h>
#include <sys/un.h>
+#include <netinet/in.h>
+#include <iphlpapi.h>
#include "cygerrno.h"
#include "security.h"
#include "path.h"
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index aefab24cd..af0d6afc7 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -32,7 +32,6 @@ details. */
#include "dtable.h"
#include "cygheap.h"
#include "ntdll.h"
-#include "cygwait.h"
extern "C" void __fp_lock_all ();
extern "C" void __fp_unlock_all ();
@@ -432,18 +431,8 @@ pthread::precreate (pthread_attr *newattr)
magic = 0;
return;
}
- /* This mutex MUST be recursive. Consider the following scenario:
- - The thread installs a cleanup handler.
- - The cleanup handler calls a function which itself installs a
- cleanup handler.
- - pthread_cancel is called for this thread.
- - The thread's cleanup handler is called under mutex lock condition.
- - The cleanup handler calls the subsequent function with cleanup handler.
- - The function runs to completion, so it calls pthread_cleanup_pop.
- - pthread_cleanup_pop calls pthread::pop_cleanup_handler which will again
- try to lock the mutex.
- - Deadlock. */
- mutex.set_type (PTHREAD_MUTEX_RECURSIVE);
+ /* Change the mutex type to NORMAL to speed up mutex operations */
+ mutex.set_type (PTHREAD_MUTEX_NORMAL);
if (!create_cancel_event ())
magic = 0;
}
@@ -573,27 +562,10 @@ pthread::cancel ()
CONTEXT context;
context.ContextFlags = CONTEXT_CONTROL;
GetThreadContext (win32_obj_id, &context);
- /* The OS is not foolproof in terms of asynchronous thread cancellation
- and tends to hang infinitely if we change the instruction pointer.
- So just don't cancel asynchronously if the thread is currently
- executing Windows code. Rely on deferred cancellation in this case. */
- if (!cygtls->inside_kernel (&context))
- {
- context.Eip = (DWORD) pthread::static_cancel_self;
- SetThreadContext (win32_obj_id, &context);
- }
+ context.Eip = (DWORD) pthread::static_cancel_self;
+ SetThreadContext (win32_obj_id, &context);
}
mutex.unlock ();
- /* See above. For instance, a thread which waits for a semaphore in sem_wait
- will call cancelable_wait which in turn calls WFMO. While this WFMO call
- is cancelable by setting the thread's cancel_event object, the OS
- apparently refuses to set the thread's context and continues to wait for
- the WFMO conditions. This is *not* reflected in the return value of
- SetThreadContext or ResumeThread, btw.
- So, what we do here is to set the cancel_event as well to allow at least
- a deferred cancel. */
- canceled = true;
- SetEvent (cancel_event);
ResumeThread (win32_obj_id);
return 0;
@@ -938,6 +910,92 @@ pthread::static_cancel_self ()
pthread::self ()->cancel_self ();
}
+DWORD
+cancelable_wait (HANDLE object, PLARGE_INTEGER timeout,
+ const cw_cancel_action cancel_action,
+ const enum cw_sig_wait sig_wait)
+{
+ DWORD res;
+ DWORD num = 0;
+ HANDLE wait_objects[4];
+ pthread_t thread = pthread::self ();
+
+ /* Do not change the wait order.
+ The object must have higher priority than the cancel event,
+ because WaitForMultipleObjects will return the smallest index
+ if both objects are signaled. */
+ wait_objects[num++] = object;
+ DWORD cancel_n;
+ if (cancel_action == cw_no_cancel || !pthread::is_good_object (&thread) ||
+ thread->cancelstate == PTHREAD_CANCEL_DISABLE)
+ cancel_n = WAIT_TIMEOUT + 1;
+ else
+ {
+ cancel_n = WAIT_OBJECT_0 + num++;
+ wait_objects[cancel_n] = thread->cancel_event;
+ }
+
+ DWORD sig_n;
+ if (sig_wait == cw_sig_nosig)
+ sig_n = WAIT_TIMEOUT + 1;
+ else
+ {
+ sig_n = WAIT_OBJECT_0 + num++;
+ wait_objects[sig_n] = signal_arrived;
+ }
+
+ DWORD timeout_n;
+ if (!timeout)
+ timeout_n = WAIT_TIMEOUT + 1;
+ else
+ {
+ timeout_n = WAIT_OBJECT_0 + num++;
+ if (!_my_tls.locals.cw_timer)
+ NtCreateTimer (&_my_tls.locals.cw_timer, TIMER_ALL_ACCESS, NULL,
+ NotificationTimer);
+ NtSetTimer (_my_tls.locals.cw_timer, timeout, NULL, NULL, FALSE, 0, NULL);
+ wait_objects[timeout_n] = _my_tls.locals.cw_timer;
+ }
+
+ while (1)
+ {
+ res = WaitForMultipleObjects (num, wait_objects, FALSE, INFINITE);
+ if (res == cancel_n)
+ {
+ if (cancel_action == cw_cancel_self)
+ pthread::static_cancel_self ();
+ res = WAIT_CANCELED;
+ }
+ else if (res == timeout_n)
+ res = WAIT_TIMEOUT;
+ else if (res != sig_n)
+ /* all set */;
+ else if (sig_wait == cw_sig_eintr)
+ res = WAIT_SIGNALED;
+ else
+ {
+ _my_tls.call_signal_handler ();
+ continue;
+ }
+ break;
+ }
+
+ if (timeout)
+ {
+ TIMER_BASIC_INFORMATION tbi;
+
+ NtQueryTimer (_my_tls.locals.cw_timer, TimerBasicInformation, &tbi,
+ sizeof tbi, NULL);
+ /* if timer expired, TimeRemaining is negative and represents the
+ system uptime when signalled */
+ if (timeout->QuadPart < 0LL)
+ timeout->QuadPart = tbi.SignalState ? 0LL : tbi.TimeRemaining.QuadPart;
+ NtCancelTimer (_my_tls.locals.cw_timer, NULL);
+ }
+
+ return res;
+}
+
int
pthread::setcancelstate (int state, int *oldstate)
{
@@ -1014,9 +1072,6 @@ pthread::pop_cleanup_handler (int const execute)
void
pthread::pop_all_cleanup_handlers ()
{
- /* We will no honor cancels since the thread is exiting. */
- cancelstate = PTHREAD_CANCEL_DISABLE;
-
while (cleanup_stack != NULL)
pop_cleanup_handler (1);
}
@@ -1228,7 +1283,7 @@ pthread_cond::wait (pthread_mutex_t mutex, PLARGE_INTEGER timeout)
++mutex->condwaits;
mutex->unlock ();
- rv = cancelable_wait (sem_wait, timeout, cw_cancel | cw_sig_eintr);
+ rv = cancelable_wait (sem_wait, timeout, cw_no_cancel_self, cw_sig_eintr);
mtx_out.lock ();
@@ -1743,8 +1798,7 @@ pthread_mutex::lock ()
else if (type == PTHREAD_MUTEX_NORMAL /* potentially causes deadlock */
|| !pthread::equal (owner, self))
{
- /* FIXME: no cancel? */
- cancelable_wait (win32_obj_id, cw_infinite, cw_sig);
+ cancelable_wait (win32_obj_id, NULL, cw_no_cancel, cw_sig_resume);
set_owner (self);
}
else
@@ -1884,8 +1938,7 @@ pthread_spinlock::lock ()
/* Minimal timeout to minimize CPU usage while still spinning. */
LARGE_INTEGER timeout;
timeout.QuadPart = -10000LL;
- /* FIXME: no cancel? */
- cancelable_wait (win32_obj_id, &timeout, cw_sig);
+ cancelable_wait (win32_obj_id, &timeout, cw_no_cancel, cw_sig_resume);
}
}
while (result == -1);
@@ -1930,7 +1983,6 @@ pthread::thread_init_wrapper (void *arg)
_my_tls.sigmask = thread->parent_sigmask;
thread->mutex.unlock ();
- debug_printf ("tid %p", &_my_tls);
thread_printf ("started thread %p %p %p %p %p %p", arg, &_my_tls.local_clib,
_impure_ptr, thread, thread->function, thread->arg);
@@ -2364,7 +2416,7 @@ pthread::join (pthread_t *thread, void **return_val)
(*thread)->attr.joinable = PTHREAD_CREATE_DETACHED;
(*thread)->mutex.unlock ();
- switch (cancelable_wait ((*thread)->win32_obj_id, cw_infinite, cw_sig | cw_cancel))
+ switch (cancelable_wait ((*thread)->win32_obj_id, NULL, cw_no_cancel_self, cw_sig_resume))
{
case WAIT_OBJECT_0:
if (return_val)
@@ -3015,7 +3067,10 @@ pthread_kill (pthread_t thread, int sig)
if (!thread->valid)
rval = ESRCH;
else if (sig)
- rval = sig_send (NULL, si, thread->cygtls);
+ {
+ thread->cygtls->set_threadkill ();
+ rval = sig_send (NULL, si, thread->cygtls);
+ }
else
switch (WaitForSingleObject (thread->win32_obj_id, 0))
{
@@ -3476,7 +3531,7 @@ semaphore::_timedwait (const struct timespec *abstime)
timeout.QuadPart = abstime->tv_sec * NSPERSEC
+ (abstime->tv_nsec + 99) / 100 + FACTOR;
- switch (cancelable_wait (win32_obj_id, &timeout, cw_cancel | cw_cancel_self | cw_sig_eintr))
+ switch (cancelable_wait (win32_obj_id, &timeout, cw_cancel_self, cw_sig_eintr))
{
case WAIT_OBJECT_0:
currentvalue--;
@@ -3498,7 +3553,7 @@ semaphore::_timedwait (const struct timespec *abstime)
int
semaphore::_wait ()
{
- switch (cancelable_wait (win32_obj_id, cw_infinite, cw_cancel | cw_cancel_self | cw_sig_eintr))
+ switch (cancelable_wait (win32_obj_id, NULL, cw_cancel_self, cw_sig_eintr))
{
case WAIT_OBJECT_0:
currentvalue--;
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index 141100714..ec3ca7ebf 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -29,7 +29,25 @@ details. */
#include "security.h"
#include <errno.h>
#include "cygerrno.h"
-#include "cygwait.h"
+
+enum cw_sig_wait
+{
+ cw_sig_nosig,
+ cw_sig_eintr,
+ cw_sig_resume
+};
+
+enum cw_cancel_action
+{
+ cw_cancel_self,
+ cw_no_cancel_self,
+ cw_no_cancel
+};
+
+DWORD cancelable_wait (HANDLE, PLARGE_INTEGER timeout = NULL,
+ const cw_cancel_action = cw_cancel_self,
+ const enum cw_sig_wait = cw_sig_nosig)
+ __attribute__ ((regparm (3)));
class fast_mutex
{
@@ -60,7 +78,7 @@ public:
void lock ()
{
if (InterlockedIncrement ((long *) &lock_counter) != 1)
- cancelable_wait (win32_obj_id, cw_infinite, cw_sig);
+ cancelable_wait (win32_obj_id, NULL, cw_no_cancel, cw_sig_resume);
}
void unlock ()
@@ -344,6 +362,9 @@ public:
pthread_spinlock (int);
};
+#define WAIT_CANCELED (WAIT_OBJECT_0 + 1)
+#define WAIT_SIGNALED (WAIT_OBJECT_0 + 2)
+
class _cygtls;
class pthread: public verifyable_object
{
diff --git a/winsup/cygwin/tlsoffsets.h b/winsup/cygwin/tlsoffsets.h
index 1ab4559b9..18057742c 100644
--- a/winsup/cygwin/tlsoffsets.h
+++ b/winsup/cygwin/tlsoffsets.h
@@ -1,42 +1,42 @@
//;# autogenerated: Do not edit.
-//; $tls::start_offset = -12700;
-//; $tls::locals = -12700;
-//; $tls::plocals = 0;
-//; $tls::local_clib = -11236;
-//; $tls::plocal_clib = 1464;
-//; $tls::__dontuse = -11236;
-//; $tls::p__dontuse = 1464;
-//; $tls::func = -10148;
-//; $tls::pfunc = 2552;
-//; $tls::saved_errno = -10144;
-//; $tls::psaved_errno = 2556;
-//; $tls::sa_flags = -10140;
-//; $tls::psa_flags = 2560;
-//; $tls::oldmask = -10136;
-//; $tls::poldmask = 2564;
-//; $tls::deltamask = -10132;
-//; $tls::pdeltamask = 2568;
-//; $tls::errno_addr = -10128;
-//; $tls::perrno_addr = 2572;
-//; $tls::sigmask = -10124;
-//; $tls::psigmask = 2576;
-//; $tls::sigwait_mask = -10120;
-//; $tls::psigwait_mask = 2580;
-//; $tls::sigwait_info = -10116;
-//; $tls::psigwait_info = 2584;
-//; $tls::signal_arrived = -10112;
-//; $tls::psignal_arrived = 2588;
-//; $tls::signal_waiting = -10108;
-//; $tls::psignal_waiting = 2592;
-//; $tls::thread_context = -10104;
-//; $tls::pthread_context = 2596;
-//; $tls::thread_id = -9892;
-//; $tls::pthread_id = 2808;
-//; $tls::infodata = -9888;
-//; $tls::pinfodata = 2812;
-//; $tls::tid = -9740;
-//; $tls::ptid = 2960;
+//; $tls::sizeof__cygtls = 4048;
+//; $tls::func = -12700;
+//; $tls::pfunc = 0;
+//; $tls::saved_errno = -12696;
+//; $tls::psaved_errno = 4;
+//; $tls::sa_flags = -12692;
+//; $tls::psa_flags = 8;
+//; $tls::oldmask = -12688;
+//; $tls::poldmask = 12;
+//; $tls::deltamask = -12684;
+//; $tls::pdeltamask = 16;
+//; $tls::event = -12680;
+//; $tls::pevent = 20;
+//; $tls::errno_addr = -12676;
+//; $tls::perrno_addr = 24;
+//; $tls::sigmask = -12672;
+//; $tls::psigmask = 28;
+//; $tls::sigwait_mask = -12668;
+//; $tls::psigwait_mask = 32;
+//; $tls::sigwait_info = -12664;
+//; $tls::psigwait_info = 36;
+//; $tls::thread_context = -12660;
+//; $tls::pthread_context = 40;
+//; $tls::thread_id = -12448;
+//; $tls::pthread_id = 252;
+//; $tls::threadkill = -12444;
+//; $tls::pthreadkill = 256;
+//; $tls::infodata = -12440;
+//; $tls::pinfodata = 260;
+//; $tls::tid = -12292;
+//; $tls::ptid = 408;
+//; $tls::local_clib = -12288;
+//; $tls::plocal_clib = 412;
+//; $tls::__dontuse = -12288;
+//; $tls::p__dontuse = 412;
+//; $tls::locals = -11200;
+//; $tls::plocals = 1500;
//; $tls::_ctinfo = -9736;
//; $tls::p_ctinfo = 2964;
//; $tls::andreas = -9732;
@@ -59,42 +59,42 @@
//; $tls::pinitialized = 4044;
//; __DATA__
-#define tls_locals (-12700)
-#define tls_plocals (0)
-#define tls_local_clib (-11236)
-#define tls_plocal_clib (1464)
-#define tls___dontuse (-11236)
-#define tls_p__dontuse (1464)
-#define tls_func (-10148)
-#define tls_pfunc (2552)
-#define tls_saved_errno (-10144)
-#define tls_psaved_errno (2556)
-#define tls_sa_flags (-10140)
-#define tls_psa_flags (2560)
-#define tls_oldmask (-10136)
-#define tls_poldmask (2564)
-#define tls_deltamask (-10132)
-#define tls_pdeltamask (2568)
-#define tls_errno_addr (-10128)
-#define tls_perrno_addr (2572)
-#define tls_sigmask (-10124)
-#define tls_psigmask (2576)
-#define tls_sigwait_mask (-10120)
-#define tls_psigwait_mask (2580)
-#define tls_sigwait_info (-10116)
-#define tls_psigwait_info (2584)
-#define tls_signal_arrived (-10112)
-#define tls_psignal_arrived (2588)
-#define tls_signal_waiting (-10108)
-#define tls_psignal_waiting (2592)
-#define tls_thread_context (-10104)
-#define tls_pthread_context (2596)
-#define tls_thread_id (-9892)
-#define tls_pthread_id (2808)
-#define tls_infodata (-9888)
-#define tls_pinfodata (2812)
-#define tls_tid (-9740)
-#define tls_ptid (2960)
+#define tls_func (-12700)
+#define tls_pfunc (0)
+#define tls_saved_errno (-12696)
+#define tls_psaved_errno (4)
+#define tls_sa_flags (-12692)
+#define tls_psa_flags (8)
+#define tls_oldmask (-12688)
+#define tls_poldmask (12)
+#define tls_deltamask (-12684)
+#define tls_pdeltamask (16)
+#define tls_event (-12680)
+#define tls_pevent (20)
+#define tls_errno_addr (-12676)
+#define tls_perrno_addr (24)
+#define tls_sigmask (-12672)
+#define tls_psigmask (28)
+#define tls_sigwait_mask (-12668)
+#define tls_psigwait_mask (32)
+#define tls_sigwait_info (-12664)
+#define tls_psigwait_info (36)
+#define tls_thread_context (-12660)
+#define tls_pthread_context (40)
+#define tls_thread_id (-12448)
+#define tls_pthread_id (252)
+#define tls_threadkill (-12444)
+#define tls_pthreadkill (256)
+#define tls_infodata (-12440)
+#define tls_pinfodata (260)
+#define tls_tid (-12292)
+#define tls_ptid (408)
+#define tls_local_clib (-12288)
+#define tls_plocal_clib (412)
+#define tls___dontuse (-12288)
+#define tls_p__dontuse (412)
+#define tls_locals (-11200)
+#define tls_plocals (1500)
#define tls__ctinfo (-9736)
#define tls_p_ctinfo (2964)
#define tls_andreas (-9732)
diff --git a/winsup/cygwin/wait.cc b/winsup/cygwin/wait.cc
index ae0403194..91a76239a 100644
--- a/winsup/cygwin/wait.cc
+++ b/winsup/cygwin/wait.cc
@@ -1,7 +1,7 @@
/* wait.cc: Posix wait routines.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2009, 2011, 2012 Red Hat, Inc.
+ 2005, 2009, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -14,7 +14,6 @@ details. */
#include "sigproc.h"
#include "thread.h"
#include "cygtls.h"
-#include "cygwait.h"
/* This is called _wait and not wait because the real wait is defined
in libc/syscalls/syswait.c. It calls us. */
@@ -80,7 +79,7 @@ wait4 (int intpid, int *status, int options, struct rusage *r)
if ((waitfor = w->ev) == NULL)
goto nochildren;
- res = cancelable_wait (waitfor, cw_infinite, cw_cancel | cw_cancel_self);
+ res = cancelable_wait (waitfor);
sigproc_printf ("%d = cancelable_wait (...)", res);
diff --git a/winsup/cygwin/winbase.h b/winsup/cygwin/winbase.h
index 95fac3045..00c71a923 100644
--- a/winsup/cygwin/winbase.h
+++ b/winsup/cygwin/winbase.h
@@ -1,6 +1,6 @@
/* winbase.h
- Copyright 2002, 2003, 2004, 2008, 2009, 2012 Red Hat, Inc.
+ Copyright 2002, 2003, 2004, 2008 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@@ -11,25 +11,10 @@ details. */
#ifndef _WINBASE2_H
#define _WINBASE2_H
-/* For some unknown reason, InterlockedAdd is only supported on Itanium
- when using the Windows headers. Fortunately we're not restricted to the
- Windows headers :) */
-extern __inline__ LONG
-ilockadd (volatile LONG *m, LONG value)
+extern __inline__ long
+ilockincr (volatile long *m)
{
- register LONG __res;
- __asm__ __volatile__ ("\n\
- movl %3,%0\n\
- lock xadd %0,%1\n\
- addl %3,%0\n\
- ": "=&r" (__res), "=m" (*m): "m" (*m), "r" (value): "cc");
- return __res;
-}
-
-extern __inline__ LONG
-ilockincr (volatile LONG *m)
-{
- register LONG __res;
+ register int __res;
__asm__ __volatile__ ("\n\
movl $1,%0\n\
lock xadd %0,%1\n\
@@ -38,10 +23,10 @@ ilockincr (volatile LONG *m)
return __res;
}
-extern __inline__ LONG
-ilockdecr (volatile LONG *m)
+extern __inline__ long
+ilockdecr (volatile long *m)
{
- register LONG __res;
+ register int __res;
__asm__ __volatile__ ("\n\
movl $0xffffffff,%0\n\
lock xadd %0,%1\n\
@@ -50,12 +35,12 @@ ilockdecr (volatile LONG *m)
return __res;
}
-extern __inline__ LONG
-ilockexch (volatile LONG *t, long v)
+extern __inline__ long
+ilockexch (volatile long *t, long v)
{
return
({
- register LONG ret __asm ("%eax");
+ register long ret __asm ("%eax");
__asm __volatile ("\n"
"1: lock cmpxchgl %2, %1\n"
" jne 1b\n"
@@ -66,12 +51,12 @@ ilockexch (volatile LONG *t, long v)
});
}
-extern __inline__ LONG
-ilockcmpexch (volatile LONG *t, LONG v, LONG c)
+extern __inline__ long
+ilockcmpexch (volatile long *t, long v, long c)
{
return
({
- register LONG ret __asm ("%eax");
+ register long ret __asm ("%eax");
__asm __volatile ("lock cmpxchgl %2, %1"
: "=a" (ret), "=m" (*t)
: "r" (v), "m" (*t), "0" (c)
@@ -80,8 +65,6 @@ ilockcmpexch (volatile LONG *t, LONG v, LONG c)
});
}
-#undef InterlockedAdd
-#define InterlockedAdd ilockadd
#undef InterlockedIncrement
#define InterlockedIncrement ilockincr
#undef InterlockedDecrement
@@ -90,9 +73,4 @@ ilockcmpexch (volatile LONG *t, LONG v, LONG c)
#define InterlockedExchange ilockexch
#undef InterlockedCompareExchange
#define InterlockedCompareExchange ilockcmpexch
-#undef InterlockedCompareExchangePointer
-#ifndef __x86_64
-#define InterlockedCompareExchangePointer(d,e,c) \
- (PVOID)InterlockedCompareExchange((LONG volatile *)(d),(LONG)(e),(LONG)(c))
-#endif /* !__x86_64 */
#endif /*_WINBASE2_H*/
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index 48b51c275..6fe172f77 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -37,7 +37,6 @@ wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_recycle_dot_bin:false,
has_gaa_prefixes:false,
has_gaa_on_link_prefix:false,
- has_gaa_largeaddress_bug:false,
supports_all_posix_ai_flags:false,
has_restricted_stack_args:false,
has_transactions:false,
@@ -54,7 +53,7 @@ wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_stack_size_param_is_a_reservation:false,
has_console_logon_sid:false,
wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:false,
+ has_program_compatibility_assitant:false,
kernel_is_always_casesensitive:true,
};
@@ -72,7 +71,6 @@ wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_recycle_dot_bin:false,
has_gaa_prefixes:false,
has_gaa_on_link_prefix:false,
- has_gaa_largeaddress_bug:false,
supports_all_posix_ai_flags:false,
has_restricted_stack_args:false,
has_transactions:false,
@@ -89,7 +87,7 @@ wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_stack_size_param_is_a_reservation:false,
has_console_logon_sid:false,
wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:false,
+ has_program_compatibility_assitant:false,
kernel_is_always_casesensitive:true,
};
@@ -107,7 +105,6 @@ wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
has_recycle_dot_bin:false,
has_gaa_prefixes:false,
has_gaa_on_link_prefix:false,
- has_gaa_largeaddress_bug:false,
supports_all_posix_ai_flags:false,
has_restricted_stack_args:false,
has_transactions:false,
@@ -124,7 +121,7 @@ wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
has_stack_size_param_is_a_reservation:true,
has_console_logon_sid:false,
wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:false,
+ has_program_compatibility_assitant:false,
kernel_is_always_casesensitive:false,
};
@@ -142,7 +139,6 @@ wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_recycle_dot_bin:false,
has_gaa_prefixes:true,
has_gaa_on_link_prefix:false,
- has_gaa_largeaddress_bug:false,
supports_all_posix_ai_flags:false,
has_restricted_stack_args:false,
has_transactions:false,
@@ -159,7 +155,7 @@ wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_stack_size_param_is_a_reservation:true,
has_console_logon_sid:false,
wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:false,
+ has_program_compatibility_assitant:false,
kernel_is_always_casesensitive:false,
};
@@ -177,7 +173,6 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_recycle_dot_bin:false,
has_gaa_prefixes:true,
has_gaa_on_link_prefix:false,
- has_gaa_largeaddress_bug:false,
supports_all_posix_ai_flags:false,
has_restricted_stack_args:false,
has_transactions:false,
@@ -194,7 +189,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_stack_size_param_is_a_reservation:true,
has_console_logon_sid:false,
wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:false,
+ has_program_compatibility_assitant:false,
kernel_is_always_casesensitive:false,
};
@@ -212,7 +207,6 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_recycle_dot_bin:false,
has_gaa_prefixes:true,
has_gaa_on_link_prefix:false,
- has_gaa_largeaddress_bug:false,
supports_all_posix_ai_flags:false,
has_restricted_stack_args:true,
has_transactions:false,
@@ -229,7 +223,7 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_stack_size_param_is_a_reservation:true,
has_console_logon_sid:false,
wow64_has_secondary_stack:true,
- has_program_compatibility_assistant:false,
+ has_program_compatibility_assitant:false,
kernel_is_always_casesensitive:false,
};
@@ -247,7 +241,6 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_recycle_dot_bin:true,
has_gaa_prefixes:true,
has_gaa_on_link_prefix:true,
- has_gaa_largeaddress_bug:true,
supports_all_posix_ai_flags:true,
has_restricted_stack_args:false,
has_transactions:true,
@@ -264,7 +257,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_stack_size_param_is_a_reservation:true,
has_console_logon_sid:false,
wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:true,
+ has_program_compatibility_assitant:true,
kernel_is_always_casesensitive:false,
};
@@ -282,7 +275,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_recycle_dot_bin:true,
has_gaa_prefixes:true,
has_gaa_on_link_prefix:true,
- has_gaa_largeaddress_bug:true,
supports_all_posix_ai_flags:true,
has_restricted_stack_args:false,
has_transactions:true,
@@ -299,42 +291,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_stack_size_param_is_a_reservation:true,
has_console_logon_sid:true,
wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:true,
- kernel_is_always_casesensitive:false,
-};
-
-wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
- max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
- is_server:false,
- has_physical_mem_access:false,
- has_create_global_privilege:true,
- has_ioctl_storage_get_media_types_ex:true,
- has_disk_ex_ioctls:true,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:true,
- needs_logon_sid_in_sid_list:false,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:true,
- has_gaa_prefixes:true,
- has_gaa_on_link_prefix:true,
- has_gaa_largeaddress_bug:false,
- supports_all_posix_ai_flags:true,
- has_restricted_stack_args:false,
- has_transactions:true,
- has_recvmsg:true,
- has_sendmsg:true,
- has_broken_udf:false,
- has_console_handle_problem:true,
- has_broken_alloc_console:true,
- has_always_all_codepages:true,
- has_localenames:true,
- has_fast_cwd:true,
- has_restricted_raw_disk_access:true,
- use_dont_resolve_hack:false,
- has_stack_size_param_is_a_reservation:true,
- has_console_logon_sid:true,
- wow64_has_secondary_stack:false,
- has_program_compatibility_assistant:true,
+ has_program_compatibility_assitant:true,
kernel_is_always_casesensitive:false,
};
@@ -347,52 +304,69 @@ wincapc::init ()
return; // already initialized
GetSystemInfo (&system_info);
+ memset (&version, 0, sizeof version);
version.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
- GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version));
+ if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version)))
+ api_fatal ("Cygwin requires at least Windows 2000.");
- switch (version.dwMajorVersion)
+ switch (version.dwPlatformId)
{
- case 5:
- switch (version.dwMinorVersion)
+ case VER_PLATFORM_WIN32_NT:
+ switch (version.dwMajorVersion)
{
- case 0:
- if (version.wServicePackMajor < 4)
- caps = &wincap_2000;
- else
- caps = &wincap_2000sp4;
+ case 4:
+ /* I'd be very surprised if this code is ever hit, but it doesn't
+ hurt to keep it. */
+ api_fatal ("Cygwin requires at least Windows 2000.");
break;
-
- case 1:
- caps = &wincap_xp;
- switch (version.wServicePackMajor)
+ case 5:
+ switch (version.dwMinorVersion)
{
- case 0:
- caps = &wincap_xp;
- case 1:
- caps = &wincap_xpsp1;
- default:
- caps = &wincap_xpsp2;
- }
- break;
+ case 0:
+ if (version.wServicePackMajor < 4)
+ caps = &wincap_2000;
+ else
+ caps = &wincap_2000sp4;
+ break;
- default:
- caps = &wincap_2003;
- }
- break;
- case 6:
- switch (version.dwMinorVersion)
- {
- case 0:
- caps = &wincap_vista;
+ case 1:
+ caps = &wincap_xp;
+ switch (version.wServicePackMajor)
+ {
+ case 0:
+ caps = &wincap_xp;
+ case 1:
+ caps = &wincap_xpsp1;
+ default:
+ caps = &wincap_xpsp2;
+ }
+ break;
+
+ default:
+ caps = &wincap_2003;
+ }
break;
- case 1:
- caps = &wincap_7;
+ case 6:
+ switch (version.dwMinorVersion)
+ {
+ case 0:
+ caps = &wincap_vista;
+ break;
+ default:
+ caps = &wincap_7;
+ break;
+ }
break;
default:
- caps = &wincap_8;
+ caps = &wincap_minimal;
break;
}
break;
+ case VER_PLATFORM_WIN32_WINDOWS:
+ /* I'd be very surprised if this code is ever hit, but it doesn't
+ hurt to keep it. */
+ api_fatal ("Windows 95/98/Me are not supported.");
+ break;
default:
caps = &wincap_minimal;
break;
@@ -407,7 +381,6 @@ wincapc::init ()
((wincaps *)caps)->needs_count_in_si_lpres2 = false;
((wincaps *)caps)->has_restricted_stack_args = false;
((wincaps *)caps)->wow64_has_secondary_stack = false;
- ((wincaps *)caps)->has_gaa_largeaddress_bug = false;
}
__small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion,
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index 6bd291dfa..3ca5d87ea 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -27,7 +27,6 @@ struct wincaps
unsigned has_recycle_dot_bin : 1;
unsigned has_gaa_prefixes : 1;
unsigned has_gaa_on_link_prefix : 1;
- unsigned has_gaa_largeaddress_bug : 1;
unsigned supports_all_posix_ai_flags : 1;
unsigned has_restricted_stack_args : 1;
unsigned has_transactions : 1;
@@ -44,7 +43,7 @@ struct wincaps
unsigned has_stack_size_param_is_a_reservation : 1;
unsigned has_console_logon_sid : 1;
unsigned wow64_has_secondary_stack : 1;
- unsigned has_program_compatibility_assistant : 1;
+ unsigned has_program_compatibility_assitant : 1;
unsigned kernel_is_always_casesensitive : 1;
};
@@ -81,7 +80,6 @@ public:
bool IMPLEMENT (has_recycle_dot_bin)
bool IMPLEMENT (has_gaa_prefixes)
bool IMPLEMENT (has_gaa_on_link_prefix)
- bool IMPLEMENT (has_gaa_largeaddress_bug)
bool IMPLEMENT (supports_all_posix_ai_flags)
bool IMPLEMENT (has_restricted_stack_args)
bool IMPLEMENT (has_transactions)
@@ -98,7 +96,7 @@ public:
bool IMPLEMENT (has_stack_size_param_is_a_reservation)
bool IMPLEMENT (has_console_logon_sid)
bool IMPLEMENT (wow64_has_secondary_stack)
- bool IMPLEMENT (has_program_compatibility_assistant)
+ bool IMPLEMENT (has_program_compatibility_assitant)
bool IMPLEMENT (kernel_is_always_casesensitive)
#undef IMPLEMENT
diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h
index aa092ee53..d2d7f7a56 100644
--- a/winsup/cygwin/winlean.h
+++ b/winsup/cygwin/winlean.h
@@ -1,6 +1,6 @@
/* winlean.h - Standard "lean" windows include
- Copyright 2010, 2011, 2012 Red Hat, Inc.
+ Copyright 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -11,85 +11,22 @@ details. */
#ifndef _WINLEAN_H
#define _WINLEAN_H 1
#define WIN32_LEAN_AND_MEAN 1
-
-/* Mingw32 */
#define _WINGDI_H
#define _WINUSER_H
#define _WINNLS_H
#define _WINVER_H
#define _WINNETWK_H
#define _WINSVC_H
-/* Mingw64 */
-#define _WINNLS_
-#define _WINNETWK_
-#define _WINSVC_
-#define _ADVAPI32_
-#define _DSGETDCAPI_
-#define _GDI32_
-#define _KERNEL32_
-#define _OLE32_
-#define _SHELL32_
-#define _SPOOL32_
-#define _USER32_
-#define _WINMM_
-#define WINIMPM
-#define WINSOCK_API_LINKAGE
-#define NTDDI_VERSION 0x6020000 /* Probably should just be derived from our
- _WIN32_WINNT setting in winsup.h */
-
-/* Windows headers define a couple of annoyingly intrusive macros for the
- sole purpose of inline documentation. Since they are defined without
- respect for the namespace and not undef'ed anymore, they tend to collide
- with otherwise innocent definitions in the application. We check if they
- exist and if not, we undef them again after including the Windows headers. */
-#ifndef IN
-#define __undef_IN
-#endif
-#ifndef OUT
-#define __undef_OUT
-#endif
-#ifndef OPTIONAL
-#define __undef_OPTIONAL
-#endif
-#ifndef NOTHING
-#define __undef_NOTHING
-#endif
-#ifndef CRITICAL
-#define __undef_CRITICAL
-#endif
-
#include <windows.h>
#include <wincrypt.h>
#include <lmcons.h>
#include <ntdef.h>
-
-#ifdef __undef_IN
-#undef IN
-#endif
-#ifdef __undef_OUT
-#undef OUT
-#endif
-#ifdef __undef_OPTIONAL
-#undef OPTIONAL
-#endif
-#ifdef __undef_NOTHING
-#undef NOTHING
-#endif
-#ifdef __undef_CRITICAL
-#undef CRITICAL
-#endif
-
#undef _WINGDI_H
#undef _WINUSER_H
#undef _WINNLS_H
#undef _WINVER_H
#undef _WINNETWK_H
#undef _WINSVC_H
-
-#undef _WINNLS_
-#undef _WINNETWK_
-#undef _WINSVC_
-
/* When Terminal Services are installed, the GetWindowsDirectory function
does not return the system installation dir, but a user specific directory
instead. That's not what we have in mind when calling GetWindowsDirectory
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index fd6d6906f..ddbe360e4 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -1,7 +1,7 @@
/* winsup.h: main Cygwin header file.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -9,6 +9,12 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#ifdef DEBUGIT
+#define spf(a, b, c) small_printf (a, b, c)
+#else
+#define spf(a, b, c) do {} while (0)
+#endif
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -21,11 +27,7 @@ details. */
#define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym)));
-/* Fun, fun, fun. On Mingw64, WINVER is set according to the value of
- _WIN32_WINNT, on Mingw32 it's exactly the opposite... */
-#define _WIN32_WINNT 0x0602
-#define WINVER 0x0602
-
+#define WINVER 0x0601
#define _NO_W32_PSEUDO_MODIFIERS
#include <sys/types.h>
@@ -75,12 +77,8 @@ int fcntl64 (int fd, int cmd, ...);
#define __WIDE(a) L ## a
#define _WIDE(a) __WIDE(a)
-#include "winlean.h"
-
#ifdef __cplusplus
-#include "wincap.h"
-
extern const char case_folded_lower[];
#define cyg_tolower(c) (case_folded_lower[(unsigned char)(c)])
extern const char case_folded_upper[];
@@ -90,6 +88,12 @@ extern const char case_folded_upper[];
#define cfree newlib_cfree_dont_use
#endif
+#include "winlean.h"
+#include "wincap.h"
+
+/* The one function we use from winuser.h most of the time */
+extern "C" DWORD WINAPI GetLastError (void);
+
/* Used as type by sys_wcstombs_alloc and sys_mbstowcs_alloc. For a
description see there. */
#define HEAP_NOTHEAP -1
@@ -161,7 +165,7 @@ void dll_dllcrt0_1 (void *);
/* dynamically loaded dll initialization */
extern "C" int dll_dllcrt0 (HMODULE, per_process *);
-extern "C" void _pei386_runtime_relocator (per_process *);
+void _pei386_runtime_relocator (per_process *);
/* dynamically loaded dll initialization for non-cygwin apps */
extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 2480c5164..fe4ae3a0e 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,85 +1,3 @@
-2012-08-03 Adam Dinwoodie <Adam.Dinwoodie@metaswitch.com>
-
- * faq-using.xml (faq.using.man): Make relevance to whatis explicit.
-
-2012-07-20 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml (pathnames-intro): Remove paragraph on UNC paths.
- Try to be clearer on POSIX vs. Win32 paths.
- (unc-paths): New section.
- (cygdrive): Fix a few SGML qualifiers.
- * setup-net.sgml: Move ntsec section from here...
- * using.sgml: ..to here.
-
-2012-07-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * new-features.sgml (ov-new1.7.16): Document getmntent_r.
-
-2012-07-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * faq-programming.xml (faq.programming.unix-gui): Update to
- reflect the availability of X11 toolkits on Cygwin.
-
-2012-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * new-features.sgml (ov-new1.7.16): Document ReFS support.
-
-2012-05-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * new-features.sgml (ov-new1.7.16): Document memrchr.
-
-2012-05-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * new-features.sgml (ov-new1.7.15): Fix XML syntax.
-
-2012-05-07 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * new-features.sgml (ov-new1.7.15): Fix tag.
-
-2012-05-06 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * cygwinenv.sgml: Add pipe_byte description.
- * new-features.sgml (ov-new1.7.15): Add new pipe_byte description for
- 1.7.15.
-
-2012-04-25 Corinna Vinschen <corinna@vinschen.de>
-
- * new-features.sgml (ov-new1.7.14): Add mouse reporting mode 1005.
-
-2012-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * new-features.sgml (ov-new1.7.14): New section. Add new console mouse
- reporting modes.
-
-2012-04-24 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * configure: Regenerate.
-
-2012-04-23 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * faq-using.xml (faq.using.emacs, faq.using.xemacs): Change links
- from http://cygwin.com/xfree to http://x.cygwin.com.
-
-2012-04-23 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * faq-programming.xml (faq.programming.objective-c): Update for gcc4.
- (faq.programming.win32-api): -mwindows does include -lcomdlg32.
- (faq.programming.win32-no-cygwin): Update for removal of -mno-cygwin.
- * overview2.sgml (ov-ex-win): Ditto.
-
-2012-04-05 Corinna Vinschen <corinna@vinschen.de>
-
- * new-features.sgml (ov-new1.7.13): Add typeahead description.
-
-2012-04-05 Corinna Vinschen <corinna@vinschen.de>
-
- * new-features.sgml (ov-new1.7.13): New section. Add entry for
- mkpasswd/mkgroup change to print TrustedInstaller account.
-
-2012-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * new-features.sgml (ov-new1.7.12): Fix layout of flock example.
-
2012-03-30 Corinna Vinschen <corinna@vinschen.de>
* new-features.sgml (ov-new1.7.12): Fix typo.
diff --git a/winsup/doc/configure b/winsup/doc/configure
index b45547ca3..769de69ae 100755
--- a/winsup/doc/configure
+++ b/winsup/doc/configure
@@ -1,422 +1,81 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
-#
+# Generated by GNU Autoconf 2.59.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
+ as_unset=false
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_unset $as_var
fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
+done
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-as_me=`$as_basename -- "$0" ||
+# Name of the executable.
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -424,107 +83,146 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
- s/-\n.*//
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
# Exit status is that of the last command.
exit
}
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
+ as_expr=false
fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
+rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
+ as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -533,25 +231,38 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+exec 6>&1
+
#
# Initializations.
#
ac_default_prefix=/usr/local
-ac_clean_files=
ac_config_libobj_dir=.
-LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME=
@@ -559,88 +270,14 @@ PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
-PACKAGE_URL=
ac_unique_file="cygwin-api.in.sgml"
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-build_exeext
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT build_exeext LIBOBJS LTLIBOBJS'
ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS'
-
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -663,49 +300,34 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
+datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
ac_prev=
-ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
+ eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
- case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -727,59 +349,33 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad)
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
datadir=$ac_optarg ;;
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
-disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
esac
- eval enable_$ac_useropt=\$ac_optarg ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -806,12 +402,6 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -836,16 +426,13 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -910,16 +497,6 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -970,36 +547,26 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
esac
- eval with_$ac_useropt=\$ac_optarg ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -1019,26 +586,27 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
@@ -1046,36 +614,31 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
+ eval ac_val=$`echo $ac_var`
case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
- # Be sure to have absolute directory names.
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1089,8 +652,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1102,72 +665,70 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
-
-
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
+ if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
#
# Report the --help message.
@@ -1190,17 +751,20 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
+ -q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
+_ACEOF
+
+ cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1210,25 +774,18 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
_ACEOF
cat <<\_ACEOF
@@ -1249,138 +806,125 @@ Some influential environment variables:
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
_ACEOF
-ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
+ test -d $ac_dir || continue
ac_builddir=.
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
case $srcdir in
- .) # We are building in place.
+ .) # No --srcdir option. We are building in place.
ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd "$ac_popdir"
done
fi
-test -n "$ac_init_help" && exit $ac_status
+test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
+ exit 0
fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-cat >config.log <<_ACEOF
+exec 5>config.log
+cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
_ACEOF
-exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -1399,7 +943,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1411,9 +955,8 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
+ echo "PATH: $as_dir"
+done
} >&5
@@ -1435,6 +978,7 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
+ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1445,13 +989,13 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1467,115 +1011,104 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- as_fn_append ac_configure_args " '$ac_arg'"
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
;;
esac
done
done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ cat <<\_ASBOX
+## ---------------- ##
## Cache variables. ##
-## ---------------- ##"
+## ---------------- ##
+_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
+{
(set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
*)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
- esac |
- sort
-)
+ esac;
+}
echo
- $as_echo "## ----------------- ##
+ cat <<\_ASBOX
+## ----------------- ##
## Output variables. ##
-## ----------------- ##"
+## ----------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_files
do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ cat <<\_ASBOX
+## ----------- ##
## confdefs.h. ##
-## ----------- ##"
+## ----------- ##
+_ASBOX
echo
- cat confdefs.h
+ sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
-' 0
+ ' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
# Predefined preprocessor variables.
@@ -1583,137 +1116,112 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
+
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
+
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
+
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+ . "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1722,138 +1230,123 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ac_aux_dir=
-for ac_dir in ../.. "$srcdir"/../..; do
- if test -f "$ac_dir/install-sh"; then
+for ac_dir in ../.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
- elif test -f "$ac_dir/install.sh"; then
+ elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
- elif test -f "$ac_dir/shtool"; then
+ elif test -f $ac_dir/shtool; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
-esac
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
-esac
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if ${ac_cv_target+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
-esac
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# The aliases save the names the user supplied, while $host etc.
@@ -1863,14 +1356,13 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1880,37 +1372,35 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1920,38 +1410,28 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
+ test -z "$ac_cv_prog_ac_ct_CC" && ac_cv_prog_ac_ct_CC="gcc"
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test "x$ac_ct_CC" = x; then
- CC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
+ CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
@@ -1965,10 +1445,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1978,37 +1458,35 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2018,50 +1496,39 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
+ CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2071,37 +1538,77 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2112,19 +1619,18 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -2142,25 +1648,24 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
+ for ac_prog in cl
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2170,41 +1675,39 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl.exe
+ for ac_prog in cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2214,78 +1717,66 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
test -n "$ac_ct_CC" && break
done
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
+ CC=$ac_ct_CC
fi
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2297,108 +1788,112 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
break;;
* )
break;;
esac
done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+
ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2406,90 +1901,38 @@ $as_echo "$ac_try_echo"; } >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
break;;
* ) break;;
esac
done
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2501,46 +1944,45 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- $as_echo "$as_me: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
+
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2554,49 +1996,54 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
- ac_compiler_gnu=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2607,34 +2054,38 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
+ac_cv_prog_cc_g=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2650,14 +2101,18 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_prog_cc_c89=no
+ ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
@@ -2685,17 +2140,12 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
+ as 'x'. The following induces an error, until -std1 is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
+ that's true only with -std1. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2710,50 +2160,215 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
+rm -f conftest.err conftest.$ac_objext
done
-rm -f conftest.$ac_ext
+rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
*)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
-ac_config_files="$ac_config_files Makefile"
-
+ ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -2772,70 +2387,39 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
+# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
+{
(set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
+ ;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
- esac |
- sort
-) |
+ esac;
+} |
sed '
- /^ac_cv_env_/b end
t clear
- :clear
+ : clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- if test ! -f "$cache_file" || test -h "$cache_file"; then
- cat confcache >"$cache_file"
- else
- case $cache_file in #(
- */* | ?:*)
- mv -f confcache "$cache_file"$$ &&
- mv -f "$cache_file"$$ "$cache_file" ;; #(
- *)
- mv -f confcache "$cache_file" ;;
- esac
- fi
- fi
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
@@ -2844,55 +2428,63 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
+# take arguments), then we branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
+cat >confdef2opt.sed <<\_ACEOF
t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
ac_libobjs=
ac_ltlibobjs=
-U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -2900,14 +2492,12 @@ LTLIBOBJS=$ac_ltlibobjs
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
+: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -2917,253 +2507,81 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-
SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
+ as_unset=false
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
+done
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-as_me=`$as_basename -- "$0" ||
+# Name of the executable.
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -3171,123 +2589,148 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
+ as_expr=false
fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
+rm -f conf$$ conf$$.exe conf$$.file
-} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
+ as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -3296,20 +2739,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -3317,116 +2771,124 @@ generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
_ACEOF
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
-_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
+\`$as_me' instantiates files from templates according to the
+current configuration.
-Usage: $0 [OPTION]... [TAG]...
+Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
-Report bugs to the package provider."
-
+Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+
+cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.68,
- with options \\"\$ac_cs_config\\"
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-test -n "\$AWK" || AWK=awk
+srcdir=$srcdir
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ac_shift=:
;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
+ -*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
+ *) ac_config_targets="$ac_config_targets $1" ;;
esac
shift
@@ -3440,44 +2902,30 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Handling of arguments.
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
done
-
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -3487,414 +2935,338 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
+# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
- tmp= ac_tmp=
- trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
}
+
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
}
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# CONFIG_FILES section.
+#
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@build_exeext@,$build_exeext,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
+_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
- case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- ac_dir=`$as_dirname -- "$ac_file" ||
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
ac_builddir=.
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
case $srcdir in
- .) # We are building in place.
+ .) # No --srcdir option. We are building in place.
ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$ac_tmp/stdin"
- case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-
-
-
- esac
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
-done # for ac_tag
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-as_fn_exit 0
+{ (exit 0); exit 0; }
_ACEOF
+chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -3914,10 +3286,6 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ $ac_cs_success || { (exit 1); exit 1; }
fi
diff --git a/winsup/doc/cygwinenv.sgml b/winsup/doc/cygwinenv.sgml
index 3a05e9ba3..2be87c8b2 100644
--- a/winsup/doc/cygwinenv.sgml
+++ b/winsup/doc/cygwinenv.sgml
@@ -59,11 +59,6 @@ If supplied, wildcard matching is case insensitive. The default is <literal>noi
</listitem>
<listitem>
-<para><envar>(no)pipe_byte</envar> - causes Cygwin to open pipes in byte mode rather than
-message mode.</para>
-</listitem>
-
-<listitem>
<para><envar>proc_retry:n</envar> - causes <function>fork()</function> and
<function>exec*()</function> to retry n times when a child process fails
due to certain windows-specific errors. These errors usually occur when
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index 6e1edda65..acb92b99b 100644
--- a/winsup/doc/faq-programming.xml
+++ b/winsup/doc/faq-programming.xml
@@ -62,9 +62,10 @@ would be difficult.
<question><para>Where is Objective C?</para></question>
<answer>
-<para>Support for compiling Objective C is available in the <literal>gcc4-objc</literal>
-package; resulting binaries will depend on the <literal>libobjc2</literal>
-package at runtime.
+<para>Objective C hasn't been distributed with the Cygwin version of gcc
+for a long time. For several reason Cygwin was stuck with gcc version 3.4.4.
+Fortunately the latest gcc maintainer is quite busy to create a working
+gcc 4.x release which also comes with an Objective C package.
</para>
</answer></qandaentry>
@@ -176,7 +177,7 @@ with gdi32 like this:
<para>The regular setup allows you to use the option -mwindows on the
command line to include a set of the basic libraries (and also
make your program a GUI program instead of a console program),
-including user32, gdi32 and comdlg32.
+including user32, gdi32 and, IIRC, comdlg32.
</para>
<para>It is a good idea to put import libraries last on your link line,
or at least after all the object files and static libraries that reference them.
@@ -193,10 +194,11 @@ as well as the User's Guide section
<question><para>How do I compile a Win32 executable that doesn't use Cygwin?</para></question>
<answer>
-<para>The compilers provided by the <literal>mingw-gcc</literal>,
-<literal>mingw64-i686-gcc</literal>, and <literal>mingw64-x86_64-gcc</literal>
-packages link against standard Microsoft DLLs instead of Cygwin. This is
-desirable for native Windows programs that don't need a UNIX emulation layer.
+<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
+</para>
+<para>The -mno-cygwin flag to gcc makes gcc link against standard Microsoft
+DLLs instead of Cygwin. This is desirable for native Windows programs
+that don't need a UNIX emulation layer.
</para>
<para>This is not to be confused with 'MinGW' (Minimalist GNU for Windows),
which is a completely separate effort. That project's home page is
@@ -810,44 +812,20 @@ a Windows environment which Cygwin handles automatically.
<question><para>How should I port my Unix GUI to Windows?</para></question>
<answer>
-<para>Like other Unix-like platforms, the Cygwin distribtion includes many of
-the common GUI toolkits, including X11, X Athena widgets, Motif, Tk, GTK+,
-and Qt. Many programs which rely on these toolkits will work with little, if
-any, porting work if they are otherwise portable. However, there are a few
-things to look out for:</para>
-<orderedlist>
-<listitem><para>Some packages written for both Windows and X11 incorrectly
-treat Cygwin as a Windows platform rather than a Unix variant. Mixing Cygwin's
-Unix APIs with Windows' GDI is best avoided; rather, remove these assumptions
-so that Cygwin is treated like other X11 platforms.</para></listitem>
-<listitem><para>GTK+ programs which use <literal>gtk_builder_connect_signals()</literal>
-or <literal>glade_xml_signal_autoconnect()</literal> need to be able to
-<literal>dlopen()</literal> themselves. In order for this to work, the program
-must be linked with the <literal>-Wl,--export-all-symbols</literal> linker flag.
-This can be added to LDFLAGS manually, or handled automatically with the
-<literal>-export-dynamic</literal> libtool flag (requires libtool 2.2.8) or
-by adding <literal>gmodule-export-2.0</literal> to the pkg-config modules used
-to build the package.</para></listitem>
-<listitem><para>Programs which include their own loadable modules (plugins)
-often must have its modules linked against the symbols in the program. The
-most portable solution is for such programs to provide all its symbols (except
-for <literal>main()</literal>) in a shared library, against which the plugins
-can be linked. Otherwise, the symbols from the executable itself must be
-exported.</para>
-<para>If the package uses the CMake build system, this can be done by adding
-<literal>ENABLE_EXPORTS TRUE</literal> to the executable's <literal>set_target_properties</literal>
-command, then adding the executable's target name to the <literal>target_link_libraries</literal>
-command for the plugins.</para>
-<para>For other build systems, the following steps are required:</para>
-<orderedlist>
-<listitem><para>The executable must be built before its plugins.</para></listitem>
-<listitem><para>Symbols must be exported from the executable with a
-<literal>-Wl,--export-all-symbols,--out-implib,libfoo.exe.a</literal>
-linker flag, where <literal>foo</literal> represents the name of the
-executable.</para></listitem>
-<listitem><para>The plugins must be linked with a <literal>-Wl,/path/to/libfoo.exe.a</literal>
-linker flag.</para></listitem>
-</orderedlist></listitem></orderedlist>
+<para>There are two basic strategies for porting Unix GUIs to Windows.
+</para>
+<para>The first is to use a portable graphics library such as tcl/tk, X11, or
+V (and others?). Typically, you will end up with a GUI on Windows that
+requires some runtime support. With tcl/tk, you'll want to include the
+necessary library files and the tcl/tk DLLs. In the case of X11, you'll
+need everyone using your program to have the X11 server installed.
+</para>
+<para>The second method is to rewrite your GUI using Win32 API calls (or MFC
+with VC++). If your program is written in a fairly modular fashion, you
+may still want to use Cygwin if your program contains a lot of shared
+(non-GUI-related) code. That way you still gain some of the portability
+advantages inherent in using Cygwin.
+</para>
</answer></qandaentry>
<qandaentry id="faq.programming.djgpp">
diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml
index c08efbc56..1675594ef 100644
--- a/winsup/doc/faq-using.xml
+++ b/winsup/doc/faq-using.xml
@@ -238,12 +238,10 @@ related messages.
</answer></qandaentry>
<qandaentry id="faq.using.man">
-<question><para>Why doesn't <literal>man -k</literal>,
-<literal>apropos</literal> or <literal>whatis</literal> work?</para></question>
+<question><para>Why doesn't man -k (or apropos) work?</para></question>
<answer>
-<para>Before you can use <literal>man -k</literal>, <literal>apropos</literal>
-or <literal>whatis</literal>, you
+<para>Before you can use <literal>man -k</literal> or <literal>apropos</literal>, you
must create the whatis database. Just run the command
</para>
<screen>
@@ -784,7 +782,7 @@ interfere with the normal functioning of Cygwin.
<para>Yes. Install the emacs package. This provides everything you
need in order to run GNU emacs in a terminal window. If you also want
to be able to use the X11
-(<ulink url="http://x.cygwin.com/">http://x.cygwin.com/</ulink>)
+(<ulink url="http://cygwin.com/xfree/">http://cygwin.com/xfree/</ulink>)
GUI, install the emacs-X11 package. In either case, you run emacs by
typing 'emacs' or '/usr/bin/emacs'.
</para>
@@ -796,7 +794,7 @@ typing 'emacs' or '/usr/bin/emacs'.
<para>Yes. It can be used in three different modes:</para>
<para><itemizedlist>
-<listitem><para>X11 (<ulink url="http://x.cygwin.com/">http://x.cygwin.com/</ulink>) GUI</para></listitem>
+<listitem><para>X11 (<ulink url="http://cygwin.com/xfree/">http://cygwin.com/xfree/</ulink>) GUI</para></listitem>
</itemizedlist></para>
<para>You have to <emphasis>set</emphasis> the DISPLAY environment variable
before starting xemacs.</para>
diff --git a/winsup/doc/new-features.sgml b/winsup/doc/new-features.sgml
index 1fe5afea4..e66107c16 100644
--- a/winsup/doc/new-features.sgml
+++ b/winsup/doc/new-features.sgml
@@ -1,63 +1,5 @@
<sect1 id="ov-new1.7"><title>What's new and what changed in Cygwin 1.7</title>
-<sect2 id="ov-new1.7.16"><title>What's new and what changed from 1.7.15 to 1.7.16</title>
-
-<itemizedlist mark="bullet">
-
-<listitem><para>
-New API: getmntent_r, memrchr.
-</para></listitem>
-
-<listitem><para>
-Recognize ReFS filesystem.
-</para></listitem>
-
-</itemizedlist>
-
-</sect2>
-
-<sect2 id="ov-new1.7.15"><title>What's new and what changed from 1.7.14 to 1.7.15</title>
-
-<itemizedlist mark="bullet">
-
-<listitem><para>
-CYGWIN=pipe_byte option now forces the opening of pipes in byte mode rather than message mode.
-</para></listitem>
-
-</itemizedlist>
-
-</sect2>
-
-<sect2 id="ov-new1.7.14"><title>What's new and what changed from 1.7.13 to 1.7.14</title>
-
-<itemizedlist mark="bullet">
-
-<listitem><para>
-Add mouse reporting modes 1005, 1006 and 1015 to console window.
-</para></listitem>
-
-</itemizedlist>
-
-</sect2>
-
-<sect2 id="ov-new1.7.13"><title>What's new and what changed from 1.7.12 to 1.7.13</title>
-
-<itemizedlist mark="bullet">
-
-<listitem><para>
-mkpasswd and mkgroup now try to print an entry for the TrustedInstaller
-account existing since Windows Vista/Server 2008.
-</para></listitem>
-
-<listitem><para>
-Terminal typeahead when switching from canonical to non-canonical mode
-is now properly flushed.
-</para></listitem>
-
-</itemizedlist>
-
-</sect2>
-
<sect2 id="ov-new1.7.12"><title>What's new and what changed from 1.7.11 to 1.7.12</title>
<itemizedlist mark="bullet">
@@ -74,12 +16,12 @@ Add virtual /proc/PID/mountinfo file.
<listitem><para>
flock now additionally supports the following scenario, which requires
to propagate locks to the parent process:
- <screen>
+
(
flock -n 9 || exit 1
# ... commands executed under lock ...
} 9>/var/lock/mylockfile
- </screen>
+
Only propagation to the direct parent process is supported so far,
not to grand parents or sibling processes.
</para></listitem>
diff --git a/winsup/doc/overview2.sgml b/winsup/doc/overview2.sgml
index 81e55c47e..def02ba38 100644
--- a/winsup/doc/overview2.sgml
+++ b/winsup/doc/overview2.sgml
@@ -35,10 +35,9 @@ the <literal>/usr/share/doc/Cygwin/</literal> directory.
<para>
Developers coming from a Windows background will be able to write
console or GUI executables that rely on the Microsoft Win32 API instead
-of Cygwin using the mingw32 or mingw64 cross-compiler toolchains. The
-<command>-shared</command> option to GCC allows to write Windows Dynamically
-Linked Libraries (DLLs). The resource compiler <command>windres</command>
-is also provided.
+of Cygwin using the -mno-cygwin option to GCC. The <command>-shared</command>
+option allows to write Windows Dynamically Linked Libraries (DLLs). The
+resource compiler <command>windres</command> is also provided.
</para>
</sect1>
diff --git a/winsup/doc/pathnames.sgml b/winsup/doc/pathnames.sgml
index 3a4769e9e..e2a031581 100644
--- a/winsup/doc/pathnames.sgml
+++ b/winsup/doc/pathnames.sgml
@@ -2,12 +2,12 @@
<sect2 id="pathnames-intro"><title>Introduction</title>
-<para>Cygwin supports both POSIX- and Win32-style paths. Directory
+<para>Cygwin supports both Win32- and POSIX-style paths. Directory
delimiters may be either forward slashes or backslashes. Paths using
-backslashes or starting with a drive letter are always handled as
-Win32 paths. POSIX paths must only use forward slashes as delimiter,
-otherwise they are treated as Win32 paths and file access might fail
-in surprising ways.</para>
+backslashes are always handled as Win32 paths. POSIX paths must only
+use forward slashes as delimiter, otherwise they are treated as Win32
+paths and file access might fail in surprising ways. UNC pathnames
+(starting with two slashes and a network name) are also supported.</para>
<note><para>The usage of Win32 paths, though possible, is deprecated,
since it circumvents important internal path handling mechanisms.
@@ -269,27 +269,11 @@ old user mount points as before.
</sect2>
-<sect2 id="unc-paths"><title>UNC paths</title>
-
-<para>Apart from the unified POSIX tree starting at the <filename>/</filename>
-directory, UNC pathnames starting with two slashes and a server name
-(<filename>//machine/share/...</filename>) are supported as well.
-They are handled as POSIX paths if only containing forward slashes. There's
-also a virtual directory <filename>//</filename> which allows to enumerate
-the fileservers known to the local machine with <command>ls</command>.
-Same goes for the UNC paths of the type <filename>//machine</filename>,
-which allow to enumerate the shares provided by the server
-<literal>machine</literal>. For often used UNC paths it makes sense to
-add them to the mount table (see <xref linkend="mount-table"></xref> so
-they are included in the unified POSIX path tree.</para>
-
-</sect2>
-
<sect2 id="cygdrive"><title>The cygdrive path prefix</title>
<para>As already outlined in <xref linkend="ov-hi-files"></xref>, you can
access arbitary drives on your system by using the cygdrive path prefix.
-The default value for this prefix is <filename>/cygdrive</filename>, and
+The default value for this prefix is <literal>/cygdrive</literal>, and
a path to any drive can be constructed by using the cygdrive prefix and
appending the drive letter as subdirectory, like this:</para>
@@ -303,7 +287,7 @@ appending the drive letter as subdirectory, like this:</para>
on a system are subsumed. The mount options of the cygdrive prefix is
used for all file access through the cygdrive prefixed drives. For instance,
assuming the cygdrive mount options are <literal>binary,posix=0</literal>,
-then any file <filename>/cygdrive/x/file</filename> will be opened in
+then any file <literal>/cygdrive/x/file</literal> will be opened in
binary mode by default (mount option <literal>binary</literal>), and the case
of the filename doesn't matter (mount option <literal>posix=0</literal>).
</para>
diff --git a/winsup/doc/setup-net.sgml b/winsup/doc/setup-net.sgml
index 4694eb330..889f1e0fb 100644
--- a/winsup/doc/setup-net.sgml
+++ b/winsup/doc/setup-net.sgml
@@ -260,5 +260,6 @@ Problems with Cygwin</ulink>.
DOCTOOL-INSERT-setup-env
DOCTOOL-INSERT-setup-maxmem
DOCTOOL-INSERT-setup-locale
+DOCTOOL-INSERT-ntsec
DOCTOOL-INSERT-setup-files
</chapter>
diff --git a/winsup/doc/using.sgml b/winsup/doc/using.sgml
index 4a802e6c8..4678cff93 100644
--- a/winsup/doc/using.sgml
+++ b/winsup/doc/using.sgml
@@ -14,8 +14,6 @@ DOCTOOL-INSERT-using-specialnames
DOCTOOL-INSERT-using-cygwinenv
-DOCTOOL-INSERT-ntsec
-
DOCTOOL-INSERT-using-cygserver
DOCTOOL-INSERT-using-utils
diff --git a/winsup/lsaauth/ChangeLog b/winsup/lsaauth/ChangeLog
index b78696af2..bbb763a1e 100644
--- a/winsup/lsaauth/ChangeLog
+++ b/winsup/lsaauth/ChangeLog
@@ -1,11 +1,3 @@
-2012-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (LIBS): Re-add advapi32.dll. Explain why.
- * make-64bit-version-with-mingw-w64.sh (LIBS): Ditto.
- * cyglsa.c: Drop NTDLL function declarations. Use equivalent advapi32
- functions again, throughout.
- * cyglsa64.dll: Regenerate.
-
2011-05-10 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in: Don't override CC.
diff --git a/winsup/lsaauth/Makefile.in b/winsup/lsaauth/Makefile.in
index bb585dfda..948c08b34 100644
--- a/winsup/lsaauth/Makefile.in
+++ b/winsup/lsaauth/Makefile.in
@@ -41,11 +41,7 @@ ifdef MINGW_CC
override CC:=${MINGW_CC}
endif
-# Never again try to remove advapi32. It does not matter if the DLL calls
-# advapi32 functions or the equivalent ntdll functions.
-# But if the LSA authentication DLL is not linked against advapi32, it's
-# not recognized by LSA.
-LIBS := -ladvapi32 -lkernel32 -lntdll
+LIBS := -lkernel32 -lntdll
DLL := cyglsa.dll
DEF_FILE:= cyglsa.def
diff --git a/winsup/lsaauth/cyglsa.c b/winsup/lsaauth/cyglsa.c
index 341fdd12c..e64d0e11f 100644
--- a/winsup/lsaauth/cyglsa.c
+++ b/winsup/lsaauth/cyglsa.c
@@ -1,6 +1,6 @@
/* cyglsa.c: LSA authentication module for Cygwin
- Copyright 2006, 2008, 2010, 2011, 2012 Red Hat, Inc.
+ Copyright 2006, 2008, 2010, 2011 Red Hat, Inc.
Written by Corinna Vinschen <corinna@vinschen.de>
@@ -41,6 +41,13 @@ DllMain (HINSTANCE inst, DWORD reason, LPVOID res)
#ifndef NT_SUCCESS
#define NT_SUCCESS(s) ((s) >= 0)
#endif
+NTSTATUS NTAPI NtAllocateLocallyUniqueId (PLUID);
+NTSTATUS NTAPI RtlCopySid (ULONG, PSID, PSID);
+NTSTATUS NTAPI RtlGetAce (PACL, ULONG, PVOID *);
+ULONG NTAPI RtlLengthSid (PSID);
+PULONG NTAPI RtlSubAuthoritySid (PSID, ULONG);
+PUCHAR NTAPI RtlSubAuthorityCountSid (PSID);
+BOOLEAN NTAPI RtlValidSid (PSID);
/* These standard POSIX functions are implemented in NTDLL and exported.
There's just no header to define them and using wchar.h from mingw
or Cygwin seems wrong somehow. */
@@ -116,7 +123,7 @@ print_sid (const char *prefix, int idx, PISID sid)
cyglsa_printf ("NULL\n");
else if (IsBadReadPtr (sid, 8))
cyglsa_printf ("INVALID POINTER\n");
- else if (!IsValidSid ((PSID) sid))
+ else if (!RtlValidSid ((PSID) sid))
cyglsa_printf ("INVALID SID\n");
else if (IsBadReadPtr (sid, 8 + sizeof (DWORD) * sid->SubAuthorityCount))
cyglsa_printf ("INVALID POINTER SPACE\n");
@@ -196,9 +203,11 @@ print_dacl (PACL dacl)
{
PVOID vace;
PACCESS_ALLOWED_ACE ace;
+ NTSTATUS stat;
- if (!GetAce (dacl, i, &vace))
- cyglsa_printf ("[%lu] GetAce error %lu\n", i, GetLastError ());
+ stat = RtlGetAce (dacl, i, &vace);
+ if (!NT_SUCCESS (stat))
+ cyglsa_printf ("[%lu] RtlGetAce status 0x%08lx\n", i, stat);
else
{
ace = (PACCESS_ALLOWED_ACE) vace;
@@ -494,8 +503,8 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
tokinf->ExpirationTime = authinf->inf.ExpirationTime;
/* User SID */
src_sid = (PSID) (base + authinf->inf.User.User.Sid);
- size = GetLengthSid (src_sid);
- CopySid (size, (PSID) tptr, src_sid);
+ size = RtlLengthSid (src_sid);
+ RtlCopySid (size, (PSID) tptr, src_sid);
tokinf->User.User.Sid = (PSID) tptr;
tptr += size;
tokinf->User.User.Attributes = authinf->inf.User.User.Attributes;
@@ -509,16 +518,16 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
for (i = 0; i < src_grps->GroupCount; ++i)
{
src_sid = (PSID) (base + src_grps->Groups[i].Sid);
- size = GetLengthSid (src_sid);
- CopySid (size, (PSID) tptr, src_sid);
+ size = RtlLengthSid (src_sid);
+ RtlCopySid (size, (PSID) tptr, src_sid);
tokinf->Groups->Groups[i].Sid = (PSID) tptr;
tptr += size;
tokinf->Groups->Groups[i].Attributes = src_grps->Groups[i].Attributes;
}
/* Primary Group SID */
src_sid = (PSID) (base + authinf->inf.PrimaryGroup.PrimaryGroup);
- size = GetLengthSid (src_sid);
- CopySid (size, (PSID) tptr, src_sid);
+ size = RtlLengthSid (src_sid);
+ RtlCopySid (size, (PSID) tptr, src_sid);
tokinf->PrimaryGroup.PrimaryGroup = (PSID) tptr;
tptr += size;
/* Privileges */
@@ -545,7 +554,8 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
not done in the 64 bit code above for hopefully obvious reasons... */
LUID logon_sid_id;
- if (must_create_logon_sid && !AllocateLocallyUniqueId (&logon_sid_id))
+ if (must_create_logon_sid
+ && !NT_SUCCESS (NtAllocateLocallyUniqueId (&logon_sid_id)))
return STATUS_INSUFFICIENT_RESOURCES;
if (!(tokinf = funcs->AllocateLsaHeap (authinf->inf_size)))
@@ -565,13 +575,13 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
((PBYTE) tokinf + (LONG_PTR) tokinf->Groups->Groups[i].Sid);
if (must_create_logon_sid
&& tokinf->Groups->Groups[i].Attributes & SE_GROUP_LOGON_ID
- && *GetSidSubAuthorityCount (tokinf->Groups->Groups[i].Sid) == 3
- && *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 0)
+ && *RtlSubAuthorityCountSid (tokinf->Groups->Groups[i].Sid) == 3
+ && *RtlSubAuthoritySid (tokinf->Groups->Groups[i].Sid, 0)
== SECURITY_LOGON_IDS_RID)
{
- *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 1)
+ *RtlSubAuthoritySid (tokinf->Groups->Groups[i].Sid, 1)
= logon_sid_id.HighPart;
- *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 2)
+ *RtlSubAuthoritySid (tokinf->Groups->Groups[i].Sid, 2)
= logon_sid_id.LowPart;
}
}
@@ -598,12 +608,12 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
(PVOID)((LONG_PTR) &authinf->inf + authinf->inf_size));
/* Create logon session. */
- if (!AllocateLocallyUniqueId (logon_id))
+ stat = NtAllocateLocallyUniqueId (logon_id);
+ if (!NT_SUCCESS (stat))
{
funcs->FreeLsaHeap (*tok);
*tok = NULL;
- cyglsa_printf ("AllocateLocallyUniqueId failed: Win32 error %lu\n",
- GetLastError ());
+ cyglsa_printf ("NtAllocateLocallyUniqueId status 0x%08lx\n", stat);
return STATUS_INSUFFICIENT_RESOURCES;
}
stat = funcs->CreateLogonSession (logon_id);
diff --git a/winsup/lsaauth/cyglsa64.dll b/winsup/lsaauth/cyglsa64.dll
index f3324d26a..14f1f6cff 100644
--- a/winsup/lsaauth/cyglsa64.dll
+++ b/winsup/lsaauth/cyglsa64.dll
Binary files differ
diff --git a/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh b/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh
index 4a8c37c23..a93daf8f3 100644
--- a/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh
+++ b/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh
@@ -20,10 +20,6 @@ set -e
CC="x86_64-w64-mingw32-gcc"
CFLAGS="-fno-exceptions -O0 -Wall -Werror"
LDFLAGS="-s -nostdlib -Wl,--entry,DllMain,--major-os-version,5,--minor-os-version,2"
-# Never again try to remove advapi32. It does not matter if the DLL calls
-# advapi32 functions or the equivalent ntdll functions.
-# But if the LSA authentication DLL is not linked against advapi32, it's
-# not recognized by LSA.
-LIBS="-ladvapi32 -lkernel32 -lntdll"
+LIBS="-lkernel32 -lntdll"
$CC $CFLAGS $LDFLAGS -shared -o cyglsa64.dll cyglsa.c cyglsa64.def $LIBS
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 3eb8975c1..1dd80cc56 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,68 +1,3 @@
-2012-08-08 Kai Tietz <ktietz@redhat.com>
-
- * mingwex/gdtoa/gd_qnan.h: Make Nan constants positive valued.
-
-2012-08-06 Earnie Boyd <earnie@users.sourceforge.net>
-
- * mingwex/membarrier.c: New file.
- * mingwex/Makefile.in (DISTFILES): Add membarrier.c.
- (REPLACE_OBJS): Add membarrier.o.
-
-2012-08-02 Ivan Maidanski <ivmai@users.sourceforge.net>
-
- * include/process.h (_wexec*, _wspawn*): Declare.
-
-2012-08-02 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/stdlib.h (_strtoi64): Declare.
- (_strtoi64_l): Ditto.
- (_strtoui64): Ditto.
- (_strtoui64_l): Ditto.
- (_wcstrtoi64): Ditto.
- (_wcstrtoi64_l): Ditto.
- (_wcstrtoui64): Ditto.
- (_wcstrtoui64_l): Ditto.
- * include/wchar.h (_wcstrtoi64): Ditto.
- (_wcstrtoi64_l): Ditto.
- (_wcstrtoui64): Ditto.
- (_wcstrtoui64_l): Ditto.
- * include/stdio.h (_getws, _putws): Guard with #ifndef __STRICT_ANSI__.
- (_wfdopen, _wfopen, _wfreopen, _wfsopen, _wtmpnam, _wtempnam): Ditto.
- (_wrename, _wremove, _wperror, _wpopen): Ditto.
- (_lock_file, _unlock_file): Declare.
- * include/limits.h (PATH_MAX): Guard with #ifndef __STRICT_ANSI__.
- * include/sys/param.h (MAXPATHLEN): Make sure PATH_MAX is defined.
- * include/_mingw.h (threadlocalinfostruct, threadmbinfostruct,
- *pthreadlocinfo, *pthreadmbcinfo, _locale_tstruct, *_locale_t): Declare.
- * mingwex/tsearch.c: Correct coding to produce the proper results.
-
-2012-08-01 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/excpt.h (__try1): Define based on _WIN64 definition.
- (__except1): Ditto.
-
-2012-07-30 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/stdint.h: Include _mingw.h for the definition of __int64 when
- _WIN64 is defined.
- * include/inttypes.h: A few items like PRNdPTR and SCNdPTR need 64
- bitness specified when _WIN64 is defined.
- * include/_mingw.h: Add __MINGW_VERSION, __MINGW_MAJOR_VERSION,
- __MINGW_MINOR_VERSION and __MINGW_PATCHLEVEL deprecating the __MINGW32_*
- versions of the macros.
- * configure.in: Use __MINGW_VERSION instead of __MINGW32_VERSION.
- * configure: Ditto.
-
-2012-05-08 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Remove references to nonexistent files.
-
- * mingwex/Makefile.in (DISTFILES): Delete references to aclocal.m4,
- configure.in, and configure; these are no longer required, and are no
- longer available for distribution.
-
- * profile/Makefile.in (DISTFILES): Likewise.
-
2012-02-01 Keith Marshall <keithmarshall@users.sourceforge.net>
More performance enhancements and POSIX compliance corrections.
diff --git a/winsup/mingw/configure b/winsup/mingw/configure
index 598ed6d9d..1ca8b5336 100755
--- a/winsup/mingw/configure
+++ b/winsup/mingw/configure
@@ -1788,7 +1788,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:$LINENO: checking package version" >&5
$as_echo_n "checking package version... " >&6; }
- PACKAGE_VERSION=`awk '$2 == "'"__MINGW_VERSION"'" { print $3 }' ${srcdir}/include/_mingw.h`
+ PACKAGE_VERSION=`awk '$2 == "'"__MINGW32_VERSION"'" { print $3 }' ${srcdir}/include/_mingw.h`
{ $as_echo "$as_me:$LINENO: result: $PACKAGE_VERSION" >&5
$as_echo "$PACKAGE_VERSION" >&6; }
diff --git a/winsup/mingw/configure.in b/winsup/mingw/configure.in
index eccf84074..92dbd3d1d 100644
--- a/winsup/mingw/configure.in
+++ b/winsup/mingw/configure.in
@@ -18,7 +18,7 @@ dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
AC_PREREQ([2.59])
AC_INIT([MinGW Runtime], [v3.x], [http://mingw.org/reporting_bugs], [mingwrt])
-MINGW_AC_CONFIG_SRCDIR([__MINGW_VERSION], [include/_mingw.h])
+MINGW_AC_CONFIG_SRCDIR([__MINGW32_VERSION], [include/_mingw.h])
AC_CANONICAL_SYSTEM
GCC_NO_EXECUTABLES
diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h
index cbfd54ced..cb0ff53a7 100644
--- a/winsup/mingw/include/_mingw.h
+++ b/winsup/mingw/include/_mingw.h
@@ -22,13 +22,6 @@
*/
#define __MINGW_H
-#define __MINGW_VERSION 4
-#define __MINGW_MAJOR_VERSION 0
-#define __MINGW_MINOR_VERSION 0
-#define __MINGW_PATCHLEVEL 0
-
-// These four macros are deprecated and will be removed in the next major
-// version release.
#define __MINGW32_VERSION 3.20
#define __MINGW32_MAJOR_VERSION 3
#define __MINGW32_MINOR_VERSION 20
@@ -47,10 +40,10 @@
__MINGW_IMPORT The attribute definition to specify imported
variables/functions.
_CRTIMP As above. For MS compatibility.
- __MINGW_VERSION Runtime version.
- __MINGW_MAJOR_VERSION Runtime major version.
- __MINGW_MINOR_VERSION Runtime minor version.
- __MINGW_BUILD_DATE Runtime build date.
+ __MINGW32_VERSION Runtime version.
+ __MINGW32_MAJOR_VERSION Runtime major version.
+ __MINGW32_MINOR_VERSION Runtime minor version.
+ __MINGW32_BUILD_DATE Runtime build date.
Macros to enable MinGW features which deviate from standard MSVC
compatible behaviour; these may be specified directly in user code,
@@ -290,14 +283,4 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */
# endif
#endif
-struct threadlocalinfostruct;
-struct threadmbinfostruct;
-typedef struct threadlocalinfostruct *pthreadlocinfo;
-typedef struct threadmbcinfostruct *pthreadmbcinfo;
-
-typedef struct localeinfo_struct {
- pthreadlocinfo locinfo;
- pthreadmbcinfo mbcinfo;
-} _locale_tstruct, *_locale_t;
-
#endif /* __MINGW_H */
diff --git a/winsup/mingw/include/excpt.h b/winsup/mingw/include/excpt.h
index 3919cb791..e75ceb78f 100644
--- a/winsup/mingw/include/excpt.h
+++ b/winsup/mingw/include/excpt.h
@@ -75,15 +75,8 @@ typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
* onto the stack, then put a pointer to the new registration
* structure (i.e. the current stack pointer) at fs:0.
*/
-#ifdef _WIN64
-# define __try1(pHandler) \
- __asm__ __volatile__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : \
- "g" (pHandler));
-#else
-# define __try1(pHandler) \
- __asm__ __volatile__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : \
- "g" (pHandler));
-#endif
+#define __try1(pHandler) \
+ __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
/*
* A macro which (despite its name) *removes* an installed
@@ -96,15 +89,9 @@ typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
* the stack must be in the exact state at this point that it was
* after we did __try1 or this will smash things.
*/
-#ifdef _WIN64
-# define __except1 \
- __asm__ __volatile__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq \
- $16,%%rsp;" : : : "%rax");
-#else
-# define __except1 \
- __asm__ __volatile__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl \
- $8,%%esp;" : : : "%eax");
-#endif
+#define __except1 \
+ __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
+ : : : "%eax");
#ifdef __cplusplus
}
diff --git a/winsup/mingw/include/inttypes.h b/winsup/mingw/include/inttypes.h
index e13040634..2d2bb8d80 100644
--- a/winsup/mingw/include/inttypes.h
+++ b/winsup/mingw/include/inttypes.h
@@ -44,6 +44,7 @@ typedef struct {
#define PRIdFAST64 "I64d"
#define PRIdMAX "I64d"
+#define PRIdPTR "d"
#define PRIi8 "i"
#define PRIi16 "i"
@@ -61,6 +62,7 @@ typedef struct {
#define PRIiFAST64 "I64i"
#define PRIiMAX "I64i"
+#define PRIiPTR "i"
#define PRIo8 "o"
#define PRIo16 "o"
@@ -79,6 +81,8 @@ typedef struct {
#define PRIoMAX "I64o"
+#define PRIoPTR "o"
+
/* fprintf macros for unsigned types */
#define PRIu8 "u"
#define PRIu16 "u"
@@ -97,6 +101,7 @@ typedef struct {
#define PRIuFAST64 "I64u"
#define PRIuMAX "I64u"
+#define PRIuPTR "u"
#define PRIx8 "x"
#define PRIx16 "x"
@@ -114,6 +119,7 @@ typedef struct {
#define PRIxFAST64 "I64x"
#define PRIxMAX "I64x"
+#define PRIxPTR "x"
#define PRIX8 "X"
#define PRIX16 "X"
@@ -131,22 +137,7 @@ typedef struct {
#define PRIXFAST64 "I64X"
#define PRIXMAX "I64X"
-
-#ifdef _WIN64
-#define PRIdPTR "I64d"
-#define PRIiPTR "I64i"
-#define PRIoPTR "I64o"
-#define PRIuPTR "I64u"
-#define PRIxPTR "I64x"
-#define PRIXPTR "I64X"
-#else
-#define PRIdPTR "d"
-#define PRIiPTR "i"
-#define PRIoPTR "o"
-#define PRIuPTR "u"
-#define PRIxPTR "x"
#define PRIXPTR "X"
-#endif
/*
* fscanf macros for signed int types
@@ -168,6 +159,7 @@ typedef struct {
#define SCNdFAST64 "I64d"
#define SCNdMAX "I64d"
+#define SCNdPTR "d"
#define SCNi16 "hi"
#define SCNi32 "i"
@@ -182,6 +174,7 @@ typedef struct {
#define SCNiFAST64 "I64i"
#define SCNiMAX "I64i"
+#define SCNiPTR "i"
#define SCNo16 "ho"
#define SCNo32 "o"
@@ -196,6 +189,7 @@ typedef struct {
#define SCNoFAST64 "I64o"
#define SCNoMAX "I64o"
+#define SCNoPTR "o"
#define SCNx16 "hx"
#define SCNx32 "x"
@@ -210,6 +204,8 @@ typedef struct {
#define SCNxFAST64 "I64x"
#define SCNxMAX "I64x"
+#define SCNxPTR "x"
+
/* fscanf macros for unsigned int types */
@@ -226,20 +222,7 @@ typedef struct {
#define SCNuFAST64 "I64u"
#define SCNuMAX "I64u"
-
-#ifdef _WIN64
-#define SCNdPTR "I64d"
-#define SCNiPTR "I64i"
-#define SCNoPTR "I64o"
-#define SCNxPTR "I64x"
-#define SCNuPTR "I64u"
-#else
-#define SCNdPTR "d"
-#define SCNiPTR "i"
-#define SCNoPTR "o"
-#define SCNxPTR "x"
#define SCNuPTR "u"
-#endif
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/*
diff --git a/winsup/mingw/include/limits.h b/winsup/mingw/include/limits.h
index ca4900610..96ad26cec 100644
--- a/winsup/mingw/include/limits.h
+++ b/winsup/mingw/include/limits.h
@@ -29,9 +29,7 @@
* are semantically identical, with a limit of 259 characters for the
* path name, plus one for a terminating NUL, for a total of 260.
*/
-#ifndef __STRICT_ANSI__
-# define PATH_MAX 260
-#endif
+#define PATH_MAX 260
/*
* Characteristics of the char data type.
diff --git a/winsup/mingw/include/process.h b/winsup/mingw/include/process.h
index 0a3511f4d..c0c380fbd 100644
--- a/winsup/mingw/include/process.h
+++ b/winsup/mingw/include/process.h
@@ -79,28 +79,6 @@ _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnve (int, const char*, const char*
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvp (int, const char*, const char* const*);
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvpe (int, const char*, const char* const*, const char* const*);
-#ifndef _WPROCESS_DEFINED
-/* Also in wchar.h - keep in sync */
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecl (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecle (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclp (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclpe (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecv (const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecve (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvp (const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvpe (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlpe (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-
-#define _WPROCESS_DEFINED
-#endif
/*
* The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
diff --git a/winsup/mingw/include/stdint.h b/winsup/mingw/include/stdint.h
index 942a1a8fc..c6ab3bcef 100644
--- a/winsup/mingw/include/stdint.h
+++ b/winsup/mingw/include/stdint.h
@@ -19,7 +19,6 @@
#ifndef _STDINT_H
#define _STDINT_H
-#include <_mingw.h>
#define __need_wint_t
#define __need_wchar_t
#include <stddef.h>
diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h
index 60f540114..fe9f2b735 100644
--- a/winsup/mingw/include/stdio.h
+++ b/winsup/mingw/include/stdio.h
@@ -591,13 +591,10 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
-#ifndef __STRICT_ANSI__
-_CRTIMP void __cdecl __MINGW_NOTHROW _lock_file(FILE*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _unlock_file(FILE*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
+_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
+_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
@@ -608,7 +605,6 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
-#endif /* __STRICT_ANSI__ */
#endif /* __MSVCRT__ */
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h
index ece21cb44..4df18aab3 100644
--- a/winsup/mingw/include/stdlib.h
+++ b/winsup/mingw/include/stdlib.h
@@ -300,11 +300,6 @@ __MINGW_IMPORT int _fmode_dll;
#endif /* Not __STRICT_ANSI__ */
-_CRTIMP __int64 __cdecl _strtoi64(const char*, char **, int);
-_CRTIMP __int64 __cdecl _strtoi64_l(const char *, char **, int, _locale_t);
-_CRTIMP unsigned __int64 __cdecl _strtoui64(const char*, char **, int);
-_CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *, char **, int, _locale_t);
-
_CRTIMP double __cdecl __MINGW_NOTHROW atof (const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW atoi (const char*);
_CRTIMP long __cdecl __MINGW_NOTHROW atol (const char*);
@@ -328,10 +323,6 @@ _CRTIMP unsigned long __cdecl __MINGW_NOTHROW strtoul (const char*, char**, int)
#ifndef _WSTDLIB_DEFINED
/* also declared in wchar.h */
-_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int);
-_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *, wchar_t **, int, _locale_t);
-_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int);
-_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *, wchar_t **, int, _locale_t);
_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int);
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int);
_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**);
diff --git a/winsup/mingw/include/sys/param.h b/winsup/mingw/include/sys/param.h
index d38b46a5c..74966bd78 100644
--- a/winsup/mingw/include/sys/param.h
+++ b/winsup/mingw/include/sys/param.h
@@ -17,10 +17,6 @@
#define LITTLE_ENDIAN 1234
#define BYTE_ORDER LITTLE_ENDIAN
-#ifdef PATH_MAX
#define MAXPATHLEN PATH_MAX
-#else
-#define MAXPATHLEN 260
-#endif
#endif
diff --git a/winsup/mingw/include/wchar.h b/winsup/mingw/include/wchar.h
index dadeda6d3..60e8d9c2b 100644
--- a/winsup/mingw/include/wchar.h
+++ b/winsup/mingw/include/wchar.h
@@ -177,10 +177,6 @@ _CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const
_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
#endif
-_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int);
-_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *, wchar_t **, int, _locale_t);
-_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int);
-_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *, wchar_t **, int, _locale_t);
#define _WSTDLIB_DEFINED
#endif /* _WSTDLIB_DEFINED */
diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in
index afe32e5be..a495d5269 100644
--- a/winsup/mingw/mingwex/Makefile.in
+++ b/winsup/mingw/mingwex/Makefile.in
@@ -35,12 +35,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
DISTFILES = \
- Makefile.in \
+ Makefile.in configure configure.in aclocal.m4 \
_Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
feupdateenv.c ftruncate.c fwide.c getopt.c imaxabs.c imaxdiv.c \
- lltoa.c lltow.c mbsinit.c membarrier.c mingw-aligned-malloc.c \
+ lltoa.c lltow.c mbsinit.c mingw-aligned-malloc.c \
mingw-fseek.c sitest.c strtoimax.c strtoumax.c \
testwmem.c tst-aligned-malloc.c ulltoa.c ulltow.c wcstof.c \
wcstoimax.c wcstold.c wcstoumax.c wctrans.c wctype.c \
@@ -201,7 +201,7 @@ POSIX_OBJS = \
dirent.o wdirent.o getopt.o ftruncate.o gettimeofday.o usleep.o \
basename.o dirname.o tsearch.o twalk.o tdelete.o tfind.o
REPLACE_OBJS = \
- membarrier.o mingw-aligned-malloc.o mingw-fseek.o
+ mingw-aligned-malloc.o mingw-fseek.o
COMPLEX_OBJS = \
cabs.o cabsf.o cabsl.o cacos.o cacosf.o cacosl.o cacosh.o \
cacoshf.o cacoshl.o carg.o cargf.o cargl.o casin.o casinf.o \
diff --git a/winsup/mingw/mingwex/gdtoa/gd_qnan.h b/winsup/mingw/mingwex/gdtoa/gd_qnan.h
index 0b468c492..87eba8fb3 100644
--- a/winsup/mingw/mingwex/gdtoa/gd_qnan.h
+++ b/winsup/mingw/mingwex/gdtoa/gd_qnan.h
@@ -1,12 +1,12 @@
-#define f_QNAN 0x7fc00000
+#define f_QNAN 0xffc00000
#define d_QNAN0 0x0
-#define d_QNAN1 0x7ff80000
+#define d_QNAN1 0xfff80000
#define ld_QNAN0 0x0
#define ld_QNAN1 0xc0000000
-#define ld_QNAN2 0x7fff
+#define ld_QNAN2 0xffff
#define ld_QNAN3 0x0
#define ldus_QNAN0 0x0
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
#define ldus_QNAN3 0xc000
-#define ldus_QNAN4 0x7fff
+#define ldus_QNAN4 0xffff
diff --git a/winsup/mingw/mingwex/membarrier.c b/winsup/mingw/mingwex/membarrier.c
deleted file mode 100644
index b8da9f7de..000000000
--- a/winsup/mingw/mingwex/membarrier.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-void __mingworg_MemoryBarrier(void);
-void __mingworg_MemoryBarrier(void)
-{
- long Barrier = 0;
- __asm__ __volatile__("xchgl %%eax,%0 "
- :"=r" (Barrier));
-}
-
diff --git a/winsup/mingw/mingwex/tsearch.c b/winsup/mingw/mingwex/tsearch.c
index 55f192214..a0aa0eb36 100755
--- a/winsup/mingw/mingwex/tsearch.c
+++ b/winsup/mingw/mingwex/tsearch.c
@@ -23,33 +23,29 @@ tsearch(const void * __restrict__ vkey, /* key to be located */
void ** __restrict__ vrootp, /* address of tree root */
int (*compar) (const void *, const void *))
{
- node_t *q, **n;
+ node_t *q;
node_t **rootp = (node_t **)vrootp;
if (rootp == NULL)
return NULL;
- n = rootp;
- while (*n != NULL) { /* Knuth's T1: */
+ while (*rootp != NULL) { /* Knuth's T1: */
int r;
- if ((r = (*compar)(vkey, ((*n)->key))) == 0) /* T2: */
- return *n; /* we found it! */
+ if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
+ return *rootp; /* we found it! */
- n = (r < 0) ?
+ rootp = (r < 0) ?
&(*rootp)->llink : /* T3: follow left branch */
&(*rootp)->rlink; /* T4: follow right branch */
- if (*n == NULL)
- break;
- rootp = n;
}
q = malloc(sizeof(node_t)); /* T5: key not found */
- if (!q)
- return q;
- *n = q; /* make new node */
- /* LINTED const castaway ok */
- q->key = (void *)vkey; /* initialize new node */
- q->llink = q->rlink = NULL;
+ if (q != 0) { /* make new node */
+ *rootp = q; /* link new node to old */
+ /* LINTED const castaway ok */
+ q->key = (void *)vkey; /* initialize new node */
+ q->llink = q->rlink = NULL;
+ }
return q;
}
diff --git a/winsup/mingw/profile/Makefile.in b/winsup/mingw/profile/Makefile.in
index afd480960..83a288033 100644
--- a/winsup/mingw/profile/Makefile.in
+++ b/winsup/mingw/profile/Makefile.in
@@ -33,8 +33,8 @@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
-DISTFILES = Makefile.in gcrt0.c gmon.c gmon.h \
- mcount.c profil.c profil.h profile.h CYGWIN_LICENSE COPYING
+DISTFILES = Makefile.in configure configure.in aclocal.m4 gcrt0.c gmon.c gmon.h \
+mcount.c profil.c profil.h profile.h CYGWIN_LICENSE COPYING
CC = @CC@
# FIXME: Which is it, CC or CC_FOR_TARGET?
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index 4d934a437..218cd5aa0 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -1,7 +1,3 @@
-2012-04-24 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * configure: Regenerate.
-
2011-03-21 Corinna Vinschen <corinna@vinschen.de>
* libltp/lib/get_high_address.c: Align copyright with upstream.
diff --git a/winsup/testsuite/configure b/winsup/testsuite/configure
index f0767845a..4d97f3f1a 100644
--- a/winsup/testsuite/configure
+++ b/winsup/testsuite/configure
@@ -1,422 +1,81 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
-#
+# Generated by GNU Autoconf 2.59.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_unset $as_var
fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
+done
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-as_me=`$as_basename -- "$0" ||
+# Name of the executable.
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -424,107 +83,146 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
- s/-\n.*//
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
# Exit status is that of the last command.
exit
}
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
+ as_expr=false
fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
+rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
+ as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -533,25 +231,38 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+exec 6>&1
+
#
# Initializations.
#
ac_default_prefix=/usr/local
-ac_clean_files=
ac_config_libobj_dir=.
-LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME=
@@ -559,78 +270,14 @@ PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
-PACKAGE_URL=
ac_unique_file="Makefile.in"
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-AR
-CPP
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP AR ac_ct_AR LIBOBJS LTLIBOBJS'
ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP'
-
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -653,49 +300,34 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
+datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
ac_prev=
-ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
+ eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
- case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -717,59 +349,33 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad)
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
datadir=$ac_optarg ;;
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
-disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
esac
- eval enable_$ac_useropt=\$ac_optarg ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -796,12 +402,6 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -826,16 +426,13 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -900,16 +497,6 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -960,36 +547,26 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
esac
- eval with_$ac_useropt=\$ac_optarg ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -1009,26 +586,27 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
@@ -1036,36 +614,31 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
+ eval ac_val=$`echo $ac_var`
case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
- # Be sure to have absolute directory names.
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1079,8 +652,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1092,72 +665,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
-
-
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
+ if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
#
# Report the --help message.
@@ -1180,17 +755,20 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
+ -q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
+_ACEOF
+
+ cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1200,25 +778,18 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
_ACEOF
cat <<\_ACEOF
@@ -1234,176 +805,126 @@ Some influential environment variables:
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
_ACEOF
-ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
+ test -d $ac_dir || continue
ac_builddir=.
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
case $srcdir in
- .) # We are building in place.
+ .) # No --srcdir option. We are building in place.
ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd "$ac_popdir"
done
fi
-test -n "$ac_init_help" && exit $ac_status
+test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
+ exit 0
fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-cat >config.log <<_ACEOF
+exec 5>config.log
+cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
_ACEOF
-exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -1422,7 +943,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1434,9 +955,8 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
+ echo "PATH: $as_dir"
+done
} >&5
@@ -1458,6 +978,7 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
+ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1468,13 +989,13 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1490,115 +1011,104 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- as_fn_append ac_configure_args " '$ac_arg'"
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
;;
esac
done
done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ cat <<\_ASBOX
+## ---------------- ##
## Cache variables. ##
-## ---------------- ##"
+## ---------------- ##
+_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
+{
(set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
*)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
- esac |
- sort
-)
+ esac;
+}
echo
- $as_echo "## ----------------- ##
+ cat <<\_ASBOX
+## ----------------- ##
## Output variables. ##
-## ----------------- ##"
+## ----------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
echo
for ac_var in $ac_subst_files
do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ cat <<\_ASBOX
+## ----------- ##
## confdefs.h. ##
-## ----------- ##"
+## ----------- ##
+_ASBOX
echo
- cat confdefs.h
+ sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
-' 0
+ ' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
# Predefined preprocessor variables.
@@ -1606,137 +1116,112 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
+
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
+
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
+
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+ . "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1746,6 +1231,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -1754,10 +1256,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1767,37 +1269,35 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1807,50 +1307,39 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
+ CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1860,37 +1349,77 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1901,19 +1430,18 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -1931,25 +1459,24 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
+ for ac_prog in cl
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1959,41 +1486,39 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl.exe
+ for ac_prog in cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2003,78 +1528,66 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
test -n "$ac_ct_CC" && break
done
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
+ CC=$ac_ct_CC
fi
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2086,108 +1599,112 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
break;;
* )
break;;
esac
done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+
ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2195,90 +1712,38 @@ $as_echo "$ac_try_echo"; } >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
break;;
* ) break;;
esac
done
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2290,46 +1755,45 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- $as_echo "$as_me: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
+
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2343,49 +1807,54 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
- ac_compiler_gnu=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
@@ -2396,34 +1865,38 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
+ac_cv_prog_cc_g=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2439,14 +1912,18 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_prog_cc_c89=no
+ ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
@@ -2474,17 +1951,12 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
+ as 'x'. The following induces an error, until -std1 is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
+ that's true only with -std1. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2499,37 +1971,201 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
+rm -f conftest.err conftest.$ac_objext
done
-rm -f conftest.$ac_ext
+rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
*)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2541,15 +2177,15 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -2563,7 +2199,11 @@ do
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2572,34 +2212,78 @@ do
#endif
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
+ # OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
break
fi
@@ -2611,8 +2295,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -2622,7 +2306,11 @@ do
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2631,40 +2319,85 @@ do
#endif
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
+ # OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
@@ -2676,10 +2409,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -2689,37 +2422,35 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
fi
if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -2729,45 +2460,33 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
- done
-IFS=$as_save_IFS
+done
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test "x$ac_ct_AR" = x; then
- AR=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
+ AR=$ac_ct_AR
else
AR="$ac_cv_prog_AR"
fi
-ac_config_files="$ac_config_files Makefile"
-
+ ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -2786,70 +2505,39 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
+# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
+{
(set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
+ ;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
- esac |
- sort
-) |
+ esac;
+} |
sed '
- /^ac_cv_env_/b end
t clear
- :clear
+ : clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- if test ! -f "$cache_file" || test -h "$cache_file"; then
- cat confcache >"$cache_file"
- else
- case $cache_file in #(
- */* | ?:*)
- mv -f confcache "$cache_file"$$ &&
- mv -f "$cache_file"$$ "$cache_file" ;; #(
- *)
- mv -f confcache "$cache_file" ;;
- esac
- fi
- fi
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
@@ -2858,55 +2546,63 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
+# take arguments), then we branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
+cat >confdef2opt.sed <<\_ACEOF
t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
ac_libobjs=
ac_ltlibobjs=
-U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -2914,14 +2610,12 @@ LTLIBOBJS=$ac_ltlibobjs
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
+: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -2931,253 +2625,81 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-
SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
+done
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-as_me=`$as_basename -- "$0" ||
+# Name of the executable.
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -3185,123 +2707,148 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
+ as_expr=false
fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
+rm -f conf$$ conf$$.exe conf$$.file
-} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
+ as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -3310,20 +2857,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -3331,116 +2889,124 @@ generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
_ACEOF
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
-_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
+\`$as_me' instantiates files from templates according to the
+current configuration.
-Usage: $0 [OPTION]... [TAG]...
+Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
-Report bugs to the package provider."
-
+Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+
+cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.68,
- with options \\"\$ac_cs_config\\"
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-test -n "\$AWK" || AWK=awk
+srcdir=$srcdir
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ac_shift=:
;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
+ -*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
+ *) ac_config_targets="$ac_config_targets $1" ;;
esac
shift
@@ -3454,44 +3020,30 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Handling of arguments.
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
done
-
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -3501,414 +3053,328 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
+# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
- tmp= ac_tmp=
- trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
}
+
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
}
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# CONFIG_FILES section.
+#
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CPP@,$CPP,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
+_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
- case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- ac_dir=`$as_dirname -- "$ac_file" ||
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
ac_builddir=.
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
case $srcdir in
- .) # We are building in place.
+ .) # No --srcdir option. We are building in place.
ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$ac_tmp/stdin"
- case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-
-
-
- esac
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
-done # for ac_tag
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-as_fn_exit 0
+{ (exit 0); exit 0; }
_ACEOF
+chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -3928,10 +3394,6 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ $ac_cs_success || { (exit 1); exit 1; }
fi
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 3286cf432..50a957ae4 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,63 +1,3 @@
-2012-07-11 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (cygcheck.exe): Link against psapi.dll.
- * bloda.cc: Change include section to work with Mingw64 headers.
- Include psapi.h. Use SystemProcessInformation instead of
- SystemProcessesAndThreadsInformation throughout and add define for
- w32api headers. Ditto for PSYSTEM_PROCESS_INFORMATION vs.
- PSYSTEM_PROCESSES.
- (system_module_list): New type to replace SYSTEM_MODULE_INFORMATION.
- Change usage throughout accordingly.
- (get_module_list): Fetch module list using PSAPI functions
- EnumDeviceDrivers and GetDeviceDriverBaseNameA.
- * cygcheck.cc (max): Define as __max if not defined already.
- (alloca): Only define if not defined already.
- (handle_unique_object_name): Use explicit sharing flags rather than
- FILE_SHARE_VALID_FLAGS which officially is only available in DDK
- headers.
- (PRODUCT_ULTIMATE_E): Only define if not defined already.
- * dump_setup.cc: Change include section to work with Mingw64 headers.
- (NtQueryAttributesFile): Drop NTOSAPI aka DECLSPEC_IMPORT.
- * strace.cc: Change include section to work with Mingw64 headers.
- (alloca): Only define if not defined already.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.cc: Change including headers to allow building against
- Mingw64 headers. Include ntdef.h and ntdll.h rather than ddk headers.
- Define _WIN32_WINNT and WINVER as 0x0602.
- (RtlEqualUnicodePathPrefix): Drop definition. Pulled in from ntdll.h
- now.
- (get_device_name): s/Zw/Nt.
- * dumper.cc: Include sys/param.h
- (dumper::dump_memory_region): Use MIN rather than min.
- * locale.cc: Include stdlib.h. Define _WIN32_WINNT and WINVER as
- 0x0602.
- * ps.cc: Include ntdef.h and ntdll.h rather than ddk headers.
- * regtool.cc (regDeleteKeyEx): Drop WINADVAPI qualifier.
-
-2012-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Change "Server 8" to official
- "Server 2012".
-
-2012-05-05 Corinna Vinschen <corinna@vinschen.de>
-
- * mkpasswd.c (current_user): Actually *use* $HOME if it's available.
- Add comment to explain what we're doing here.
-
-2012-04-05 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (print_special_by_sid): Rename from print_special. Change
- calls throughout.
- (print_special_by_name): New function.
- (main): Call print_special_by_name for TrustedInstaller account.
- * mkpasswd.c (print_special_by_sid): Rename from print_special. Change
- calls throughout.
- (print_special_by_name): New function.
- (enum_std_accounts): Call print_special_by_name for TrustedInstaller
- account.
-
2012-02-24 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* pldd.c: Fix typo in license header.
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index f3030a175..25ee5c48a 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -74,7 +74,7 @@ path-mount.o: path.cc
mount.exe: path-mount.o
# Provide any necessary per-target variable overrides.
-cygcheck.exe: MINGW_LDFLAGS += -lpsapi -lntdll
+cygcheck.exe: MINGW_LDFLAGS += -lntdll
cygpath.exe: ALL_LDFLAGS += -lcygwin -luserenv -lntdll
cygpath.exe: CXXFLAGS += -fno-threadsafe-statics
ps.exe: ALL_LDFLAGS += -lcygwin -lpsapi -lntdll
diff --git a/winsup/utils/bloda.cc b/winsup/utils/bloda.cc
index dcb18f1a4..2cd799aea 100644
--- a/winsup/utils/bloda.cc
+++ b/winsup/utils/bloda.cc
@@ -11,23 +11,10 @@
#define cygwin_internal cygwin_internal_dontuse
#include <stdio.h>
#include <assert.h>
-#define WIN32_NO_STATUS /* Disable status codes in winnt.h since we include
- ntstatus.h for extended status codes below. */
#include <windows.h>
-#undef WIN32_NO_STATUS
-#include <psapi.h>
-#ifndef __MINGW64_VERSION_MAJOR
-# include <ntdef.h>
-# include <ddk/ntstatus.h>
-# include <ddk/ntapi.h>
-# define SystemProcessInformation SystemProcessesAndThreadsInformation
-# define PSYSTEM_PROCESS_INFORMATION PSYSTEM_PROCESSES
-# define ImageName ProcessName
-# define NextEntryOffset NextEntryDelta
-#else
-# include <winternl.h>
-# include <ntstatus.h>
-#endif
+#include <ntdef.h>
+#include <ddk/ntstatus.h>
+#include <ddk/ntapi.h>
#undef cygwin_internal
#undef DEBUGGING
@@ -121,77 +108,68 @@ static struct bad_app_info big_list_of_dodgy_apps[] =
static const size_t num_of_dodgy_apps = sizeof (big_list_of_dodgy_apps) / sizeof (big_list_of_dodgy_apps[0]);
-struct system_module_list
-{
- LONG count;
- PVOID *pid;
- PCHAR *name;
-};
-
-static PSYSTEM_PROCESS_INFORMATION
+static PSYSTEM_PROCESSES
get_process_list (void)
{
int n_procs = 0x100;
- PSYSTEM_PROCESS_INFORMATION pslist = (PSYSTEM_PROCESS_INFORMATION) malloc (n_procs * sizeof *pslist);
+ PSYSTEM_PROCESSES pslist = (PSYSTEM_PROCESSES) malloc (n_procs * sizeof *pslist);
- while (NtQuerySystemInformation (SystemProcessInformation,
+ while (NtQuerySystemInformation (SystemProcessesAndThreadsInformation,
pslist, n_procs * sizeof *pslist, 0) == STATUS_INFO_LENGTH_MISMATCH)
{
n_procs *= 2;
free (pslist);
- pslist = (PSYSTEM_PROCESS_INFORMATION) malloc (n_procs * sizeof *pslist);
+ pslist = (PSYSTEM_PROCESSES) malloc (n_procs * sizeof *pslist);
}
return pslist;
}
-static system_module_list *
+static PSYSTEM_MODULE_INFORMATION
get_module_list (void)
{
- DWORD modsize = 0;
- system_module_list *modlist = (system_module_list *)
- calloc (1, sizeof (system_module_list));
- while (!EnumDeviceDrivers (modlist->pid, modsize, &modsize))
- {
- free (modlist->pid);
- free (modlist->name);
- modlist->count = modsize / sizeof (PVOID);
- modlist->pid = (PVOID *) calloc (modlist->count, sizeof (PVOID));
- modlist->name = (PCHAR *) calloc (modlist->count, sizeof (PCHAR));
- }
- for (int i = 0; i < modlist->count; ++i)
+ int modsize = 0x1000;
+ PSYSTEM_MODULE_INFORMATION modlist = (PSYSTEM_MODULE_INFORMATION) malloc (modsize);
+
+ while (NtQuerySystemInformation (SystemModuleInformation,
+ modlist, modsize, NULL) == STATUS_INFO_LENGTH_MISMATCH)
{
- modlist->name[0] = (PCHAR) calloc (256, sizeof (CHAR));
- GetDeviceDriverBaseNameA (modlist->pid[i], modlist->name[i], 256);
+ modsize *= 2;
+ free (modlist);
+ modlist = (PSYSTEM_MODULE_INFORMATION) malloc (modsize);
}
return modlist;
}
static bool
-find_process_in_list (PSYSTEM_PROCESS_INFORMATION pslist, PUNICODE_STRING psname)
+find_process_in_list (PSYSTEM_PROCESSES pslist, PUNICODE_STRING psname)
{
while (1)
{
- if (pslist->ImageName.Length && pslist->ImageName.Buffer)
+ if (pslist->ProcessName.Length && pslist->ProcessName.Buffer)
{
- dbg_printf (("%S\n", pslist->ImageName.Buffer));
- if (!_wcsicmp (pslist->ImageName.Buffer, psname->Buffer))
+ dbg_printf (("%S\n", pslist->ProcessName.Buffer));
+ if (!_wcsicmp (pslist->ProcessName.Buffer, psname->Buffer))
return true;
}
- if (!pslist->NextEntryOffset)
+ if (!pslist->NextEntryDelta)
break;
- pslist = (PSYSTEM_PROCESS_INFORMATION)(pslist->NextEntryOffset + (char *)pslist);
+ pslist = (PSYSTEM_PROCESSES)(pslist->NextEntryDelta + (char *)pslist);
};
return false;
}
static bool
-find_module_in_list (system_module_list * modlist, const char * const modname)
+find_module_in_list (PSYSTEM_MODULE_INFORMATION modlist, const char * const modname)
{
- for (int i = 0; i < modlist->count; ++i)
+ PSYSTEM_MODULE_INFORMATION_ENTRY modptr = &modlist->Module[0];
+ DWORD count = modlist->Count;
+ while (count--)
{
- dbg_printf (("name '%s' ", modlist->name[i]));
- if (!_stricmp (modlist->name[i], modname))
+ dbg_printf (("name '%s' offset %d ", &modptr->ImageName[0], modptr->PathLength));
+ dbg_printf (("= '%s'\n", &modptr->ImageName[modptr->PathLength]));
+ if (!_stricmp (&modptr->ImageName[modptr->PathLength], modname))
return true;
+ modptr++;
}
return false;
}
@@ -255,7 +233,7 @@ expand_path (const char *path, char *outbuf)
}
static bool
-detect_dodgy_app (const struct bad_app_det *det, PSYSTEM_PROCESS_INFORMATION pslist, system_module_list * modlist)
+detect_dodgy_app (const struct bad_app_det *det, PSYSTEM_PROCESSES pslist, PSYSTEM_MODULE_INFORMATION modlist)
{
HANDLE fh;
HKEY hk;
@@ -356,8 +334,8 @@ void
dump_dodgy_apps (int verbose)
{
size_t i, n_det = 0;
- PSYSTEM_PROCESS_INFORMATION pslist;
- system_module_list * modlist;
+ PSYSTEM_PROCESSES pslist;
+ PSYSTEM_MODULE_INFORMATION modlist;
/* Read system info for detect testing. */
pslist = get_process_list ();
@@ -426,9 +404,6 @@ dump_dodgy_apps (int verbose)
}
/* Tidy up allocations. */
free (pslist);
- for (int i = 0; i < modlist->count; ++i)
- free (modlist->name[i]);
- free (modlist->name);
- free (modlist->pid);
+ free (modlist);
}
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index de45addd2..52411c881 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -1,7 +1,7 @@
/* cygcheck.cc
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -30,13 +30,7 @@
#undef cygwin_internal
#include "loadlib.h"
-#ifndef max
-#define max __max
-#endif
-
-#ifndef alloca
#define alloca __builtin_alloca
-#endif
int verbose = 0;
int registry = 0;
@@ -1320,7 +1314,7 @@ handle_unique_object_name (int opt, char *path)
if (opt == CO_SHOW_UON)
{
access = GENERIC_READ;
- share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
+ share = FILE_SHARE_VALID_FLAGS;
protect = PAGE_READONLY;
mapping = FILE_MAP_READ;
}
@@ -1442,7 +1436,7 @@ dump_sysinfo ()
else if (osversion.dwMinorVersion == 2)
{
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "8" : "Server 2012");
+ ? "8" : "Server 8");
strcat (osname, " (not yet supported!)");
}
DWORD prod;
@@ -1453,9 +1447,7 @@ dump_sysinfo ()
&prod))
{
#define PRODUCT_UNLICENSED 0xabcdabcd
-#ifndef PRODUCT_ULTIMATE_E
#define PRODUCT_ULTIMATE_E 0x00000047
-#endif
const char *products[] =
{
/* 0x00000000 */ "",
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 77ee38426..662112fe5 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -8,6 +8,10 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#define NOCOMATTRIBUTE
+
+#define WINVER 0x0600
+#include <shlobj.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
@@ -15,22 +19,17 @@ details. */
#include <stdlib.h>
#include <limits.h>
#include <getopt.h>
+#include <windows.h>
+#include <userenv.h>
#include <io.h>
#include <sys/fcntl.h>
#include <sys/cygwin.h>
#include <cygwin/version.h>
#include <ctype.h>
#include <errno.h>
-
-#define _WIN32_WINNT 0x0602
-#define WINVER 0x0602
-#define NOCOMATTRIBUTE
-#include <windows.h>
-#include <userenv.h>
-#include <shlobj.h>
-#include <ntdef.h>
-#include <ntdll.h>
-
+#include <ddk/ntddk.h>
+#include <ddk/winddk.h>
+#include <ddk/ntifs.h>
#include "wide_path.h"
#include "loadlib.h"
@@ -149,6 +148,18 @@ RtlAllocateUnicodeString (PUNICODE_STRING uni, ULONG size)
return uni->Buffer != NULL;
}
+static inline BOOLEAN
+RtlEqualUnicodePathPrefix (PUNICODE_STRING path, PUNICODE_STRING prefix,
+ BOOLEAN caseinsensitive)
+ {
+ UNICODE_STRING p;
+
+ p.Length = p.MaximumLength = prefix->Length < path->Length
+ ? prefix->Length : path->Length;
+ p.Buffer = path->Buffer;
+ return RtlEqualUnicodeString (&p, prefix, caseinsensitive);
+ }
+
static size_t
my_wcstombs (char *dest, const wchar_t *src, size_t n)
{
@@ -192,11 +203,11 @@ get_device_name (char *path)
query it and use the new name as actual device name to search for in the
DOS device name directory. If not, just use the incoming device name. */
InitializeObjectAttributes (&ntobj, &ntdev, OBJ_CASE_INSENSITIVE, NULL, NULL);
- status = NtOpenSymbolicLinkObject (&lnk, SYMBOLIC_LINK_QUERY, &ntobj);
+ status = ZwOpenSymbolicLinkObject (&lnk, SYMBOLIC_LINK_QUERY, &ntobj);
if (NT_SUCCESS (status))
{
- status = NtQuerySymbolicLinkObject (lnk, &tgtdev, NULL);
- NtClose (lnk);
+ status = ZwQuerySymbolicLinkObject (lnk, &tgtdev, NULL);
+ ZwClose (lnk);
if (!NT_SUCCESS (status))
goto out;
RtlCopyUnicodeString (&ntdev, &tgtdev);
@@ -214,28 +225,28 @@ get_device_name (char *path)
/* Open the directory... */
InitializeObjectAttributes (&ntobj, &ntdevdir, OBJ_CASE_INSENSITIVE,
NULL, NULL);
- status = NtOpenDirectoryObject (&dir, DIRECTORY_QUERY, &ntobj);
+ status = ZwOpenDirectoryObject (&dir, DIRECTORY_QUERY, &ntobj);
if (!NT_SUCCESS (status))
break;
/* ...and scan it. */
for (restart = TRUE, cont = 0;
- NT_SUCCESS (NtQueryDirectoryObject (dir, odi, 4096, TRUE,
+ NT_SUCCESS (ZwQueryDirectoryObject (dir, odi, 4096, TRUE,
restart, &cont, NULL));
restart = FALSE)
{
/* For each entry check if it's a symbolic link. */
InitializeObjectAttributes (&ntobj, &odi->ObjectName,
OBJ_CASE_INSENSITIVE, dir, NULL);
- status = NtOpenSymbolicLinkObject (&lnk, SYMBOLIC_LINK_QUERY, &ntobj);
+ status = ZwOpenSymbolicLinkObject (&lnk, SYMBOLIC_LINK_QUERY, &ntobj);
if (!NT_SUCCESS (status))
continue;
tgtdev.Length = 0;
tgtdev.MaximumLength = 512;
/* If so, query it and compare the target of the symlink with the
incoming device name. */
- status = NtQuerySymbolicLinkObject (lnk, &tgtdev, NULL);
- NtClose (lnk);
+ status = ZwQuerySymbolicLinkObject (lnk, &tgtdev, NULL);
+ ZwClose (lnk);
if (!NT_SUCCESS (status))
continue;
if (tgtdev.Length /* There's actually a symlink pointing to an
@@ -282,12 +293,12 @@ get_device_name (char *path)
else
memmove (ret, ret + 4, strlen (ret + 4) + 1);
}
- NtClose (dir);
+ ZwClose (dir);
goto out;
}
}
}
- NtClose (dir);
+ ZwClose (dir);
}
out:
diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc
index f463caf14..70f03eed5 100644
--- a/winsup/utils/dump_setup.cc
+++ b/winsup/utils/dump_setup.cc
@@ -8,6 +8,7 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -16,18 +17,9 @@ details. */
#include <io.h>
#include <sys/stat.h>
#include <errno.h>
-#define WIN32_NO_STATUS /* Disable status codes in winnt.h since we include
- ntstatus.h for extended status codes below. */
-#include <windows.h>
-#undef WIN32_NO_STATUS
-#ifndef __MINGW64_VERSION_MAJOR
-# include <ddk/ntapi.h>
-# include <ddk/winddk.h>
-#else
-# include <winternl.h>
-# include <ntstatus.h>
-#endif
#include "path.h"
+#include <ddk/ntapi.h>
+#include <ddk/winddk.h>
#if 0
#include "zlib.h"
#endif
@@ -273,8 +265,8 @@ transform_chars (PWCHAR path, PWCHAR path_end)
*path = tfx_chars[*path];
}
-extern "C" NTAPI NTSTATUS NtQueryAttributesFile (POBJECT_ATTRIBUTES,
- PFILE_BASIC_INFORMATION);
+extern "C" NTOSAPI NTAPI NTSTATUS NtQueryAttributesFile(
+ POBJECT_ATTRIBUTES, PFILE_BASIC_INFORMATION);
/* This function checks for file existance and fills the stat structure
with only the required mode info. We're using a native NT function
diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
index 28d0add04..3b92bcc18 100644
--- a/winsup/utils/dumper.cc
+++ b/winsup/utils/dumper.cc
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <sys/param.h>
#include <windows.h>
#include "dumper.h"
@@ -381,7 +380,7 @@ dumper::dump_memory_region (asection * to, process_mem_region * memory)
while (size > 0)
{
- todo = MIN (size, PAGE_BUFFER_SIZE);
+ todo = min (size, PAGE_BUFFER_SIZE);
if (!ReadProcessMemory (hProcess, pos, mem_buf, todo, &done))
{
deb_printf ("Failed to read process memory at %x(%x), error %ld\n", pos, todo, GetLastError ());
diff --git a/winsup/utils/locale.cc b/winsup/utils/locale.cc
index be57cf161..e3c39c049 100644
--- a/winsup/utils/locale.cc
+++ b/winsup/utils/locale.cc
@@ -25,7 +25,6 @@
*/
#include <errno.h>
#include <stdio.h>
-#include <stdlib.h>
#include <ctype.h>
#include <getopt.h>
#include <string.h>
@@ -35,8 +34,7 @@
#include <limits.h>
#include <sys/cygwin.h>
#include <cygwin/version.h>
-#define _WIN32_WINNT 0x0602
-#define WINVER 0x0602
+#define WINVER 0x0601
#include <windows.h>
#define LOCALE_ALIAS "/usr/share/locale/locale.alias"
diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c
index f712553c4..393d8f8f7 100644
--- a/winsup/utils/mkgroup.c
+++ b/winsup/utils/mkgroup.c
@@ -1,7 +1,7 @@
/* mkgroup.c:
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -558,9 +558,9 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
}
static void
-print_special_by_sid (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
- DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
- DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
+print_special (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
+ DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
+ DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
{
WCHAR grp[GNLEN + 1], dom[MAX_DOMAIN_NAME_LEN + 1];
DWORD glen, dlen, rid;
@@ -597,23 +597,6 @@ print_special_by_sid (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
}
}
-static void
-print_special_by_name (PCWSTR name, gid_t gid)
-{
- DWORD size = 256, dom_size = 256;
- PSID sid = (PSID) alloca (size);
- WCHAR dom[dom_size];
- SID_NAME_USE use;
-
- PWCHAR name_only = wcschr (name, L'\\');
- if (name_only)
- ++name_only;
-
- if (LookupAccountNameW (NULL, name, sid, &size, dom, &dom_size, &use))
- printf ("%ls:%s:%lu:\n",
- name_only ?: name, put_sid (sid), (unsigned long) gid);
-}
-
static int
usage (FILE * stream)
{
@@ -747,8 +730,8 @@ main (int argc, char **argv)
if (argc == 1)
{
- print_special_by_sid (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0);
+ print_special (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
+ 0, 0, 0, 0, 0, 0, 0);
if (in_domain)
{
if (!enum_local_groups (TRUE, NULL, sep_char, id_offset,
@@ -874,11 +857,8 @@ skip:
/* Get 'system' group */
if (!disp_groupname && print_system && print_builtin && print_domlist)
- {
- print_special_by_sid (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0);
- print_special_by_name (L"NT SERVICE\\TrustedInstaller", -2);
- }
+ print_special (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
+ 0, 0, 0, 0, 0, 0, 0);
off = id_offset;
for (i = 0; i < print_domlist; ++i)
diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c
index 5373719c5..c873664f9 100644
--- a/winsup/utils/mkpasswd.c
+++ b/winsup/utils/mkpasswd.c
@@ -1,7 +1,7 @@
/* mkpasswd.c:
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
- 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
+ 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -172,13 +172,9 @@ current_user (const char *sep, const char *passed_home_path, DWORD id_offset,
*GetSidSubAuthorityCount(curr_pgrp.psid) - 1);
if (passed_home_path[0] == '\0')
{
- char *envhome = getenv ("HOME");
+ char *envhome = getenv ("HOME"); /* POSIX! */
- /* If $HOME exists and is non-empty, just copy it over to homedir_psx.
- Otherwise, generate a new path of the form "/home/$USER". */
- if (envhome && envhome[0] != '\0')
- strncat (homedir_psx, envhome, sizeof (homedir_psx) - 1);
- else
+ if (!envhome || envhome[0] == '\0')
{
wcstombs (stpncpy (homedir_psx, "/home/", sizeof (homedir_psx)),
user, sizeof (homedir_psx) - 6);
@@ -459,9 +455,9 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
}
static void
-print_special_by_sid (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
- DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
- DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
+print_special (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
+ DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
+ DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
{
WCHAR user[UNLEN + 1], dom[MAX_DOMAIN_NAME_LEN + 1];
DWORD len, len2, rid;
@@ -585,29 +581,6 @@ print_version ()
}
static void
-print_special_by_name (PCWSTR name, uid_t uid, gid_t gid)
-{
- DWORD size = 256, dom_size = 256;
- PSID sid = (PSID) alloca (size);
- WCHAR dom[dom_size];
- SID_NAME_USE use;
-
- PWCHAR name_only = wcschr (name, L'\\');
- if (name_only)
- ++name_only;
-
- if (LookupAccountNameW (NULL, name, sid, &size, dom, &dom_size, &use))
- printf ("%ls:*:%lu:%lu:U-%ls%s%ls,%s::\n",
- name_only ?: name,
- (unsigned long) uid,
- (unsigned long) gid,
- name_only ? dom : L"",
- name_only ? "\\" : "",
- name_only ?: name,
- put_sid (sid));
-}
-
-static void
enum_std_accounts ()
{
/* Generate service starter account entries. */
@@ -615,10 +588,8 @@ enum_std_accounts ()
printf ("LocalService:*:19:544:U-NT AUTHORITY\\LocalService,S-1-5-19::\n");
printf ("NetworkService:*:20:544:U-NT AUTHORITY\\NetworkService,S-1-5-20::\n");
/* Get 'administrators' group (has localized name). */
- print_special_by_sid (&sid_nt_auth, 2, SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0);
- /* Fetch "TrustedInstaller" account starting with Vista. */
- print_special_by_name (L"NT SERVICE\\TrustedInstaller", -2, -2);
+ print_special (&sid_nt_auth, 2, SECURITY_BUILTIN_DOMAIN_RID,
+ DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0);
}
static PPOLICY_PRIMARY_DOMAIN_INFO p_dom;
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
index 7ed69ea9b..e026518c4 100644
--- a/winsup/utils/ps.cc
+++ b/winsup/utils/ps.cc
@@ -23,8 +23,8 @@ details. */
#include <sys/cygwin.h>
#include <cygwin/version.h>
#include <psapi.h>
-#include <ntdef.h>
-#include <ntdll.h>
+#include <ddk/ntapi.h>
+#include <ddk/winddk.h>
#include "loadlib.h"
/* Maximum possible path length under NT. There's no official define
@@ -347,7 +347,7 @@ main (int argc, char *argv[])
unicode_buf to have enough space for a maximum sized
UNICODE_STRING. */
if (uni->Length == 0) /* System process */
- win32path = (wchar_t *) L"System";
+ win32path = L"System";
else
{
uni->Buffer[uni->Length / sizeof (WCHAR)] = L'\0';
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index 5a4244e3e..cc28d485e 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -574,7 +574,7 @@ cmd_add ()
}
extern "C" {
- LONG WINAPI (*regDeleteKeyEx)(HKEY, LPCWSTR, REGSAM, DWORD);
+WINADVAPI LONG WINAPI (*regDeleteKeyEx)(HKEY, LPCWSTR, REGSAM, DWORD);
}
int
@@ -587,7 +587,7 @@ cmd_remove ()
{
HMODULE mod = LoadLibrary ("advapi32.dll");
if (mod)
- regDeleteKeyEx = (LONG WINAPI (*)(HKEY, LPCWSTR, REGSAM, DWORD)) GetProcAddress (mod, "RegDeleteKeyExW");
+ regDeleteKeyEx = (WINADVAPI LONG WINAPI (*)(HKEY, LPCWSTR, REGSAM, DWORD)) GetProcAddress (mod, "RegDeleteKeyExW");
}
if (regDeleteKeyEx)
rv = (*regDeleteKeyEx) (key, value, wow64, 0);
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index f9d2eb323..f8662582d 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -11,12 +11,6 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#include <windows.h>
-#ifndef __MINGW64_VERSION_MAJOR
-#include "ddk/ntapi.h"
-#else
-#include <winternl.h>
-#endif
#define cygwin_internal cygwin_internal_dontuse
#include <stdio.h>
#include <fcntl.h>
@@ -25,6 +19,7 @@ details. */
#include <string.h>
#include <stdlib.h>
#include <time.h>
+#include <windows.h>
#include <signal.h>
#include <errno.h>
#include "cygwin/include/sys/strace.h"
@@ -33,11 +28,10 @@ details. */
#include "path.h"
#undef cygwin_internal
#include "loadlib.h"
+#include "ddk/ntapi.h"
/* we *know* we're being built with GCC */
-#ifndef alloca
#define alloca __builtin_alloca
-#endif
static const char *pgm;
static int forkdebug = 1;
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
index 79892af2a..fb7b4fe93 100644
--- a/winsup/w32api/ChangeLog
+++ b/winsup/w32api/ChangeLog
@@ -1,71 +1,3 @@
-2012-08-08 Earnie Boyd <earnie@users.sourceforge.net>
-
- * lib/kernel32.def (InterlockedDecrement): Remove the @BYTE count since
- we now declare it as __cdecl.
- (InterlockedIncrement): Ditto.
- (InterlockedExchange): Ditto.
-
-2012-08-06 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/winnt.h (MemoryBarrier): Define to __mingworg_MemoryBarrier()
- which is in libmingwex.a.
- MODIFIED FROM: Use __sync_synchronize instead of
- creating a function due to multiple definition.
- NOTE: Not using __sync_synchronize to allow applications to mix-n-match
- C libraries from different vendors.
-
-2012-08-04 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/winver.h (VerQueryValue[AW]): Correct declaration per MSDN.
-
-2012-08-01 Stephan Jorek <sjorek@users.sourceforge.net>
-
- * include/setupapi.h: Correct typos and truncations.
-
-2012-08-01 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/winuser.h (tagMENUITEMINFOA): Correct dwItemData definition.
- (tagMENUITEMINFOW): Ditto.
- * include/wtsapi32.h (WTSVirtualChannelClose): Add declaration.
- (WTSVirtualChannelOpen): Ditto.
- (WTSVirtualchannelOpenEx): Ditto.
- (WTSVirtualChannelPurgeInput): Ditto.
- (WTSVirtualChannelPurgeOutput): Ditto.
- (WTSVirtualChannelQuery): Ditto.
- (WTSVirtualChannelRead): Ditto.
- (WTSVirtualChannelWrite): Ditto.
- * lib/wtsapi32.def (WTSVirtualChannelOpenEx@12): Add import.
- * include/winbase.h (InterlockedDecrement): Modify declaration from
- LONG WINAPI to LONG __cdecl to match Microsoft documentation.
- (InterlockedIncrement): Ditto.
- (InterlockedExchange): Ditto.
- * include/winnt.h (MemoryBarrier): Add definition.
- * lib/Makefile.in (amvideo.h): Dependencies are not met making this file
- implementation incomplete. Do not deliver it.
- (amaudio.h): Ditto.
-
-2012-07-29 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/sdkddkver.h: New file.
- * include/windows.h: Include sdkddkver.h.
-
-2012-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winsock.h: Keep IP_OPTIONS and SO_xxx definitions when
- building Cygwin.
- * include/winsock2.h: Keep sockaddr and sockaddr_storage definitions
- when building Cygwin.
-
-2012-04-29 Jan Ringos <tringi@users.sf.net>
-
- * include/winbase.h (GetModuleHandleEx[A/W]): Correct version guard.
-
-2012-04-28 LRN <l_r_nightmare@users.sf.net>
-
- * include/shobjidl.h: New file.
- * lib/shobjidl-uuid.c: New file.
- * lib/Makefile.in: Reference shobjidl-uuid.c.
-
2012-03-19 Ben Greear <greear@users.sf.net>
* include/routprot.h (IP_LOCAL_BINDING): Move above IP_ADAPTER_BINDING_INFO
diff --git a/winsup/w32api/include/sdkddkver.h b/winsup/w32api/include/sdkddkver.h
deleted file mode 100644
index 3005cf5ab..000000000
--- a/winsup/w32api/include/sdkddkver.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- sdkddkver.h - Versioning file for Windows SDK/DDK.
-
- This file is part of a free library for the Windows API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-#ifndef _SDKDDKVER_H
-#define _SDKDDKVER_H
-
-/**
- * Define version masks
- * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
- * Values and names are guessed based on comments in the documentation.
- */
-#define OSVERSION_MASK 0xFFFF0000
-#define SPVERSION_MASK 0x0000FF00
-#define SUBVERSION_MASK 0x000000FF
-
-/**
- * Macros to extract values from NTDDI version.
- * Derived from comments on MSDN or social.microsoft.com
- */
-#define OSVER(ver) ((ver) & OSVERSION_MASK)
-#define SPVER(ver) (((ver) & SPVERSION_MASK) >> 8)
-#define SUBVER(ver) ((ver) & SUBVERSION_MASK)
-
-/**
- * Macros to create the minimal NTDDI version from _WIN32_WINNT value.
- */
-#define NTDDI_VERSION_FROM_WIN32_WINNT(ver) _NTDDI_VERSION_FROM_WIN32_WINNT(ver)
-#define _NTDDI_VERSION_FROM_WIN32_WINNT(ver) ver##0000
-
-/**
- * Version constants defining _WIN32_WINNT versions.
- * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
- */
-#define _WIN32_WINNT_NT4 0x0400
-#define _WIN32_WINNT_WIN2K 0x0500
-#define _WIN32_WINNT_WINXP 0x0501
-#define _WIN32_WINNT_WS03 0x0502
-#define _WIN32_WINNT_WIN6 0x0600
-#define _WIN32_WINNT_VISTA 0x0600
-#define _WIN32_WINNT_WS08 0x0600
-#define _WIN32_WINNT_LONGORN 0x0600
-#define _WIN32_WINNT_WIN7 0x0601
-
-/**
- * Version constants defining _WIN32_IE versions.
- * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
- */
-#define _WIN32_IE_IE50 0x0500
-#define _WIN32_IE_IE501 0x0501
-#define _WIN32_IE_IE55 0x0550
-#define _WIN32_IE_IE60 0x0600
-#define _WIN32_IE_IE60SP1 0x0601
-#define _WIN32_IE_IE60SP2 0x0603
-#define _WIN32_IE_IE70 0x0700
-#define _WIN32_IE_IE80 0x0800
-
-/**
- * Version constants defining NTDDI_VERSION.
- * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
- */
-#define __NTDDI_WIN5 0x05000000
-#define __NTDDI_WIN51 0x05010000
-#define __NTDDI_WIN52 0x05020000
-#define __NTDDI_WIN6 0x06000000
-#define __NTDDI_WIN61 0x06010000
-#define __NTDDI_SP0 0x00000000
-#define __NTDDI_SP1 0x00000100
-#define __NTDDI_SP2 0x00000200
-#define __NTDDI_SP3 0x00000300
-#define __NTDDI_SP4 0x00000400
-
-#define NTDDI_WIN2K __NTDDI_WIN5 + __NTDDI_SP0
-#define NTDDI_WIN2KSP1 __NTDDI_WIN5 + __NTDDI_SP1
-#define NTDDI_WIN2KSP2 __NTDDI_WIN5 + __NTDDI_SP2
-#define NTDDI_WIN2KSP3 __NTDDI_WIN5 + __NTDDI_SP3
-#define NTDDI_WIN2KSP4 __NTDDI_WIN5 + __NTDDI_SP4
-
-#define NTDDI_WINXP __NTDDI_WIN51 + __NTDDI_SP0
-#define NTDDI_WINXPSP1 __NTDDI_WIN51 + __NTDDI_SP1
-#define NTDDI_WINXPSP2 __NTDDI_WIN51 + __NTDDI_SP2
-#define NTDDI_WINXPSP3 __NTDDI_WIN51 + __NTDDI_SP3
-
-#define NTDDI_WS03 __NTDDI_WIN52 + __NTDDI_SP0
-#define NTDDI_WS03SP1 __NTDDI_WIN52 + __NTDDI_SP1
-#define NTDDI_WS03SP2 __NTDDI_WIN52 + __NTDDI_SP2
-
-#define NTDDI_VISTA __NTDDI_WIN6 + __NTDDI_SP0
-#define NTDDI_VISTASP1 __NTDDI_WIN6 + __NTDDI_SP1
-#define NTDDI_VISTASP2 __NTDDI_WIN6 + __NTDDI_SP2
-
-#define NTDDI_LONGHORN NTDDI_VISTA
-
-#define NTDDI_WIN6 NTDDI_VISTA
-#define NTDDI_WIN6SP1 NTDDI_VISTASP1
-#define NTDDI_WIN6SP2 NTDDI_VISTASP2
-
-#define NTDDI_WS08 __NTDDI_WIN6 + __NTDDI_SP1
-
-#define NTDDI_WIN7 __NTDDI_WIN61 + __NTDDI_SP0
-
-/**
- * Assign defaults
- */
-#ifdef NTDDI_VERSION
-# ifdef _WIN32_WINNT
-# if _WIN32_WINNT != OSDIR(NTDDI_VERSION)
-# error The _WIN32_WINNT value does not match NTDDI_VERSION
-# endif
-# else
-# define _WIN32_WINNT OSVER(NTDDI_VERSION)
-# ifndef WINVER
-# define WINVER _WIN32_WINNT
-# endif
-# endif
-#endif
-
-#ifndef _WIN32_WINNT
-# ifdef WINVER
-# define _WIN32_WINNT WINVER
-# else
-# warning _WIN32_WINNT is defaulting to _WIN32_WINNT_WIN2K
-# define _WIN32_WINNT _WIN32_WINNT_WIN2K
-# endif
-#endif
-
-#ifndef WINVER
-# define WINVER _WIN32_WINNT
-#endif
-
-#ifndef NTDDI_VERSION
-# warning NTDDI_VERSION is defaulting to _WIN32_WINNT version SPK0
-# define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
-#endif
-
-#endif
diff --git a/winsup/w32api/include/setupapi.h b/winsup/w32api/include/setupapi.h
index 8fc7a6c82..ef38852a2 100644
--- a/winsup/w32api/include/setupapi.h
+++ b/winsup/w32api/include/setupapi.h
@@ -1046,7 +1046,7 @@ WINSETUPAPI BOOL WINAPI SetupAdjustDiskSpaceListA(HDSKSPC,LPCSTR,LONGLONG,PVOID,
WINSETUPAPI BOOL WINAPI SetupAdjustDiskSpaceListW(HDSKSPC,LPCWSTR,LONGLONG,PVOID,UINT);
WINSETUPAPI UINT WINAPI SetupBackupErrorA(HWND,PCSTR,PCSTR,PCSTR,UINT,DWORD);
WINSETUPAPI UINT WINAPI SetupBackupErrorW(HWND,PCWSTR,PCWSTR,PCWSTR,UINT,DWORD);
-WINSETUPAPI BOOL WINAPI SetupCancelTemporarySourceList(VOID);
+WINSETUPAPI BOOL WINAPI SetupCancelTemporary(VOID);
WINSETUPAPI BOOL WINAPI SetupCloseFileQueue(HSPFILEQ);
WINSETUPAPI VOID WINAPI SetupCloseInfFile(HINF);
WINSETUPAPI VOID WINAPI SetupCloseLog(VOID);
@@ -1157,7 +1157,7 @@ WINSETUPAPI BOOL WINAPI SetupDiGetINFClassW(PCWSTR,LPGUID,PWSTR,DWORD,PDWORD);
WINSETUPAPI BOOL WINAPI SetupDiGetSelectedDevice(HDEVINFO,PSP_DEVINFO_DATA);
WINSETUPAPI BOOL WINAPI SetupDiGetSelectedDriverA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_A);
WINSETUPAPI BOOL WINAPI SetupDiGetSelectedDriverW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_W);
-WINSETUPAPI HPROPSHEETPAGE WINAPI SetupDiGetWizardPage(HDEVINFO,PSP_DEVINFO_DATA,PSP_INSTALLWIZARD_DATA,DWORD,DWORD);
+WINSETUPAPI HPROPSHEETPAGE WINAPI SetupDiGetWizardage(HDEVINFO,PSP_DEVINFO_DATA,PSP_INSTALLWIZARD_DATA,DWORD,DWORD);
WINSETUPAPI BOOL WINAPI SetupDiInstallClassA(HWND,PCSTR,DWORD,HSPFILEQ);
WINSETUPAPI BOOL WINAPI SetupDiInstallClassW(HWND,PCWSTR,DWORD,HSPFILEQ);
WINSETUPAPI BOOL WINAPI SetupDiInstallClassExA(HWND,PCSTR,DWORD,HSPFILEQ,CONST GUID*,PVOID,PVOID);
@@ -1204,8 +1204,8 @@ WINSETUPAPI BOOL WINAPI SetupFindFirstLineW(HINF,PCWSTR,PCWSTR,PINFCONTEXT);
WINSETUPAPI BOOL WINAPI SetupFindNextLine(PINFCONTEXT,PINFCONTEXT);
WINSETUPAPI BOOL WINAPI SetupFindNextMatchLineA(PINFCONTEXT,PCSTR,PINFCONTEXT);
WINSETUPAPI BOOL WINAPI SetupFindNextMatchLineW(PINFCONTEXT,PCWSTR,PINFCONTEXT);
-WINSETUPAPI BOOL WINAPI SetupFreeSourceListA(PCSTR**,UINT);
-WINSETUPAPI BOOL WINAPI SetupFreeSourceListW(PCWSTR**,UINT);
+WINSETUPAPI BOOL WINAPI SetupFreeA(PCSTR**,UINT);
+WINSETUPAPI BOOL WINAPI SetupFreeW(PCWSTR**,UINT);
WINSETUPAPI BOOL WINAPI SetupGetBackupInformationA(HSPFILEQ,PSP_BACKUP_QUEUE_PARAMS_A);
WINSETUPAPI BOOL WINAPI SetupGetBackupInformationW(HSPFILEQ,PSP_BACKUP_QUEUE_PARAMS_W);
WINSETUPAPI BOOL WINAPI SetupGetBinaryField(PINFCONTEXT,DWORD,PBYTE,DWORD,LPDWORD);
@@ -1267,8 +1267,8 @@ WINSETUPAPI HINF WINAPI SetupOpenMasterInf(VOID);
WINSETUPAPI UINT WINAPI SetupPromptForDiskA(HWND,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,DWORD,PSTR,DWORD,PDWORD);
WINSETUPAPI UINT WINAPI SetupPromptForDiskW(HWND,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,DWORD,PWSTR,DWORD,PDWORD);
WINSETUPAPI INT WINAPI SetupPromptReboot(HSPFILEQ,HWND,BOOL);
-WINSETUPAPI BOOL WINAPI SetupQuerySourceListA(DWORD,PCSTR**,PUINT);
-WINSETUPAPI BOOL WINAPI SetupQuerySourceListW(DWORD,PCWSTR**,PUINT);
+WINSETUPAPI BOOL WINAPI SetupQueryA(DWORD,PCSTR**,PUINT);
+WINSETUPAPI BOOL WINAPI SetupQueryW(DWORD,PCWSTR**,PUINT);
WINSETUPAPI BOOL WINAPI SetupQueryDrivesInDiskSpaceListA(HDSKSPC,PSTR,DWORD,PDWORD);
WINSETUPAPI BOOL WINAPI SetupQueryDrivesInDiskSpaceListW(HDSKSPC,PWSTR,DWORD,PDWORD);
WINSETUPAPI BOOL WINAPI SetupQueryFileLogA(HSPFILELOG,PCSTR,PCSTR,SetupFileLogInfo,PSTR,DWORD,PDWORD);
diff --git a/winsup/w32api/include/shobjidl.h b/winsup/w32api/include/shobjidl.h
deleted file mode 100644
index c69e5cf72..000000000
--- a/winsup/w32api/include/shobjidl.h
+++ /dev/null
@@ -1,143 +0,0 @@
-#ifndef _SHLOBJIDL_H
-#define _SHLOBJIDL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ole2.h>
-#include <shlguid.h>
-#include <shellapi.h>
-#pragma pack(push,1)
-#include <commctrl.h>
-
-extern const IID IID_ITaskbarList3;
-extern const GUID CLSID_ITaskbarList;
-
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd562322%28v=vs.85%29.aspx */
-typedef enum THUMBBUTTONMASK {
- THB_BITMAP = 0x00000001,
- THB_ICON = 0x00000002,
- THB_TOOLTIP = 0x00000004,
- THB_FLAGS = 0x00000008
-} THUMBBUTTONMASK;
-
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd562321%28v=vs.85%29.aspx */
-typedef enum THUMBBUTTONFLAGS {
- THBF_ENABLED = 0x00000000,
- THBF_DISABLED = 0x00000001,
- THBF_DISMISSONCLICK = 0x00000002,
- THBF_NOBACKGROUND = 0x00000004,
- THBF_HIDDEN = 0x00000008,
- THBF_NONINTERACTIVE = 0x00000010
-} THUMBBUTTONFLAGS;
-
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391559%28v=vs.85%29.aspx */
-typedef struct THUMBBUTTON {
- THUMBBUTTONMASK dwMask;
- UINT iId;
- UINT iBitmap;
- HICON hIcon;
- WCHAR szTip[260];
- THUMBBUTTONFLAGS dwFlags;
-} THUMBBUTTON, *LPTHUMBBUTTON;
-
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391697%28v=vs.85%29.aspx */
-typedef enum TBPFLAG {
- TBPF_NOPROGRESS = 0x00000000,
- TBPF_INDETERMINATE = 0x00000001,
- TBPF_NORMAL = 0x00000002,
- TBPF_ERROR = 0x00000004,
- TBPF_PAUSED = 0x00000008
-} TBPFLAG;
-
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774652%28v=vs.85%29.aspx */
-#define INTERFACE ITaskbarList
-DECLARE_INTERFACE_(ITaskbarList, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774650%28v=vs.85%29.aspx */
- STDMETHOD(HrInit)(THIS) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774646%28v=vs.85%29.aspx */
- STDMETHOD(AddTab)(THIS_ HWND) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774648%28v=vs.85%29.aspx */
- STDMETHOD(DeleteTab)(THIS_ HWND) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774644%28v=vs.85%29.aspx */
- STDMETHOD(ActivateTab)(THIS_ HWND) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774655%28v=vs.85%29.aspx */
- STDMETHOD(SetActiveAlt)(THIS_ HWND) PURE;
-};
-#undef INTERFACE
-typedef ITaskbarList *LPTASKBARLIST;
-
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774638%28v=vs.85%29.aspx */
-#define INTERFACE ITaskbarList2
-DECLARE_INTERFACE_(ITaskbarList2, ITaskbarList)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(HrInit)(THIS) PURE;
- STDMETHOD(AddTab)(THIS_ HWND) PURE;
- STDMETHOD(DeleteTab)(THIS_ HWND) PURE;
- STDMETHOD(ActivateTab)(THIS_ HWND) PURE;
- STDMETHOD(SetActiveAlt)(THIS_ HWND) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/bb774640%28v=vs.85%29.aspx */
- STDMETHOD(MarkFullscreenWindow)(THIS_ HWND,BOOL) PURE;
-};
-#undef INTERFACE
-typedef ITaskbarList2 *LPTASKBARLIST2;
-
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391692%28v=vs.85%29.aspx */
-#define INTERFACE ITaskbarList3
-DECLARE_INTERFACE_(ITaskbarList3, ITaskbarList2)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(HrInit)(THIS) PURE;
- STDMETHOD(AddTab)(THIS_ HWND) PURE;
- STDMETHOD(DeleteTab)(THIS_ HWND) PURE;
- STDMETHOD(ActivateTab)(THIS_ HWND) PURE;
- STDMETHOD(SetActiveAlt)(THIS_ HWND) PURE;
- STDMETHOD(MarkFullscreenWindow)(THIS_ HWND,BOOL) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391698%28v=vs.85%29.aspx */
- STDMETHOD(SetProgressValue)(THIS_ ULONGLONG,ULONGLONG) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391697%28v=vs.85%29.aspx */
- STDMETHOD(SetProgressState)(THIS_ HWND,TBPFLAG) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391694%28v=vs.85%29.aspx */
- STDMETHOD(RegisterTab)(THIS_ HWND,HWND) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391706%28v=vs.85%29.aspx */
- STDMETHOD(UnregisterTab)(THIS_ HWND) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391700%28v=vs.85%29.aspx */
- STDMETHOD(SetTabOrder)(THIS_ HWND,HWND) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391699%28v=vs.85%29.aspx */
- STDMETHOD(SetTabActive)(THIS_ HWND,HWND,DWORD) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391703%28v=vs.85%29.aspx */
- STDMETHOD(ThumbBarAddButtons)(THIS_ HWND,UINT,LPTHUMBBUTTON) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391705%28v=vs.85%29.aspx */
- STDMETHOD(ThumbBarUpdateButtons)(THIS_ HWND,UINT,LPTHUMBBUTTON) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391704%28v=vs.85%29.aspx */
- STDMETHOD(ThumbBarSetImageList)(THIS_ HWND,HIMAGELIST) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391696%28v=vs.85%29.aspx */
- STDMETHOD(SetOverlayIcon)(THIS_ HWND,HICON,LPCWSTR) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391702%28v=vs.85%29.aspx */
- STDMETHOD(SetThumbnailTooltip)(THIS_ HWND,LPCWSTR) PURE;
-/* http://msdn.microsoft.com/en-us/library/windows/desktop/dd391701%28v=vs.85%29.aspx */
- STDMETHOD(SetThumbnailClip)(THIS_ HWND,RECT*) PURE;
-};
-#undef INTERFACE
-typedef ITaskbarList3 *LPTASKBARLIST3;
-
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _SHLOBJIDL_H */
diff --git a/winsup/w32api/include/winbase.h b/winsup/w32api/include/winbase.h
index aa168418b..3d206794d 100644
--- a/winsup/w32api/include/winbase.h
+++ b/winsup/w32api/include/winbase.h
@@ -1648,7 +1648,7 @@ WINBASEAPI DWORD WINAPI GetModuleFileNameA(HINSTANCE,LPSTR,DWORD);
WINBASEAPI DWORD WINAPI GetModuleFileNameW(HINSTANCE,LPWSTR,DWORD);
WINBASEAPI HMODULE WINAPI GetModuleHandleA(LPCSTR);
WINBASEAPI HMODULE WINAPI GetModuleHandleW(LPCWSTR);
-#if (_WIN32_WINNT >= 0x0501)
+#if (_WIN32_WINNT >= 0x0500)
WINBASEAPI BOOL WINAPI GetModuleHandleExA(DWORD,LPCSTR,HMODULE*);
WINBASEAPI BOOL WINAPI GetModuleHandleExW(DWORD,LPCWSTR,HMODULE*);
#endif
@@ -1846,8 +1846,8 @@ LONG WINAPI InterlockedCompareExchange(LONG volatile *,LONG,LONG);
/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
#define InterlockedCompareExchangePointer(d,e,c) \
(PVOID)InterlockedCompareExchange((LONG volatile *)(d),(LONG)(e),(LONG)(c))
-LONG __cdecl InterlockedDecrement(LONG volatile *);
-LONG __cdecl InterlockedExchange(LONG volatile *,LONG);
+LONG WINAPI InterlockedDecrement(LONG volatile *);
+LONG WINAPI InterlockedExchange(LONG volatile *,LONG);
/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
#define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LONG volatile *)(t),(LONG)(v))
@@ -1855,7 +1855,7 @@ LONG WINAPI InterlockedExchangeAdd(LONG volatile *,LONG);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER);
#endif
-LONG __cdecl InterlockedIncrement(LONG volatile *);
+LONG WINAPI InterlockedIncrement(LONG volatile *);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
@@ -2339,7 +2339,7 @@ typedef PCACTCTXW PCACTCTX;
#endif
#define GetModuleFileName GetModuleFileNameW
#define GetModuleHandle GetModuleHandleW
-#if (_WIN32_WINNT >= 0x0501)
+#if (_WIN32_WINNT >= 0x0500)
#define GetModuleHandleEx GetModuleHandleExW
#endif
#define GetNamedPipeHandleState GetNamedPipeHandleStateW
@@ -2546,7 +2546,7 @@ typedef PCACTCTXA PCACTCTX;
#endif
#define GetNamedPipeHandleState GetNamedPipeHandleStateA
#define GetModuleHandle GetModuleHandleA
-#if (_WIN32_WINNT >= 0x0501)
+#if (_WIN32_WINNT >= 0x0500)
#define GetModuleHandleEx GetModuleHandleExA
#endif
#define GetModuleFileName GetModuleFileNameA
diff --git a/winsup/w32api/include/windows.h b/winsup/w32api/include/windows.h
index db18aec8d..97e037e90 100644
--- a/winsup/w32api/include/windows.h
+++ b/winsup/w32api/include/windows.h
@@ -16,8 +16,6 @@
#pragma GCC system_header
#endif
-#include <sdkddkver.h>
-
/* translate GCC target defines to MS equivalents. Keep this synchronized
with winnt.h. */
#if defined(__i686__) && !defined(_M_IX86)
diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h
index d650bf800..b31274bbe 100644
--- a/winsup/w32api/include/winnt.h
+++ b/winsup/w32api/include/winnt.h
@@ -4035,19 +4035,6 @@ struct _TEB * NtCurrentTeb(void);
#endif /* __GNUC__ */
#endif /* _X86_ */
-#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
-# if defined(_AMD64_) || defined(__X86_64)
-# define MemoryBarrier __faststorefence
-# elif defined(_IA64_)
-# define MemoryBarrier __mf
-# else
- void __mingworg_MemoryBarrier(void);
-# define MemoryBarrier __mingworg_MemoryBarrier
-# endif
-#else
-# define MemoryBarrier
-#endif
-
#endif /* RC_INVOKED */
#ifdef __cplusplus
diff --git a/winsup/w32api/include/winsock.h b/winsup/w32api/include/winsock.h
index 929c10348..b595b597c 100644
--- a/winsup/w32api/include/winsock.h
+++ b/winsup/w32api/include/winsock.h
@@ -240,7 +240,7 @@ typedef struct WSAData {
} WSADATA;
typedef WSADATA *LPWSADATA;
-#ifndef __INSIDE_MSYS__
+#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
#define IP_OPTIONS 1
#define SO_DEBUG 1
#define SO_ACCEPTCONN 2
@@ -260,7 +260,7 @@ typedef WSADATA *LPWSADATA;
#define SO_RCVTIMEO 0x1006
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
-#endif /* !__INSIDE_MSYS__ */
+#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
/*
* Note that the next 5 IP defines are specific to WinSock 1.1 (wsock32.dll).
* They will cause errors or unexpected results if used with the
diff --git a/winsup/w32api/include/winsock2.h b/winsup/w32api/include/winsock2.h
index 0279227b4..260c3fa5f 100644
--- a/winsup/w32api/include/winsock2.h
+++ b/winsup/w32api/include/winsock2.h
@@ -331,7 +331,7 @@ typedef WSADATA *LPWSADATA;
#define AF_12844 25
#define AF_IRDA 26
#define AF_NETDES 28
-#ifndef __INSIDE_MSYS__
+#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
#define AF_MAX 29
struct sockaddr {
u_short sa_family;
@@ -359,7 +359,7 @@ struct sockaddr_storage {
__int64 __ss_align; /* force alignment */
char __ss_pad2[_SS_PAD2SIZE]; /* pad to 128 */
};
-#endif /* !__INSIDE_MSYS__ */
+#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
struct sockproto {
u_short sp_family;
diff --git a/winsup/w32api/include/winuser.h b/winsup/w32api/include/winuser.h
index 76f493584..7fb6fe224 100644
--- a/winsup/w32api/include/winuser.h
+++ b/winsup/w32api/include/winuser.h
@@ -2771,7 +2771,7 @@ typedef struct tagMENUITEMINFOA {
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
- ULONG_PTR dwItemData;
+ DWORD dwItemData;
LPSTR dwTypeData;
UINT cch;
#if (_WIN32_WINNT >= 0x0500)
@@ -2788,7 +2788,7 @@ typedef struct tagMENUITEMINFOW {
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
- ULONG_PTR dwItemData;
+ DWORD dwItemData;
LPWSTR dwTypeData;
UINT cch;
#if (_WIN32_WINNT >= 0x0500)
diff --git a/winsup/w32api/include/winver.h b/winsup/w32api/include/winver.h
index f5a0dab85..9f8c9b76c 100644
--- a/winsup/w32api/include/winver.h
+++ b/winsup/w32api/include/winver.h
@@ -107,8 +107,8 @@ BOOL WINAPI GetFileVersionInfoA(LPCSTR,DWORD,DWORD,PVOID);
BOOL WINAPI GetFileVersionInfoW(LPCWSTR,DWORD,DWORD,PVOID);
DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
-BOOL WINAPI VerQueryValueA(LPCVOID,LPCSTR,LPVOID*,PUINT);
-BOOL WINAPI VerQueryValueW(LPCVOID,LPCWSTR,LPVOID*,PUINT);
+BOOL WINAPI VerQueryValueA(const LPVOID,LPCSTR,LPVOID*,PUINT);
+BOOL WINAPI VerQueryValueW(const LPVOID,LPCWSTR,LPVOID*,PUINT);
#ifdef UNICODE
#define VerFindFile VerFindFileW
#define VerQueryValue VerQueryValueW
diff --git a/winsup/w32api/include/wtsapi32.h b/winsup/w32api/include/wtsapi32.h
index 298acb9b6..5bd09bbbd 100644
--- a/winsup/w32api/include/wtsapi32.h
+++ b/winsup/w32api/include/wtsapi32.h
@@ -74,7 +74,7 @@ BOOL WINAPI WTSQueryUserToken(ULONG SessionId, PHANDLE pToken);
#endif /* _WIN32_WINNT >= 0x0501 */
-#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
+#if (_WIN32_WINNT >= 0x0500)
typedef struct _WTS_SESSION_INFOW {
DWORD SessionId;
@@ -168,56 +168,6 @@ BOOL WTSSendMessageW(
#define WTSSendMessage WTSSendMessageA
#endif
-BOOL WTSVirtualChannelClose(
- __in HANDLE hChannelHandle
-);
-
-HANDLE WTSVirtualChannelOpen(
- __in HANDLE hServer,
- __in DWORD SessionId,
- __in LPSTR pVirtualName
-);
-
-#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
-HANDLE WTSVirtualChannelOpenEx(
- __in DWORD SessionId,
- __in LPSTR pVirtualName,
- __in DWORD flags
-);
-#endif
-
-BOOL WTSVirtualChannelPurgeInput(
- __in HANDLE hChannelHandle
-);
-
-BOOL WTSVirtualChannelPurgeOutput(
- __in HANDLE hChannelHandle
-);
-
-#if _WIN32_WINNT >= _WIN32_WINNT_WINXP
-BOOL WTSVirtualChannelQuery(
- __in HANDLE hChannelHandle,
- __in WTS_VIRTUAL_CLASS WtsVirtualClass,
- __out PVOID *ppBuffer,
- __out DWORD *pBytesReturned
-);
-#endif
-
-BOOL WTSVirtualChannelRead(
- __in HANDLE hChannelHandle,
- __in ULONG TimeOut,
- __out PCHAR Buffer,
- __in ULONG BufferSize,
- __out PULONG pBytesRead
-);
-
-BOOL WTSVirtualChannelWrite(
- __in HANDLE hChannelHandle,
- __in PCHAR Buffer,
- __in ULONG Length,
- __out PULONG pBytesWritten
-);
-
#endif /* _WIN32_WINNT >= 0x0500 */
#ifdef __cplusplus
diff --git a/winsup/w32api/lib/Makefile.in b/winsup/w32api/lib/Makefile.in
index d918f680f..63a62e022 100644
--- a/winsup/w32api/lib/Makefile.in
+++ b/winsup/w32api/lib/Makefile.in
@@ -42,7 +42,7 @@ UUID_OBJS = \
objsafe-uuid.o oaidl-uuid.o docobj-uuid.o comcat-uuid.o \
exdisp-uuid.o mlang-uuid.o objidl-uuid.o cguid-uuid.o \
olectlid-uuid.o ativscp-uuid.o urlmon-uuid.o hlink-uuid.o \
- hlguids-uuid.o extras-uuid.o devguid.o power-uuid.o shobjidl-uuid.o
+ hlguids-uuid.o extras-uuid.o devguid.o power-uuid.o
EXTRA_OBJS = \
shell32.o scrnsave.o scrnsavw.o largeint.o gdiplus.o \
@@ -54,7 +54,7 @@ UUID_SOURCES = \
objsafe-uuid.c oaidl-uuid.c docobj-uuid.c comcat-uuid.c \
exdisp-uuid.c mlang-uuid.c objidl-uuid.c cguid-uuid.c \
olectlid-uuid.c ativscp-uuid.c urlmon-uuid.c hlink-uuid.c \
- hlguids-uuid.c extras-uuid.c devguid.c power-uuid.c shobjidl-uuid.c
+ hlguids-uuid.c extras-uuid.c devguid.c power-uuid.c
SOURCES = \
scrnsave.c shell32.c largeint.c gdiplus.c $(UUID_SOURCES) \
@@ -131,14 +131,7 @@ install-libraries: all $(need-DESTDIR-compatibility)
install-headers: $(need-DESTDIR-compatibility)
$(mkinstalldirs) $(DESTDIR)${inst_includedir}
for file in $(HEADERS); do \
- case $$file in \
- amvideo.h | amaudio.h) \
- echo Not installing $$file \
- ;; \
- *) \
- $(INSTALL_DATA) ${top_srcdir}/include/$$file $(DESTDIR)${inst_includedir}; \
- ;; \
- esac \
+ $(INSTALL_DATA) ${top_srcdir}/include/$$file $(DESTDIR)${inst_includedir}; \
done
$(mkinstalldirs) $(DESTDIR)${inst_includedir}/GL
for file in $(GL_HEADERS); do \
diff --git a/winsup/w32api/lib/kernel32.def b/winsup/w32api/lib/kernel32.def
index 177160f6b..fca559aac 100644
--- a/winsup/w32api/lib/kernel32.def
+++ b/winsup/w32api/lib/kernel32.def
@@ -749,11 +749,11 @@ InitializeSListHead@4
InitializeSRWLock@4
InterlockedCompareExchange64@20
InterlockedCompareExchange@12
-InterlockedDecrement
-InterlockedExchange
+InterlockedDecrement@4
+InterlockedExchange@8
InterlockedExchangeAdd@8
InterlockedFlushSList@4
-InterlockedIncrement
+InterlockedIncrement@4
InterlockedPopEntrySList@4
InterlockedPushEntrySList@8
InvalidateConsoleDIBits@8
diff --git a/winsup/w32api/lib/shobjidl-uuid.c b/winsup/w32api/lib/shobjidl-uuid.c
deleted file mode 100644
index 47712fbc5..000000000
--- a/winsup/w32api/lib/shobjidl-uuid.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* shobjidl-uuid.c */
-/* Generate GUIDs for Object IDL interfaces */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_ITaskbarList3,0xea1afb91,0x9e28,0x4b86,0x90,0xe9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf);
-DEFINE_GUID(CLSID_ITaskbarList,0x56FDF342L,0xFD6D,0x11d0,0x95,0x8A,0x00,0x60,0x97,0xC9,0xA0,0x90);
diff --git a/winsup/w32api/lib/wtsapi32.def b/winsup/w32api/lib/wtsapi32.def
index 6baaa7124..e02e4705c 100755
--- a/winsup/w32api/lib/wtsapi32.def
+++ b/winsup/w32api/lib/wtsapi32.def
@@ -27,7 +27,6 @@ WTSTerminateProcess@12
WTSUnRegisterSessionNotification@4
WTSVirtualChannelClose@4
WTSVirtualChannelOpen@12
-WTSVirtualChannelOpenEx@12
WTSVirtualChannelPurgeInput@4
WTSVirtualChannelPurgeOutput@4
WTSVirtualChannelQuery@16