summaryrefslogtreecommitdiff
path: root/w32
diff options
context:
space:
mode:
Diffstat (limited to 'w32')
-rw-r--r--w32/.deps/libw32_a-misc.Po1
-rw-r--r--w32/.deps/libw32_a-pathstuff.Po1
-rw-r--r--w32/.deps/libw32_a-sub_proc.Po1
-rw-r--r--w32/.deps/libw32_a-w32err.Po1
-rw-r--r--w32/Makefile536
-rw-r--r--w32/Makefile.am5
-rw-r--r--w32/Makefile.in189
-rw-r--r--w32/compat/dirent.c3
-rw-r--r--w32/compat/posixfcn.c456
-rw-r--r--w32/include/dirent.h3
-rw-r--r--w32/include/dlfcn.h29
-rw-r--r--w32/include/pathstuff.h3
-rw-r--r--w32/include/sub_proc.h25
-rw-r--r--w32/include/w32err.h5
-rw-r--r--w32/pathstuff.c5
-rw-r--r--w32/subproc/NMakefile7
-rw-r--r--w32/subproc/build.bat21
-rw-r--r--w32/subproc/misc.c3
-rw-r--r--w32/subproc/proc.h3
-rw-r--r--w32/subproc/sub_proc.c382
-rw-r--r--w32/subproc/w32err.c33
21 files changed, 996 insertions, 716 deletions
diff --git a/w32/.deps/libw32_a-misc.Po b/w32/.deps/libw32_a-misc.Po
deleted file mode 100644
index 9ce06a8..0000000
--- a/w32/.deps/libw32_a-misc.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/w32/.deps/libw32_a-pathstuff.Po b/w32/.deps/libw32_a-pathstuff.Po
deleted file mode 100644
index 9ce06a8..0000000
--- a/w32/.deps/libw32_a-pathstuff.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/w32/.deps/libw32_a-sub_proc.Po b/w32/.deps/libw32_a-sub_proc.Po
deleted file mode 100644
index 9ce06a8..0000000
--- a/w32/.deps/libw32_a-sub_proc.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/w32/.deps/libw32_a-w32err.Po b/w32/.deps/libw32_a-w32err.Po
deleted file mode 100644
index 9ce06a8..0000000
--- a/w32/.deps/libw32_a-w32err.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
diff --git a/w32/Makefile b/w32/Makefile
deleted file mode 100644
index 8c95760..0000000
--- a/w32/Makefile
+++ /dev/null
@@ -1,536 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# w32/Makefile. Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-# Makefile.am to create libw32.a for mingw32 host.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-# This file is part of GNU Make.
-#
-# GNU Make is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
-#
-# GNU Make 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. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-pkgdatadir = $(datadir)/make
-pkgincludedir = $(includedir)/make
-pkglibdir = $(libdir)/make
-pkglibexecdir = $(libexecdir)/make
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = x86_64-unknown-linux-gnu
-host_triplet = x86_64-unknown-linux-gnu
-subdir = w32
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/dospaths.m4 \
- $(top_srcdir)/config/gettext.m4 $(top_srcdir)/config/iconv.m4 \
- $(top_srcdir)/config/isc-posix.m4 \
- $(top_srcdir)/config/lib-ld.m4 \
- $(top_srcdir)/config/lib-link.m4 \
- $(top_srcdir)/config/lib-prefix.m4 $(top_srcdir)/config/nls.m4 \
- $(top_srcdir)/config/po.m4 $(top_srcdir)/config/progtest.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
-libw32_a_AR = $(AR) $(ARFLAGS)
-libw32_a_LIBADD =
-am_libw32_a_OBJECTS = libw32_a-misc.$(OBJEXT) \
- libw32_a-sub_proc.$(OBJEXT) libw32_a-w32err.$(OBJEXT) \
- libw32_a-pathstuff.$(OBJEXT)
-libw32_a_OBJECTS = $(am_libw32_a_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libw32_a_SOURCES)
-DIST_SOURCES = $(libw32_a_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/psmith/src/make/make-rel/config/missing --run aclocal-1.11
-ALLOCA =
-AMTAR = ${SHELL} /home/psmith/src/make/make-rel/config/missing --run tar
-AR = ar
-AUTOCONF = ${SHELL} /home/psmith/src/make/make-rel/config/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/psmith/src/make/make-rel/config/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/psmith/src/make/make-rel/config/missing --run automake-1.11
-AWK = gawk
-CC = gcc
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
-CPP = gcc -E
-CPPFLAGS =
-CYGPATH_W = echo
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = /bin/grep -E
-EXEEXT =
-GETLOADAVG_LIBS =
-GLOBINC =
-GLOBLIB =
-GMSGFMT = /usr/bin/msgfmt
-GREP = /bin/grep
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-INTLLIBS =
-KMEM_GROUP =
-LDFLAGS =
-LIBICONV = -liconv
-LIBINTL =
-LIBOBJS =
-LIBS = -lrt
-LTLIBICONV = -liconv
-LTLIBINTL =
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/psmith/src/make/make-rel/config/missing --run makeinfo
-MAKE_HOST = x86_64-unknown-linux-gnu
-MKDIR_P = /bin/mkdir -p
-MKINSTALLDIRS = $(top_builddir)/config/mkinstalldirs
-MSGFMT = /usr/bin/msgfmt
-MSGMERGE = /usr/bin/msgmerge
-NEED_SETGID = false
-OBJEXT = o
-PACKAGE = make
-PACKAGE_BUGREPORT = bug-make@gnu.org
-PACKAGE_NAME = GNU make
-PACKAGE_STRING = GNU make 3.82
-PACKAGE_TARNAME = make
-PACKAGE_URL = http://www.gnu.org/software/make/
-PACKAGE_VERSION = 3.82
-PATH_SEPARATOR = :
-PERL = perl
-POSUB = po
-RANLIB = ranlib
-REMOTE = stub
-SET_MAKE =
-SHELL = /bin/bash
-STRIP =
-USE_NLS = yes
-VERSION = 3.82
-XGETTEXT = /usr/bin/xgettext
-abs_builddir = /home/psmith/src/make/make-rel/w32
-abs_srcdir = /home/psmith/src/make/make-rel/w32
-abs_top_builddir = /home/psmith/src/make/make-rel
-abs_top_srcdir = /home/psmith/src/make/make-rel
-ac_ct_CC = gcc
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = x86_64-unknown-linux-gnu
-build_alias =
-build_cpu = x86_64
-build_os = linux-gnu
-build_vendor = unknown
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-host = x86_64-unknown-linux-gnu
-host_alias =
-host_cpu = x86_64
-host_os = linux-gnu
-host_vendor = unknown
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = ${SHELL} /home/psmith/src/make/make-rel/config/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-mandir = ${datarootdir}/man
-mkdir_p = /bin/mkdir -p
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /usr/local
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-sysconfdir = ${prefix}/etc
-target_alias =
-top_build_prefix = ../
-top_builddir = ..
-top_srcdir = ..
-noinst_LIBRARIES = libw32.a
-libw32_a_SOURCES = subproc/misc.c subproc/sub_proc.c subproc/w32err.c \
- pathstuff.c
-
-libw32_a_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/subproc -I$(top_srcdir)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu w32/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu w32/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libw32.a: $(libw32_a_OBJECTS) $(libw32_a_DEPENDENCIES)
- -rm -f libw32.a
- $(libw32_a_AR) libw32.a $(libw32_a_OBJECTS) $(libw32_a_LIBADD)
- $(RANLIB) libw32.a
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-include ./$(DEPDIR)/libw32_a-misc.Po
-include ./$(DEPDIR)/libw32_a-pathstuff.Po
-include ./$(DEPDIR)/libw32_a-sub_proc.Po
-include ./$(DEPDIR)/libw32_a-w32err.Po
-
-.c.o:
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c $<
-
-.c.obj:
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-libw32_a-misc.o: subproc/misc.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-misc.o -MD -MP -MF $(DEPDIR)/libw32_a-misc.Tpo -c -o libw32_a-misc.o `test -f 'subproc/misc.c' || echo '$(srcdir)/'`subproc/misc.c
- $(am__mv) $(DEPDIR)/libw32_a-misc.Tpo $(DEPDIR)/libw32_a-misc.Po
-# source='subproc/misc.c' object='libw32_a-misc.o' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-misc.o `test -f 'subproc/misc.c' || echo '$(srcdir)/'`subproc/misc.c
-
-libw32_a-misc.obj: subproc/misc.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-misc.obj -MD -MP -MF $(DEPDIR)/libw32_a-misc.Tpo -c -o libw32_a-misc.obj `if test -f 'subproc/misc.c'; then $(CYGPATH_W) 'subproc/misc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/misc.c'; fi`
- $(am__mv) $(DEPDIR)/libw32_a-misc.Tpo $(DEPDIR)/libw32_a-misc.Po
-# source='subproc/misc.c' object='libw32_a-misc.obj' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-misc.obj `if test -f 'subproc/misc.c'; then $(CYGPATH_W) 'subproc/misc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/misc.c'; fi`
-
-libw32_a-sub_proc.o: subproc/sub_proc.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-sub_proc.o -MD -MP -MF $(DEPDIR)/libw32_a-sub_proc.Tpo -c -o libw32_a-sub_proc.o `test -f 'subproc/sub_proc.c' || echo '$(srcdir)/'`subproc/sub_proc.c
- $(am__mv) $(DEPDIR)/libw32_a-sub_proc.Tpo $(DEPDIR)/libw32_a-sub_proc.Po
-# source='subproc/sub_proc.c' object='libw32_a-sub_proc.o' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-sub_proc.o `test -f 'subproc/sub_proc.c' || echo '$(srcdir)/'`subproc/sub_proc.c
-
-libw32_a-sub_proc.obj: subproc/sub_proc.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-sub_proc.obj -MD -MP -MF $(DEPDIR)/libw32_a-sub_proc.Tpo -c -o libw32_a-sub_proc.obj `if test -f 'subproc/sub_proc.c'; then $(CYGPATH_W) 'subproc/sub_proc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/sub_proc.c'; fi`
- $(am__mv) $(DEPDIR)/libw32_a-sub_proc.Tpo $(DEPDIR)/libw32_a-sub_proc.Po
-# source='subproc/sub_proc.c' object='libw32_a-sub_proc.obj' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-sub_proc.obj `if test -f 'subproc/sub_proc.c'; then $(CYGPATH_W) 'subproc/sub_proc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/sub_proc.c'; fi`
-
-libw32_a-w32err.o: subproc/w32err.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-w32err.o -MD -MP -MF $(DEPDIR)/libw32_a-w32err.Tpo -c -o libw32_a-w32err.o `test -f 'subproc/w32err.c' || echo '$(srcdir)/'`subproc/w32err.c
- $(am__mv) $(DEPDIR)/libw32_a-w32err.Tpo $(DEPDIR)/libw32_a-w32err.Po
-# source='subproc/w32err.c' object='libw32_a-w32err.o' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-w32err.o `test -f 'subproc/w32err.c' || echo '$(srcdir)/'`subproc/w32err.c
-
-libw32_a-w32err.obj: subproc/w32err.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-w32err.obj -MD -MP -MF $(DEPDIR)/libw32_a-w32err.Tpo -c -o libw32_a-w32err.obj `if test -f 'subproc/w32err.c'; then $(CYGPATH_W) 'subproc/w32err.c'; else $(CYGPATH_W) '$(srcdir)/subproc/w32err.c'; fi`
- $(am__mv) $(DEPDIR)/libw32_a-w32err.Tpo $(DEPDIR)/libw32_a-w32err.Po
-# source='subproc/w32err.c' object='libw32_a-w32err.obj' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-w32err.obj `if test -f 'subproc/w32err.c'; then $(CYGPATH_W) 'subproc/w32err.c'; else $(CYGPATH_W) '$(srcdir)/subproc/w32err.c'; fi`
-
-libw32_a-pathstuff.o: pathstuff.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-pathstuff.o -MD -MP -MF $(DEPDIR)/libw32_a-pathstuff.Tpo -c -o libw32_a-pathstuff.o `test -f 'pathstuff.c' || echo '$(srcdir)/'`pathstuff.c
- $(am__mv) $(DEPDIR)/libw32_a-pathstuff.Tpo $(DEPDIR)/libw32_a-pathstuff.Po
-# source='pathstuff.c' object='libw32_a-pathstuff.o' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-pathstuff.o `test -f 'pathstuff.c' || echo '$(srcdir)/'`pathstuff.c
-
-libw32_a-pathstuff.obj: pathstuff.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-pathstuff.obj -MD -MP -MF $(DEPDIR)/libw32_a-pathstuff.Tpo -c -o libw32_a-pathstuff.obj `if test -f 'pathstuff.c'; then $(CYGPATH_W) 'pathstuff.c'; else $(CYGPATH_W) '$(srcdir)/pathstuff.c'; fi`
- $(am__mv) $(DEPDIR)/libw32_a-pathstuff.Tpo $(DEPDIR)/libw32_a-pathstuff.Po
-# source='pathstuff.c' object='libw32_a-pathstuff.obj' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-pathstuff.obj `if test -f 'pathstuff.c'; then $(CYGPATH_W) 'pathstuff.c'; else $(CYGPATH_W) '$(srcdir)/pathstuff.c'; fi`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LIBRARIES)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/w32/Makefile.am b/w32/Makefile.am
index b8e2071..be757fe 100644
--- a/w32/Makefile.am
+++ b/w32/Makefile.am
@@ -1,6 +1,5 @@
# Makefile.am to create libw32.a for mingw32 host.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
@@ -19,6 +18,6 @@
noinst_LIBRARIES = libw32.a
libw32_a_SOURCES = subproc/misc.c subproc/sub_proc.c subproc/w32err.c \
- pathstuff.c
+ compat/posixfcn.c pathstuff.c
libw32_a_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/subproc -I$(top_srcdir)
diff --git a/w32/Makefile.in b/w32/Makefile.in
index c5ea5b5..9683105 100644
--- a/w32/Makefile.in
+++ b/w32/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,8 +16,7 @@
@SET_MAKE@
# Makefile.am to create libw32.a for mingw32 host.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
@@ -34,6 +33,23 @@
# this program. If not, see <http://www.gnu.org/licenses/>.
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -57,42 +73,67 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/dospaths.m4 \
$(top_srcdir)/config/gettext.m4 $(top_srcdir)/config/iconv.m4 \
- $(top_srcdir)/config/isc-posix.m4 \
+ $(top_srcdir)/config/intlmacosx.m4 \
$(top_srcdir)/config/lib-ld.m4 \
$(top_srcdir)/config/lib-link.m4 \
$(top_srcdir)/config/lib-prefix.m4 $(top_srcdir)/config/nls.m4 \
$(top_srcdir)/config/po.m4 $(top_srcdir)/config/progtest.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
libw32_a_AR = $(AR) $(ARFLAGS)
libw32_a_LIBADD =
am_libw32_a_OBJECTS = libw32_a-misc.$(OBJEXT) \
libw32_a-sub_proc.$(OBJEXT) libw32_a-w32err.$(OBJEXT) \
- libw32_a-pathstuff.$(OBJEXT)
+ libw32_a-posixfcn.$(OBJEXT) libw32_a-pathstuff.$(OBJEXT)
libw32_a_OBJECTS = $(am_libw32_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libw32_a_SOURCES)
DIST_SOURCES = $(libw32_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -112,16 +153,21 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLOBINC = @GLOBINC@
GLOBLIB = @GLOBLIB@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
+GUILE_CFLAGS = @GUILE_CFLAGS@
+GUILE_LIBS = @GUILE_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
KMEM_GROUP = @KMEM_GROUP@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
@@ -134,8 +180,8 @@ LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_HOST = @MAKE_HOST@
MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
OBJEXT = @OBJEXT@
@@ -148,6 +194,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
REMOTE = @REMOTE@
@@ -157,6 +206,8 @@ STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -209,7 +260,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LIBRARIES = libw32.a
libw32_a_SOURCES = subproc/misc.c subproc/sub_proc.c subproc/w32err.c \
- pathstuff.c
+ compat/posixfcn.c pathstuff.c
libw32_a_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/subproc -I$(top_srcdir)
all: all-am
@@ -249,10 +300,10 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libw32.a: $(libw32_a_OBJECTS) $(libw32_a_DEPENDENCIES)
- -rm -f libw32.a
- $(libw32_a_AR) libw32.a $(libw32_a_OBJECTS) $(libw32_a_LIBADD)
- $(RANLIB) libw32.a
+libw32.a: $(libw32_a_OBJECTS) $(libw32_a_DEPENDENCIES) $(EXTRA_libw32_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libw32.a
+ $(AM_V_AR)$(libw32_a_AR) libw32.a $(libw32_a_OBJECTS) $(libw32_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libw32.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -262,78 +313,93 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libw32_a-misc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libw32_a-pathstuff.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libw32_a-posixfcn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libw32_a-sub_proc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libw32_a-w32err.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
libw32_a-misc.o: subproc/misc.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-misc.o -MD -MP -MF $(DEPDIR)/libw32_a-misc.Tpo -c -o libw32_a-misc.o `test -f 'subproc/misc.c' || echo '$(srcdir)/'`subproc/misc.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-misc.Tpo $(DEPDIR)/libw32_a-misc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='subproc/misc.c' object='libw32_a-misc.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-misc.o -MD -MP -MF $(DEPDIR)/libw32_a-misc.Tpo -c -o libw32_a-misc.o `test -f 'subproc/misc.c' || echo '$(srcdir)/'`subproc/misc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-misc.Tpo $(DEPDIR)/libw32_a-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='subproc/misc.c' object='libw32_a-misc.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-misc.o `test -f 'subproc/misc.c' || echo '$(srcdir)/'`subproc/misc.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-misc.o `test -f 'subproc/misc.c' || echo '$(srcdir)/'`subproc/misc.c
libw32_a-misc.obj: subproc/misc.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-misc.obj -MD -MP -MF $(DEPDIR)/libw32_a-misc.Tpo -c -o libw32_a-misc.obj `if test -f 'subproc/misc.c'; then $(CYGPATH_W) 'subproc/misc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/misc.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-misc.Tpo $(DEPDIR)/libw32_a-misc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='subproc/misc.c' object='libw32_a-misc.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-misc.obj -MD -MP -MF $(DEPDIR)/libw32_a-misc.Tpo -c -o libw32_a-misc.obj `if test -f 'subproc/misc.c'; then $(CYGPATH_W) 'subproc/misc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/misc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-misc.Tpo $(DEPDIR)/libw32_a-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='subproc/misc.c' object='libw32_a-misc.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-misc.obj `if test -f 'subproc/misc.c'; then $(CYGPATH_W) 'subproc/misc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/misc.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-misc.obj `if test -f 'subproc/misc.c'; then $(CYGPATH_W) 'subproc/misc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/misc.c'; fi`
libw32_a-sub_proc.o: subproc/sub_proc.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-sub_proc.o -MD -MP -MF $(DEPDIR)/libw32_a-sub_proc.Tpo -c -o libw32_a-sub_proc.o `test -f 'subproc/sub_proc.c' || echo '$(srcdir)/'`subproc/sub_proc.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-sub_proc.Tpo $(DEPDIR)/libw32_a-sub_proc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='subproc/sub_proc.c' object='libw32_a-sub_proc.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-sub_proc.o -MD -MP -MF $(DEPDIR)/libw32_a-sub_proc.Tpo -c -o libw32_a-sub_proc.o `test -f 'subproc/sub_proc.c' || echo '$(srcdir)/'`subproc/sub_proc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-sub_proc.Tpo $(DEPDIR)/libw32_a-sub_proc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='subproc/sub_proc.c' object='libw32_a-sub_proc.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-sub_proc.o `test -f 'subproc/sub_proc.c' || echo '$(srcdir)/'`subproc/sub_proc.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-sub_proc.o `test -f 'subproc/sub_proc.c' || echo '$(srcdir)/'`subproc/sub_proc.c
libw32_a-sub_proc.obj: subproc/sub_proc.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-sub_proc.obj -MD -MP -MF $(DEPDIR)/libw32_a-sub_proc.Tpo -c -o libw32_a-sub_proc.obj `if test -f 'subproc/sub_proc.c'; then $(CYGPATH_W) 'subproc/sub_proc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/sub_proc.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-sub_proc.Tpo $(DEPDIR)/libw32_a-sub_proc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='subproc/sub_proc.c' object='libw32_a-sub_proc.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-sub_proc.obj -MD -MP -MF $(DEPDIR)/libw32_a-sub_proc.Tpo -c -o libw32_a-sub_proc.obj `if test -f 'subproc/sub_proc.c'; then $(CYGPATH_W) 'subproc/sub_proc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/sub_proc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-sub_proc.Tpo $(DEPDIR)/libw32_a-sub_proc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='subproc/sub_proc.c' object='libw32_a-sub_proc.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-sub_proc.obj `if test -f 'subproc/sub_proc.c'; then $(CYGPATH_W) 'subproc/sub_proc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/sub_proc.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-sub_proc.obj `if test -f 'subproc/sub_proc.c'; then $(CYGPATH_W) 'subproc/sub_proc.c'; else $(CYGPATH_W) '$(srcdir)/subproc/sub_proc.c'; fi`
libw32_a-w32err.o: subproc/w32err.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-w32err.o -MD -MP -MF $(DEPDIR)/libw32_a-w32err.Tpo -c -o libw32_a-w32err.o `test -f 'subproc/w32err.c' || echo '$(srcdir)/'`subproc/w32err.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-w32err.Tpo $(DEPDIR)/libw32_a-w32err.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='subproc/w32err.c' object='libw32_a-w32err.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-w32err.o -MD -MP -MF $(DEPDIR)/libw32_a-w32err.Tpo -c -o libw32_a-w32err.o `test -f 'subproc/w32err.c' || echo '$(srcdir)/'`subproc/w32err.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-w32err.Tpo $(DEPDIR)/libw32_a-w32err.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='subproc/w32err.c' object='libw32_a-w32err.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-w32err.o `test -f 'subproc/w32err.c' || echo '$(srcdir)/'`subproc/w32err.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-w32err.o `test -f 'subproc/w32err.c' || echo '$(srcdir)/'`subproc/w32err.c
libw32_a-w32err.obj: subproc/w32err.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-w32err.obj -MD -MP -MF $(DEPDIR)/libw32_a-w32err.Tpo -c -o libw32_a-w32err.obj `if test -f 'subproc/w32err.c'; then $(CYGPATH_W) 'subproc/w32err.c'; else $(CYGPATH_W) '$(srcdir)/subproc/w32err.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-w32err.Tpo $(DEPDIR)/libw32_a-w32err.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='subproc/w32err.c' object='libw32_a-w32err.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-w32err.obj -MD -MP -MF $(DEPDIR)/libw32_a-w32err.Tpo -c -o libw32_a-w32err.obj `if test -f 'subproc/w32err.c'; then $(CYGPATH_W) 'subproc/w32err.c'; else $(CYGPATH_W) '$(srcdir)/subproc/w32err.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-w32err.Tpo $(DEPDIR)/libw32_a-w32err.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='subproc/w32err.c' object='libw32_a-w32err.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-w32err.obj `if test -f 'subproc/w32err.c'; then $(CYGPATH_W) 'subproc/w32err.c'; else $(CYGPATH_W) '$(srcdir)/subproc/w32err.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-w32err.obj `if test -f 'subproc/w32err.c'; then $(CYGPATH_W) 'subproc/w32err.c'; else $(CYGPATH_W) '$(srcdir)/subproc/w32err.c'; fi`
+
+libw32_a-posixfcn.o: compat/posixfcn.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-posixfcn.o -MD -MP -MF $(DEPDIR)/libw32_a-posixfcn.Tpo -c -o libw32_a-posixfcn.o `test -f 'compat/posixfcn.c' || echo '$(srcdir)/'`compat/posixfcn.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-posixfcn.Tpo $(DEPDIR)/libw32_a-posixfcn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='compat/posixfcn.c' object='libw32_a-posixfcn.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-posixfcn.o `test -f 'compat/posixfcn.c' || echo '$(srcdir)/'`compat/posixfcn.c
+
+libw32_a-posixfcn.obj: compat/posixfcn.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-posixfcn.obj -MD -MP -MF $(DEPDIR)/libw32_a-posixfcn.Tpo -c -o libw32_a-posixfcn.obj `if test -f 'compat/posixfcn.c'; then $(CYGPATH_W) 'compat/posixfcn.c'; else $(CYGPATH_W) '$(srcdir)/compat/posixfcn.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-posixfcn.Tpo $(DEPDIR)/libw32_a-posixfcn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='compat/posixfcn.c' object='libw32_a-posixfcn.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-posixfcn.obj `if test -f 'compat/posixfcn.c'; then $(CYGPATH_W) 'compat/posixfcn.c'; else $(CYGPATH_W) '$(srcdir)/compat/posixfcn.c'; fi`
libw32_a-pathstuff.o: pathstuff.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-pathstuff.o -MD -MP -MF $(DEPDIR)/libw32_a-pathstuff.Tpo -c -o libw32_a-pathstuff.o `test -f 'pathstuff.c' || echo '$(srcdir)/'`pathstuff.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-pathstuff.Tpo $(DEPDIR)/libw32_a-pathstuff.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pathstuff.c' object='libw32_a-pathstuff.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-pathstuff.o -MD -MP -MF $(DEPDIR)/libw32_a-pathstuff.Tpo -c -o libw32_a-pathstuff.o `test -f 'pathstuff.c' || echo '$(srcdir)/'`pathstuff.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-pathstuff.Tpo $(DEPDIR)/libw32_a-pathstuff.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pathstuff.c' object='libw32_a-pathstuff.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-pathstuff.o `test -f 'pathstuff.c' || echo '$(srcdir)/'`pathstuff.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-pathstuff.o `test -f 'pathstuff.c' || echo '$(srcdir)/'`pathstuff.c
libw32_a-pathstuff.obj: pathstuff.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-pathstuff.obj -MD -MP -MF $(DEPDIR)/libw32_a-pathstuff.Tpo -c -o libw32_a-pathstuff.obj `if test -f 'pathstuff.c'; then $(CYGPATH_W) 'pathstuff.c'; else $(CYGPATH_W) '$(srcdir)/pathstuff.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libw32_a-pathstuff.Tpo $(DEPDIR)/libw32_a-pathstuff.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pathstuff.c' object='libw32_a-pathstuff.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libw32_a-pathstuff.obj -MD -MP -MF $(DEPDIR)/libw32_a-pathstuff.Tpo -c -o libw32_a-pathstuff.obj `if test -f 'pathstuff.c'; then $(CYGPATH_W) 'pathstuff.c'; else $(CYGPATH_W) '$(srcdir)/pathstuff.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libw32_a-pathstuff.Tpo $(DEPDIR)/libw32_a-pathstuff.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pathstuff.c' object='libw32_a-pathstuff.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-pathstuff.obj `if test -f 'pathstuff.c'; then $(CYGPATH_W) 'pathstuff.c'; else $(CYGPATH_W) '$(srcdir)/pathstuff.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libw32_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libw32_a-pathstuff.obj `if test -f 'pathstuff.c'; then $(CYGPATH_W) 'pathstuff.c'; else $(CYGPATH_W) '$(srcdir)/pathstuff.c'; fi`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -431,10 +497,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/w32/compat/dirent.c b/w32/compat/dirent.c
index 8d66e47..bc776dd 100644
--- a/w32/compat/dirent.c
+++ b/w32/compat/dirent.c
@@ -1,6 +1,5 @@
/* Directory entry code for Window platforms.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
diff --git a/w32/compat/posixfcn.c b/w32/compat/posixfcn.c
new file mode 100644
index 0000000..1d852f5
--- /dev/null
+++ b/w32/compat/posixfcn.c
@@ -0,0 +1,456 @@
+/* Replacements for Posix functions and Posix functionality for MS-Windows.
+
+Copyright (C) 2013 Free Software Foundation, Inc.
+This file is part of GNU Make.
+
+GNU Make is free software; you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the Free Software
+Foundation; either version 3 of the License, or (at your option) any later
+version.
+
+GNU Make 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. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <string.h>
+#include <io.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <windows.h>
+
+#include "dlfcn.h"
+
+#include "makeint.h"
+#include "job.h"
+
+#ifndef NO_OUTPUT_SYNC
+/* Support for OUTPUT_SYNC and related functionality. */
+
+/* Emulation of fcntl that supports only F_GETFD and F_SETLKW. */
+int
+fcntl (intptr_t fd, int cmd, ...)
+{
+ va_list ap;
+
+ va_start (ap, cmd);
+
+ switch (cmd)
+ {
+ case F_GETFD:
+ va_end (ap);
+ /* Could have used GetHandleInformation, but that isn't
+ supported on Windows 9X. */
+ if (_get_osfhandle (fd) == -1)
+ return -1;
+ return 0;
+ case F_SETLKW:
+ {
+ void *buf = va_arg (ap, void *);
+ struct flock *fl = (struct flock *)buf;
+ HANDLE hmutex = (HANDLE)fd;
+ static struct flock last_fl;
+ short last_type = last_fl.l_type;
+
+ va_end (ap);
+
+ if (hmutex == INVALID_HANDLE_VALUE || !hmutex)
+ return -1;
+
+ last_fl = *fl;
+
+ switch (fl->l_type)
+ {
+
+ case F_WRLCK:
+ {
+ DWORD result;
+
+ if (last_type == F_WRLCK)
+ {
+ /* Don't call WaitForSingleObject if we already
+ own the mutex, because doing so will require
+ us to call ReleaseMutex an equal number of
+ times, before the mutex is actually
+ released. */
+ return 0;
+ }
+
+ result = WaitForSingleObject (hmutex, INFINITE);
+ switch (result)
+ {
+ case WAIT_OBJECT_0:
+ /* We don't care if the mutex owner crashed or
+ exited. */
+ case WAIT_ABANDONED:
+ return 0;
+ case WAIT_FAILED:
+ case WAIT_TIMEOUT: /* cannot happen, really */
+ {
+ DWORD err = GetLastError ();
+
+ /* Invalidate the last command. */
+ memset (&last_fl, 0, sizeof (last_fl));
+
+ switch (err)
+ {
+ case ERROR_INVALID_HANDLE:
+ case ERROR_INVALID_FUNCTION:
+ errno = EINVAL;
+ return -1;
+ default:
+ errno = EDEADLOCK;
+ return -1;
+ }
+ }
+ }
+ }
+ case F_UNLCK:
+ {
+ /* FIXME: Perhaps we should call ReleaseMutex
+ repatedly until it errors out, to make sure the
+ mutext is released even if we somehow managed to
+ to take ownership multiple times? */
+ BOOL status = ReleaseMutex (hmutex);
+
+ if (status)
+ return 0;
+ else
+ {
+ DWORD err = GetLastError ();
+
+ if (err == ERROR_NOT_OWNER)
+ errno = EPERM;
+ else
+ {
+ memset (&last_fl, 0, sizeof (last_fl));
+ errno = EINVAL;
+ }
+ return -1;
+ }
+ }
+ default:
+ errno = ENOSYS;
+ return -1;
+ }
+ }
+ default:
+ errno = ENOSYS;
+ va_end (ap);
+ return -1;
+ }
+}
+
+static intptr_t mutex_handle = -1;
+
+/* Record in a static variable the mutex handle we were requested to
+ use. That nameless mutex was created by the top-level Make, and
+ its handle was passed to us via inheritance. The value of that
+ handle is passed via the command-line arguments, so that we know
+ which handle to use. */
+void
+record_sync_mutex (const char *str)
+{
+ char *endp;
+ intptr_t hmutex = strtol (str, &endp, 16);
+
+ if (*endp == '\0')
+ mutex_handle = hmutex;
+ else
+ {
+ mutex_handle = -1;
+ errno = EINVAL;
+ }
+}
+
+/* Create a new mutex or reuse one created by our parent. */
+intptr_t
+create_mutex (void)
+{
+ SECURITY_ATTRIBUTES secattr;
+ intptr_t hmutex = -1;
+
+ /* If we have a mutex handle passed from the parent Make, just use
+ that. */
+ if (mutex_handle > 0)
+ return mutex_handle;
+
+ /* We are the top-level Make, and we want the handle to be inherited
+ by our child processes. */
+ secattr.nLength = sizeof (secattr);
+ secattr.lpSecurityDescriptor = NULL; /* use default security descriptor */
+ secattr.bInheritHandle = TRUE;
+
+ hmutex = (intptr_t)CreateMutex (&secattr, FALSE, NULL);
+ if (!hmutex)
+ {
+ DWORD err = GetLastError ();
+
+ fprintf (stderr, "CreateMutex: error %lu\n", err);
+ errno = ENOLCK;
+ hmutex = -1;
+ }
+
+ mutex_handle = hmutex;
+ return hmutex;
+}
+
+/* Return non-zero if F1 and F2 are 2 streams representing the same
+ file or pipe or device. */
+int
+same_stream (FILE *f1, FILE *f2)
+{
+ HANDLE fh1 = (HANDLE)_get_osfhandle (fileno (f1));
+ HANDLE fh2 = (HANDLE)_get_osfhandle (fileno (f2));
+
+ /* Invalid file descriptors get treated as different streams. */
+ if (fh1 && fh1 != INVALID_HANDLE_VALUE
+ && fh2 && fh2 != INVALID_HANDLE_VALUE)
+ {
+ if (fh1 == fh2)
+ return 1;
+ else
+ {
+ DWORD ftyp1 = GetFileType (fh1), ftyp2 = GetFileType (fh2);
+
+ if (ftyp1 != ftyp2
+ || ftyp1 == FILE_TYPE_UNKNOWN || ftyp2 == FILE_TYPE_UNKNOWN)
+ return 0;
+ else if (ftyp1 == FILE_TYPE_CHAR)
+ {
+ /* For character devices, check if they both refer to a
+ console. This loses if both handles refer to the
+ null device (FIXME!), but in that case we don't care
+ in the context of Make. */
+ DWORD conmode1, conmode2;
+
+ /* Each process on Windows can have at most 1 console,
+ so if both handles are for the console device, they
+ are the same. We also compare the console mode to
+ distinguish between stdin and stdout/stderr. */
+ if (GetConsoleMode (fh1, &conmode1)
+ && GetConsoleMode (fh2, &conmode2)
+ && conmode1 == conmode2)
+ return 1;
+ }
+ else
+ {
+ /* For disk files and pipes, compare their unique
+ attributes. */
+ BY_HANDLE_FILE_INFORMATION bhfi1, bhfi2;
+
+ /* Pipes get zero in the volume serial number, but do
+ appear to have meaningful information in file index
+ attributes. We test file attributes as well, for a
+ good measure. */
+ if (GetFileInformationByHandle (fh1, &bhfi1)
+ && GetFileInformationByHandle (fh2, &bhfi2))
+ return (bhfi1.dwVolumeSerialNumber == bhfi2.dwVolumeSerialNumber
+ && bhfi1.nFileIndexLow == bhfi2.nFileIndexLow
+ && bhfi1.nFileIndexHigh == bhfi2.nFileIndexHigh
+ && bhfi1.dwFileAttributes == bhfi2.dwFileAttributes);
+ }
+ }
+ }
+ return 0;
+}
+
+/* A replacement for tmpfile, since the MSVCRT implementation creates
+ the file in the root directory of the current drive, which might
+ not be writable by our user. Most of the code borrowed from
+ create_batch_file, see job.c. */
+FILE *
+tmpfile (void)
+{
+ char temp_path[MAXPATHLEN];
+ unsigned path_size = GetTempPath (sizeof temp_path, temp_path);
+ int path_is_dot = 0;
+ /* The following variable is static so we won't try to reuse a name
+ that was generated a little while ago, because that file might
+ not be on disk yet, since we use FILE_ATTRIBUTE_TEMPORARY below,
+ which tells the OS it doesn't need to flush the cache to disk.
+ If the file is not yet on disk, we might think the name is
+ available, while it really isn't. This happens in parallel
+ builds, where Make doesn't wait for one job to finish before it
+ launches the next one. */
+ static unsigned uniq = 0;
+ static int second_loop = 0;
+ const char base[] = "gmake_tmpf";
+ const unsigned sizemax = sizeof base - 1 + 4 + 10 + 10;
+ unsigned pid = GetCurrentProcessId ();
+
+ if (path_size == 0)
+ {
+ path_size = GetCurrentDirectory (sizeof temp_path, temp_path);
+ path_is_dot = 1;
+ }
+
+ ++uniq;
+ if (uniq >= 0x10000 && !second_loop)
+ {
+ /* If we already had 64K batch files in this
+ process, make a second loop through the numbers,
+ looking for free slots, i.e. files that were
+ deleted in the meantime. */
+ second_loop = 1;
+ uniq = 1;
+ }
+ while (path_size > 0 &&
+ path_size + sizemax < sizeof temp_path &&
+ !(uniq >= 0x10000 && second_loop))
+ {
+ HANDLE h;
+
+ sprintf (temp_path + path_size,
+ "%s%s%u-%x.tmp",
+ temp_path[path_size - 1] == '\\' ? "" : "\\",
+ base, pid, uniq);
+ h = CreateFile (temp_path, /* file name */
+ GENERIC_READ | GENERIC_WRITE | DELETE, /* desired access */
+ FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */
+ NULL, /* default security attributes */
+ CREATE_NEW, /* creation disposition */
+ FILE_ATTRIBUTE_NORMAL | /* flags and attributes */
+ FILE_ATTRIBUTE_TEMPORARY |
+ FILE_FLAG_DELETE_ON_CLOSE,
+ NULL); /* no template file */
+
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ const DWORD er = GetLastError ();
+
+ if (er == ERROR_FILE_EXISTS || er == ERROR_ALREADY_EXISTS)
+ {
+ ++uniq;
+ if (uniq == 0x10000 && !second_loop)
+ {
+ second_loop = 1;
+ uniq = 1;
+ }
+ }
+
+ /* The temporary path is not guaranteed to exist, or might
+ not be writable by user. Use the current directory as
+ fallback. */
+ else if (path_is_dot == 0)
+ {
+ path_size = GetCurrentDirectory (sizeof temp_path, temp_path);
+ path_is_dot = 1;
+ }
+
+ else
+ {
+ errno = EACCES;
+ break;
+ }
+ }
+ else
+ {
+ int fd = _open_osfhandle ((intptr_t)h, 0);
+
+ return _fdopen (fd, "w+b");
+ }
+ }
+
+ if (uniq >= 0x10000)
+ errno = EEXIST;
+ return NULL;
+}
+
+#endif /* !NO_OUTPUT_SYNC */
+
+#if MAKE_LOAD
+
+/* Support for dynamic loading of objects. */
+
+
+static DWORD last_err;
+
+void *
+dlopen (const char *file, int mode)
+{
+ char dllfn[MAX_PATH], *p;
+ HANDLE dllhandle;
+
+ if ((mode & ~(RTLD_LAZY | RTLD_NOW | RTLD_GLOBAL)) != 0)
+ {
+ errno = EINVAL;
+ last_err = ERROR_INVALID_PARAMETER;
+ return NULL;
+ }
+
+ if (!file)
+ dllhandle = GetModuleHandle (NULL);
+ else
+ {
+ /* MSDN says to be sure to use backslashes in the DLL file name. */
+ strcpy (dllfn, file);
+ for (p = dllfn; *p; p++)
+ if (*p == '/')
+ *p = '\\';
+
+ dllhandle = LoadLibrary (dllfn);
+ }
+ if (!dllhandle)
+ last_err = GetLastError ();
+
+ return dllhandle;
+}
+
+char *
+dlerror (void)
+{
+ static char errbuf[1024];
+ DWORD ret;
+
+ if (!last_err)
+ return NULL;
+
+ ret = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM
+ | FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, last_err, 0, errbuf, sizeof (errbuf), NULL);
+ while (ret > 0 && (errbuf[ret - 1] == '\n' || errbuf[ret - 1] == '\r'))
+ --ret;
+
+ errbuf[ret] = '\0';
+ if (!ret)
+ sprintf (errbuf, "Error code %lu", last_err);
+
+ last_err = 0;
+ return errbuf;
+}
+
+void *
+dlsym (void *handle, const char *name)
+{
+ FARPROC addr = NULL;
+
+ if (!handle || handle == INVALID_HANDLE_VALUE)
+ {
+ last_err = ERROR_INVALID_PARAMETER;
+ return NULL;
+ }
+
+ addr = GetProcAddress (handle, name);
+ if (!addr)
+ last_err = GetLastError ();
+
+ return (void *)addr;
+}
+
+int
+dlclose (void *handle)
+{
+ if (!handle || handle == INVALID_HANDLE_VALUE)
+ return -1;
+ if (!FreeLibrary (handle))
+ return -1;
+
+ return 0;
+}
+
+
+#endif /* MAKE_LOAD */
+
diff --git a/w32/include/dirent.h b/w32/include/dirent.h
index 6e77c8b..e75a1b1 100644
--- a/w32/include/dirent.h
+++ b/w32/include/dirent.h
@@ -1,6 +1,5 @@
/* Windows version of dirent.h
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
diff --git a/w32/include/dlfcn.h b/w32/include/dlfcn.h
new file mode 100644
index 0000000..e920703
--- /dev/null
+++ b/w32/include/dlfcn.h
@@ -0,0 +1,29 @@
+/* dlfcn.h replacement for MS-Windows build.
+Copyright (C) 2013 Free Software Foundation, Inc.
+This file is part of GNU Make.
+
+GNU Make is free software; you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the Free Software
+Foundation; either version 3 of the License, or (at your option) any later
+version.
+
+GNU Make 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. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef DLFCN_H
+#define DLFCN_H
+
+#define RTLD_LAZY 1
+#define RTLD_NOW 2
+#define RTLD_GLOBAL 4
+
+extern void *dlopen (const char *, int);
+extern void *dlsym (void *, const char *);
+extern char *dlerror (void);
+extern int dlclose (void *);
+
+#endif /* DLFCN_H */
diff --git a/w32/include/pathstuff.h b/w32/include/pathstuff.h
index e56e822..4e34a13 100644
--- a/w32/include/pathstuff.h
+++ b/w32/include/pathstuff.h
@@ -1,6 +1,5 @@
/* Definitions for Windows path manipulation.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
diff --git a/w32/include/sub_proc.h b/w32/include/sub_proc.h
index 8166dce..c7d9fee 100644
--- a/w32/include/sub_proc.h
+++ b/w32/include/sub_proc.h
@@ -1,6 +1,5 @@
/* Definitions for Windows process invocation.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
@@ -21,11 +20,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
/*
* Component Name:
*
- * $Date: 2010/07/13 01:20:43 $
+ * $Date$
*
- * $Source: /sources/make/make/w32/include/sub_proc.h,v $
+ * $Source$
*
- * $Id: sub_proc.h,v 1.12 2010/07/13 01:20:43 psmith Exp $
+ * $Id$
*/
#define EXTERN_DECL(entry, args) extern entry args
@@ -40,9 +39,10 @@ EXTERN_DECL(long process_pipe_io, (HANDLE proc, char *stdin_data,
int stdin_data_len));
EXTERN_DECL(long process_file_io, (HANDLE proc));
EXTERN_DECL(void process_cleanup, (HANDLE proc));
-EXTERN_DECL(HANDLE process_wait_for_any, (VOID_DECL));
+EXTERN_DECL(HANDLE process_wait_for_any, (int block, DWORD* pdwWaitStatus));
EXTERN_DECL(void process_register, (HANDLE proc));
-EXTERN_DECL(HANDLE process_easy, (char** argv, char** env));
+EXTERN_DECL(HANDLE process_easy, (char** argv, char** env,
+ int outfd, int errfd));
EXTERN_DECL(BOOL process_kill, (HANDLE proc, int signal));
EXTERN_DECL(int process_used_slots, (VOID_DECL));
@@ -56,5 +56,16 @@ EXTERN_DECL(char * process_errbuf, (HANDLE proc));
EXTERN_DECL(int process_outcnt, (HANDLE proc));
EXTERN_DECL(int process_errcnt, (HANDLE proc));
EXTERN_DECL(void process_pipes, (HANDLE proc, int pipes[3]));
+EXTERN_DECL(void process_noinherit, (int fildes));
+
+/* jobserver routines */
+EXTERN_DECL(int open_jobserver_semaphore, (const char* name));
+EXTERN_DECL(int create_jobserver_semaphore, (int tokens));
+EXTERN_DECL(void free_jobserver_semaphore, (VOID_DECL));
+EXTERN_DECL(int acquire_jobserver_semaphore, (VOID_DECL));
+EXTERN_DECL(int release_jobserver_semaphore, (VOID_DECL));
+EXTERN_DECL(int has_jobserver_semaphore, (VOID_DECL));
+EXTERN_DECL(char* get_jobserver_semaphore_name, (VOID_DECL));
+EXTERN_DECL(int wait_for_semaphore_or_child_process, (VOID_DECL));
#endif
diff --git a/w32/include/w32err.h b/w32/include/w32err.h
index 65369ba..938a119 100644
--- a/w32/include/w32err.h
+++ b/w32/include/w32err.h
@@ -1,6 +1,5 @@
/* Definitions for Windows error handling.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
@@ -22,6 +21,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#define EXTERN_DECL(entry, args) entry args
#endif
-EXTERN_DECL(char * map_windows32_error_to_string, (DWORD error));
+EXTERN_DECL(const char * map_windows32_error_to_string, (DWORD error));
#endif /* !_W32ERR_H */
diff --git a/w32/pathstuff.c b/w32/pathstuff.c
index 1f8269e..0e33821 100644
--- a/w32/pathstuff.c
+++ b/w32/pathstuff.c
@@ -1,6 +1,5 @@
/* Path conversion for Windows pathnames.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
@@ -15,7 +14,7 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "make.h"
+#include "makeint.h"
#include <string.h>
#include <stdlib.h>
#include "pathstuff.h"
diff --git a/w32/subproc/NMakefile b/w32/subproc/NMakefile
index 46c838c..5258fa3 100644
--- a/w32/subproc/NMakefile
+++ b/w32/subproc/NMakefile
@@ -1,8 +1,7 @@
-# NOTE: If you have no `make' program at all to process this makefile, run
-# `build.bat' instead.
+# NOTE: If you have no 'make' program at all to process this makefile, run
+# 'build.bat' instead.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
diff --git a/w32/subproc/build.bat b/w32/subproc/build.bat
index dee4072..ecd2ab7 100644
--- a/w32/subproc/build.bat
+++ b/w32/subproc/build.bat
@@ -1,24 +1,23 @@
-@if "%1" == "gcc" GoTo GCCBuild
+@if "%COMPILER%" == "gcc" GoTo GCCBuild
if not exist .\WinDebug\nul mkdir .\WinDebug
-cl.exe /nologo /MT /W4 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c
+cl.exe /nologo /MT /W4 /GX /Z7 /YX /Od /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c
cl.exe /nologo /MT /W4 /GX /Z7 /YX /Od /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c
-cl.exe /nologo /MT /W4 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c
+cl.exe /nologo /MT /W4 /GX /Z7 /YX /Od /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c
lib.exe /NOLOGO /OUT:.\WinDebug\subproc.lib .\WinDebug/misc.obj .\WinDebug/sub_proc.obj .\WinDebug/w32err.obj
if not exist .\WinRel\nul mkdir .\WinRel
-cl.exe /nologo /MT /W4 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c
-cl.exe /nologo /MT /W4 /GX /YX /O2 /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c
-cl.exe /nologo /MT /W4 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c
+cl.exe /nologo /MT /W4 /GX /YX /O2 /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c
+cl.exe /nologo /MT /W4 /GX /YX /O2 /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c
+cl.exe /nologo /MT /W4 /GX /YX /O2 /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c
lib.exe /NOLOGO /OUT:.\WinRel\subproc.lib .\WinRel/misc.obj .\WinRel/sub_proc.obj .\WinRel/w32err.obj
GoTo BuildEnd
:GCCBuild
-gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I.. -I. -I../include -I../.. -DWINDOWS32 -c misc.c -o ../../w32_misc.o
-gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I.. -I. -I../include -I../.. -DWINDOWS32 -c sub_proc.c -o ../../sub_proc.o
-gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I.. -I. -I../include -I../.. -DWINDOWS32 -c w32err.c -o ../../w32err.o
+gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I.. -I. -I../include -I../.. -DWINDOWS32 -c misc.c -o ../../w32_misc.o
+gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I.. -I. -I../include -I../.. -DWINDOWS32 -c sub_proc.c -o ../../sub_proc.o
+gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I.. -I. -I../include -I../.. -DWINDOWS32 -c w32err.c -o ../../w32err.o
:BuildEnd
@echo off
-rem Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-rem 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+rem Copyright (C) 1996-2013 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem
rem GNU Make is free software; you can redistribute it and/or modify it under
diff --git a/w32/subproc/misc.c b/w32/subproc/misc.c
index 6759c17..1e3f3a1 100644
--- a/w32/subproc/misc.c
+++ b/w32/subproc/misc.c
@@ -1,6 +1,5 @@
/* Process handling for Windows
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
diff --git a/w32/subproc/proc.h b/w32/subproc/proc.h
index 00b4bac..259a119 100644
--- a/w32/subproc/proc.h
+++ b/w32/subproc/proc.h
@@ -1,6 +1,5 @@
/* Definitions for Windows
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
diff --git a/w32/subproc/sub_proc.c b/w32/subproc/sub_proc.c
index dcb77bf..f790ca3 100644
--- a/w32/subproc/sub_proc.c
+++ b/w32/subproc/sub_proc.c
@@ -1,6 +1,5 @@
/* Process handling for Windows.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
@@ -18,22 +17,24 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
+#include <io.h> /* for _get_osfhandle */
#ifdef _MSC_VER
# include <stddef.h> /* for intptr_t */
#else
# include <stdint.h>
#endif
+#include <string.h>
#include <process.h> /* for msvc _beginthreadex, _endthreadex */
#include <signal.h>
#include <windows.h>
+#include "makeint.h"
#include "sub_proc.h"
#include "proc.h"
#include "w32err.h"
#include "debug.h"
static char *make_command_line(char *shell_name, char *exec_path, char **argv);
-extern char *xmalloc (unsigned int);
typedef struct sub_process_t {
intptr_t sv_stdin[2];
@@ -58,6 +59,126 @@ static sub_process *proc_array[MAXIMUM_WAIT_OBJECTS];
static int proc_index = 0;
static int fake_exits_pending = 0;
+/* Windows jobserver implementation variables */
+static char jobserver_semaphore_name[MAX_PATH + 1];
+static HANDLE jobserver_semaphore = NULL;
+
+/* Open existing jobserver semaphore */
+int open_jobserver_semaphore(const char* name)
+{
+ jobserver_semaphore = OpenSemaphore(
+ SEMAPHORE_ALL_ACCESS, // Semaphore access setting
+ FALSE, // Child processes DON'T inherit
+ name); // Semaphore name
+
+ if (jobserver_semaphore == NULL)
+ return 0;
+
+ return 1;
+}
+
+/* Create new jobserver semaphore */
+int create_jobserver_semaphore(int tokens)
+{
+ sprintf(jobserver_semaphore_name, "gmake_semaphore_%d", _getpid());
+
+ jobserver_semaphore = CreateSemaphore(
+ NULL, // Use default security descriptor
+ tokens, // Initial count
+ tokens, // Maximum count
+ jobserver_semaphore_name); // Semaphore name
+
+ if (jobserver_semaphore == NULL)
+ return 0;
+
+ return 1;
+}
+
+/* Close jobserver semaphore */
+void free_jobserver_semaphore()
+{
+ if (jobserver_semaphore != NULL)
+ {
+ CloseHandle(jobserver_semaphore);
+ jobserver_semaphore = NULL;
+ }
+}
+
+/* Decrement semaphore count */
+int acquire_jobserver_semaphore()
+{
+ DWORD dwEvent = WaitForSingleObject(
+ jobserver_semaphore, // Handle to semaphore
+ 0); // DON'T wait on semaphore
+
+ return (dwEvent == WAIT_OBJECT_0);
+}
+
+/* Increment semaphore count */
+int release_jobserver_semaphore()
+{
+ BOOL bResult = ReleaseSemaphore(
+ jobserver_semaphore, // handle to semaphore
+ 1, // increase count by one
+ NULL); // not interested in previous count
+
+ return (bResult);
+}
+
+int has_jobserver_semaphore()
+{
+ return (jobserver_semaphore != NULL);
+}
+
+char* get_jobserver_semaphore_name()
+{
+ return (jobserver_semaphore_name);
+}
+
+/* Wait for either the jobserver semaphore to become signalled or one of our
+ * child processes to terminate.
+ */
+int wait_for_semaphore_or_child_process()
+{
+ HANDLE handles[MAXIMUM_WAIT_OBJECTS];
+ DWORD dwHandleCount = 1;
+ DWORD dwEvent;
+ int i;
+
+ /* Add jobserver semaphore to first slot. */
+ handles[0] = jobserver_semaphore;
+
+ /* Build array of handles to wait for */
+ for (i = 0; i < proc_index; i++)
+ {
+ /* Don't wait on child processes that have already finished */
+ if (fake_exits_pending && proc_array[i]->exit_code)
+ continue;
+
+ handles[dwHandleCount++] = (HANDLE) proc_array[i]->pid;
+ }
+
+ dwEvent = WaitForMultipleObjects(
+ dwHandleCount, // number of objects in array
+ handles, // array of objects
+ FALSE, // wait for any object
+ INFINITE); // wait until object is signalled
+
+ switch(dwEvent)
+ {
+ case WAIT_FAILED:
+ return -1;
+
+ case WAIT_OBJECT_0:
+ /* Indicate that the semaphore was signalled */
+ return 1;
+
+ default:
+ /* Assume that one or more of the child processes terminated. */
+ return 0;
+ }
+}
+
/*
* When a process has been waited for, adjust the wait state
* array so that we don't wait for it again
@@ -87,7 +208,7 @@ process_adjust_wait_state(sub_process* pproc)
* Waits for any of the registered child processes to finish.
*/
static sub_process *
-process_wait_for_any_private(void)
+process_wait_for_any_private(int block, DWORD* pdwWaitStatus)
{
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
DWORD retval, which;
@@ -106,7 +227,7 @@ process_wait_for_any_private(void)
/* wait for someone to exit */
if (!fake_exits_pending) {
- retval = WaitForMultipleObjects(proc_index, handles, FALSE, INFINITE);
+ retval = WaitForMultipleObjects(proc_index, handles, FALSE, (block ? INFINITE : 0));
which = retval - WAIT_OBJECT_0;
} else {
fake_exits_pending--;
@@ -114,13 +235,19 @@ process_wait_for_any_private(void)
which = i;
}
+ /* If the pointer is not NULL, set the wait status result variable. */
+ if (pdwWaitStatus)
+ *pdwWaitStatus = retval;
+
/* return pointer to process */
- if (retval != WAIT_FAILED) {
+ if ((retval == WAIT_TIMEOUT) || (retval == WAIT_FAILED)) {
+ return NULL;
+ }
+ else {
sub_process* pproc = proc_array[which];
process_adjust_wait_state(pproc);
return pproc;
- } else
- return NULL;
+ }
}
/*
@@ -179,9 +306,9 @@ process_used_slots(void)
*/
HANDLE
-process_wait_for_any(void)
+process_wait_for_any(int block, DWORD* pdwWaitStatus)
{
- sub_process* pproc = process_wait_for_any_private();
+ sub_process* pproc = process_wait_for_any_private(block, pdwWaitStatus);
if (!pproc)
return NULL;
@@ -216,6 +343,15 @@ process_exit_code(HANDLE proc)
return (((sub_process *)proc)->exit_code);
}
+void
+process_noinherit(int fd)
+{
+ HANDLE fh = (HANDLE)_get_osfhandle(fd);
+
+ if (fh && fh != INVALID_HANDLE_VALUE)
+ SetHandleInformation(fh, HANDLE_FLAG_INHERIT, 0);
+}
+
/*
2006-02:
All the following functions are currently unused.
@@ -336,17 +472,19 @@ process_init_fd(HANDLE stdinh, HANDLE stdouth, HANDLE stderrh)
sub_process *pproc;
pproc = malloc(sizeof(*pproc));
- memset(pproc, 0, sizeof(*pproc));
+ if (pproc) {
+ memset(pproc, 0, sizeof(*pproc));
- /*
- * Just pass the provided file handles to the 'child side' of the
- * pipe, bypassing pipes altogether.
- */
- pproc->sv_stdin[1] = (intptr_t) stdinh;
- pproc->sv_stdout[1] = (intptr_t) stdouth;
- pproc->sv_stderr[1] = (intptr_t) stderrh;
+ /*
+ * Just pass the provided file handles to the 'child
+ * side' of the pipe, bypassing pipes altogether.
+ */
+ pproc->sv_stdin[1] = (intptr_t) stdinh;
+ pproc->sv_stdout[1] = (intptr_t) stdouth;
+ pproc->sv_stderr[1] = (intptr_t) stderrh;
- pproc->last_err = pproc->lerrno = 0;
+ pproc->last_err = pproc->lerrno = 0;
+ }
return((HANDLE)pproc);
}
@@ -403,6 +541,26 @@ find_file(const char *exec_path, const char *path_var,
return INVALID_HANDLE_VALUE;
}
+/*
+ * Return non-zero of FNAME specifies a batch file and its name
+ * includes embedded whitespace.
+ */
+
+static int
+batch_file_with_spaces(const char *fname)
+{
+ size_t fnlen = strlen(fname);
+
+ return (fnlen > 4
+ && (_strnicmp(fname + fnlen - 4, ".bat", 4) == 0
+ || _strnicmp(fname + fnlen - 4, ".cmd", 4) == 0)
+ /* The set of characters in the 2nd arg to strpbrk
+ should be the same one used by make_command_line
+ below to decide whether an argv[] element needs
+ quoting. */
+ && strpbrk(fname, " \t") != NULL);
+}
+
/*
* Description: Create the child process to be helped
@@ -433,6 +591,7 @@ process_begin(
STARTUPINFO startInfo;
PROCESS_INFORMATION procInfo;
char *envblk=NULL;
+ int pass_null_exec_path = 0;
/*
* Shell script detection... if the exec_path starts with #! then
@@ -514,8 +673,28 @@ process_begin(
if (file_not_found)
command_line = make_command_line( shell_name, exec_path, argv);
- else
+ else {
+ /* If exec_fname includes whitespace, CreateProcess
+ behaves erratically and unreliably, and often fails
+ if argv[0] also includes whitespace (and thus will
+ be quoted by make_command_line below). So in that
+ case, we don't pass exec_fname as the 1st arg to
+ CreateProcess, but instead replace argv[0] with
+ exec_fname (to keep its leading directories and
+ extension as found by find_file), and pass NULL to
+ CreateProcess as its 1st arg. This works around
+ the bugs in CreateProcess, which are probably
+ caused by its passing the command to cmd.exe with
+ some incorrect quoting. */
+ if (!shell_name
+ && batch_file_with_spaces(exec_fname)
+ && _stricmp(exec_path, argv[0]) == 0) {
+ pass_null_exec_path = 1;
+ free (argv[0]);
+ argv[0] = xstrdup(exec_fname);
+ }
command_line = make_command_line( shell_name, exec_fname, argv);
+ }
if ( command_line == NULL ) {
pproc->last_err = 0;
@@ -532,7 +711,7 @@ process_begin(
}
}
- if ((shell_name) || (file_not_found)) {
+ if (shell_name || file_not_found || pass_null_exec_path) {
exec_path = 0; /* Search for the program in %Path% */
} else {
exec_path = exec_fname;
@@ -585,9 +764,12 @@ process_begin(
CloseHandle(procInfo.hThread);
/* Close the halves of the pipes we don't need */
- CloseHandle((HANDLE)pproc->sv_stdin[1]);
- CloseHandle((HANDLE)pproc->sv_stdout[1]);
- CloseHandle((HANDLE)pproc->sv_stderr[1]);
+ if ((HANDLE)pproc->sv_stdin[1] != INVALID_HANDLE_VALUE)
+ CloseHandle((HANDLE)pproc->sv_stdin[1]);
+ if ((HANDLE)pproc->sv_stdout[1] != INVALID_HANDLE_VALUE)
+ CloseHandle((HANDLE)pproc->sv_stdout[1]);
+ if ((HANDLE)pproc->sv_stderr[1] != INVALID_HANDLE_VALUE)
+ CloseHandle((HANDLE)pproc->sv_stderr[1]);
pproc->sv_stdin[1] = 0;
pproc->sv_stdout[1] = 0;
pproc->sv_stderr[1] = 0;
@@ -600,6 +782,7 @@ process_begin(
+#if 0 /* unused */
static DWORD
proc_stdin_thread(sub_process *pproc)
{
@@ -844,6 +1027,7 @@ process_pipe_io(
return(0);
}
+#endif /* unused */
/*
* Purpose: collects output from child process and returns results
@@ -865,7 +1049,7 @@ process_file_io(
DWORD ierr;
if (proc == NULL)
- pproc = process_wait_for_any_private();
+ pproc = process_wait_for_any_private(1, 0);
else
pproc = (sub_process *)proc;
@@ -927,7 +1111,7 @@ done2:
/*
* Description: Clean up any leftover handles, etc. It is up to the
- * caller to manage and free the input, ouput, and stderr buffers.
+ * caller to manage and free the input, output, and stderr buffers.
*/
void
process_cleanup(
@@ -938,11 +1122,14 @@ process_cleanup(
if (pproc->using_pipes) {
for (i= 0; i <= 1; i++) {
- if ((HANDLE)pproc->sv_stdin[i])
+ if ((HANDLE)pproc->sv_stdin[i]
+ && (HANDLE)pproc->sv_stdin[i] != INVALID_HANDLE_VALUE)
CloseHandle((HANDLE)pproc->sv_stdin[i]);
- if ((HANDLE)pproc->sv_stdout[i])
+ if ((HANDLE)pproc->sv_stdout[i]
+ && (HANDLE)pproc->sv_stdout[i] != INVALID_HANDLE_VALUE)
CloseHandle((HANDLE)pproc->sv_stdout[i]);
- if ((HANDLE)pproc->sv_stderr[i])
+ if ((HANDLE)pproc->sv_stderr[i]
+ && (HANDLE)pproc->sv_stderr[i] != INVALID_HANDLE_VALUE)
CloseHandle((HANDLE)pproc->sv_stderr[i]);
}
}
@@ -1205,52 +1392,110 @@ make_command_line( char *shell_name, char *full_exec_path, char **argv)
HANDLE
process_easy(
char **argv,
- char **envp)
+ char **envp,
+ int outfd,
+ int errfd)
{
- HANDLE hIn;
- HANDLE hOut;
- HANDLE hErr;
- HANDLE hProcess;
+ HANDLE hIn = INVALID_HANDLE_VALUE;
+ HANDLE hOut = INVALID_HANDLE_VALUE;
+ HANDLE hErr = INVALID_HANDLE_VALUE;
+ HANDLE hProcess, tmpIn, tmpOut, tmpErr;
+ DWORD e;
if (proc_index >= MAXIMUM_WAIT_OBJECTS) {
DB (DB_JOBS, ("process_easy: All process slots used up\n"));
return INVALID_HANDLE_VALUE;
}
+ /* Standard handles returned by GetStdHandle can be NULL or
+ INVALID_HANDLE_VALUE if the parent process closed them. If that
+ happens, we open the null device and pass its handle to
+ CreateProcess as the corresponding handle to inherit. */
+ tmpIn = GetStdHandle(STD_INPUT_HANDLE);
if (DuplicateHandle(GetCurrentProcess(),
- GetStdHandle(STD_INPUT_HANDLE),
- GetCurrentProcess(),
- &hIn,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS) == FALSE) {
- fprintf(stderr,
- "process_easy: DuplicateHandle(In) failed (e=%ld)\n",
- GetLastError());
- return INVALID_HANDLE_VALUE;
+ tmpIn,
+ GetCurrentProcess(),
+ &hIn,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS) == FALSE) {
+ if ((e = GetLastError()) == ERROR_INVALID_HANDLE) {
+ tmpIn = CreateFile("NUL", GENERIC_READ,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (tmpIn != INVALID_HANDLE_VALUE
+ && DuplicateHandle(GetCurrentProcess(),
+ tmpIn,
+ GetCurrentProcess(),
+ &hIn,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS) == FALSE)
+ CloseHandle(tmpIn);
+ }
+ if (hIn == INVALID_HANDLE_VALUE) {
+ fprintf(stderr, "process_easy: DuplicateHandle(In) failed (e=%ld)\n", e);
+ return INVALID_HANDLE_VALUE;
+ }
}
+ if (outfd >= 0)
+ tmpOut = (HANDLE)_get_osfhandle (outfd);
+ else
+ tmpOut = GetStdHandle (STD_OUTPUT_HANDLE);
if (DuplicateHandle(GetCurrentProcess(),
- GetStdHandle(STD_OUTPUT_HANDLE),
- GetCurrentProcess(),
- &hOut,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS) == FALSE) {
- fprintf(stderr,
- "process_easy: DuplicateHandle(Out) failed (e=%ld)\n",
- GetLastError());
- return INVALID_HANDLE_VALUE;
+ tmpOut,
+ GetCurrentProcess(),
+ &hOut,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS) == FALSE) {
+ if ((e = GetLastError()) == ERROR_INVALID_HANDLE) {
+ tmpOut = CreateFile("NUL", GENERIC_WRITE,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (tmpOut != INVALID_HANDLE_VALUE
+ && DuplicateHandle(GetCurrentProcess(),
+ tmpOut,
+ GetCurrentProcess(),
+ &hOut,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS) == FALSE)
+ CloseHandle(tmpOut);
+ }
+ if (hOut == INVALID_HANDLE_VALUE) {
+ fprintf(stderr, "process_easy: DuplicateHandle(Out) failed (e=%ld)\n", e);
+ return INVALID_HANDLE_VALUE;
+ }
}
+ if (errfd >= 0)
+ tmpErr = (HANDLE)_get_osfhandle (errfd);
+ else
+ tmpErr = GetStdHandle(STD_ERROR_HANDLE);
if (DuplicateHandle(GetCurrentProcess(),
- GetStdHandle(STD_ERROR_HANDLE),
- GetCurrentProcess(),
- &hErr,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS) == FALSE) {
- fprintf(stderr,
- "process_easy: DuplicateHandle(Err) failed (e=%ld)\n",
- GetLastError());
- return INVALID_HANDLE_VALUE;
+ tmpErr,
+ GetCurrentProcess(),
+ &hErr,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS) == FALSE) {
+ if ((e = GetLastError()) == ERROR_INVALID_HANDLE) {
+ tmpErr = CreateFile("NUL", GENERIC_WRITE,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (tmpErr != INVALID_HANDLE_VALUE
+ && DuplicateHandle(GetCurrentProcess(),
+ tmpErr,
+ GetCurrentProcess(),
+ &hErr,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS) == FALSE)
+ CloseHandle(tmpErr);
+ }
+ if (hErr == INVALID_HANDLE_VALUE) {
+ fprintf(stderr, "process_easy: DuplicateHandle(Err) failed (e=%ld)\n", e);
+ return INVALID_HANDLE_VALUE;
+ }
}
hProcess = process_init_fd(hIn, hOut, hErr);
@@ -1263,9 +1508,12 @@ process_easy(
((sub_process*) hProcess)->exit_code = process_last_err(hProcess);
/* close up unused handles */
- CloseHandle(hIn);
- CloseHandle(hOut);
- CloseHandle(hErr);
+ if (hIn != INVALID_HANDLE_VALUE)
+ CloseHandle(hIn);
+ if (hOut != INVALID_HANDLE_VALUE)
+ CloseHandle(hOut);
+ if (hErr != INVALID_HANDLE_VALUE)
+ CloseHandle(hErr);
}
process_register(hProcess);
diff --git a/w32/subproc/w32err.c b/w32/subproc/w32err.c
index 80d796e..facfabc 100644
--- a/w32/subproc/w32err.c
+++ b/w32/subproc/w32err.c
@@ -1,6 +1,5 @@
/* Error handling for Windows
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
@@ -15,7 +14,9 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
+#include <stdlib.h>
#include <windows.h>
+#include "makeint.h"
#include "w32err.h"
/*
@@ -26,14 +27,24 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
* Notes/Dependencies: I got this from
* comp.os.ms-windows.programmer.win32
*/
-char *
+const char *
map_windows32_error_to_string (DWORD ercode) {
-/* __declspec (thread) necessary if you will use multiple threads on MSVC */
-#ifdef _MSC_VER
-__declspec (thread) static char szMessageBuffer[128];
-#else
-static char szMessageBuffer[128];
-#endif
+/*
+ * We used to have an MSVC-specific '__declspec (thread)' qualifier
+ * here, with the following comment:
+ *
+ * __declspec (thread) necessary if you will use multiple threads on MSVC
+ *
+ * However, Make was never multithreaded on Windows (except when
+ * Ctrl-C is hit, in which case the main thread is stopped
+ * immediately, so it doesn't matter in this context). The functions
+ * on sub_proc.c that started and stopped additional threads were
+ * never used, and are now #ifdef'ed away. Until we need more than
+ * one thread, we have no problems with the following buffer being
+ * static. (If and when we do need it to be in thread-local storage,
+ * the corresponding GCC qualifier is '__thread'.)
+ */
+ static char szMessageBuffer[128];
/* Fill message buffer with a default message in
* case FormatMessage fails
*/
@@ -43,6 +54,7 @@ static char szMessageBuffer[128];
* Special code for winsock error handling.
*/
if (ercode > WSABASEERR) {
+#if 0
HMODULE hModule = GetModuleHandle("wsock32");
if (hModule != NULL) {
FormatMessage(FORMAT_MESSAGE_FROM_HMODULE,
@@ -54,6 +66,9 @@ static char szMessageBuffer[128];
NULL);
FreeLibrary(hModule);
}
+#else
+ fatal(NILF, szMessageBuffer);
+#endif
} else {
/*
* Default system message handling