bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

djgpp support for bison


From: Juan Manuel Guerrero
Subject: djgpp support for bison
Date: Mon, 25 Apr 2005 02:33:08 +0200
User-agent: KMail/1.5.1

This is a patch to implement djgpp support to the bison sources. It will allow
to produce a binary that will run on non posix systems like msdos, freedos, etc.
The main design goal has been to keep the changes to the mainline code of bison
as small as possible. To achive this goal, all djgpp specific code has been 
stored
in the new /djgpp directory. All files contained in this directory will be 
maintained
by me so the maintainers of the bison code do not need to care about this port.

The principal issue in this port is to solve the difficulty for the missing of
the fork() functionality in some non posix systems. To solve this issue,
new versions of subpipe.[ch] have been written. When using these files,
the fork() functionality will be emulated by redirecting bison's stdout to a
temporary file, this temporary file will be connected to m4's stdin and m4
will be spawnvp()'ed. m4's stdout will be redircted to a second temporary
file that later will be connected to bison's stdin. To be able to use this 
substitute
for the fork() functionality when compiling the bison code using djgpp, minor
changes to the mainline code is needed. The following files must be modified:
  src/output.c
  lib/subpipe.[ch]
In function output_skeleton() of src/output.c the following line must be added
at the appropiate place (see patch):
  end_of_output_subpipe (pid, filter_fd);

For posix systems, this function is defined and declared in lib/subpipe.[ch]
and is a noop (empty) function as suggested by Paull Eggert some weeks ago.
In the djgpp version of djgpp/subpipe.[ch], the implementation of 
end_of_output_subpipe()
will do the right thing for the msdos port.
OFYI, the /djgpp directory will contain the following files:
  djgpp/config.bat
  djgpp/config.sed
  djgpp/config.site
  djgpp/config_h.sed
  djgpp/readme
  djgpp/subpipe.c
  djgpp/subpipe.h
These files will either control the configuration process, or they will be used
during the compilation stage. But anyway, all these files are of no interest
for the posix people and will be maintained by me. Because I do not know what
the appropriate trunk to choose, I have chosen HEAD to create the patch.

Suggestions, objections, comments are welcome.

Regards,
Juan Manuel Guerrero



diff -aprNU5 bison.orig/djgpp/config.bat bison/djgpp/config.bat
--- bison.orig/djgpp/config.bat 1970-01-01 00:00:00.000000000 +0000
+++ bison/djgpp/config.bat      2005-04-24 01:56:04.000000000 +0000
@@ -0,0 +1,328 @@
address@hidden off
+echo Configuring GNU Bison for DJGPP v2.x...
+
+Rem The SmallEnv tests protect against fixed and too small size
+Rem of the environment in stock DOS shell.
+
+Rem Find out if NLS is wanted or not,
+Rem if dependency-tracking is wanted or not,
+Rem if caching is wanted or not
+Rem and where the sources are.
+Rem We always default to NLS support,
+Rem no dependency tracking
+Rem and to in place configuration.
+set ARGS=
+set NLS=enabled
+if not "%NLS%" == "enabled" goto SmallEnv
+set CACHING=enabled
+if not "%CACHING%" == "enabled" goto SmallEnv
+set DEPENDENCY_TRACKING=disabled
+if not "%DEPENDENCY_TRACKING%" == "disabled" goto SmallEnv
+set LIBICONV_PREFIX=disabled
+if not "%LIBICONV_PREFIX%" == "disabled" goto SmallEnv
+set LIBINTL_PREFIX=disabled
+if not "%LIBINTL_PREFIX%" == "disabled" goto SmallEnv
+set HTML=enabled
+if not "%HTML%" == "enabled" goto SmallEnv
+set XSRC=.
+if not "%XSRC%" == "." goto SmallEnv
+
+Rem Loop over all arguments.
+Rem Special arguments are: NLS, XSRC, CACHE, STATIC_LIBS, LIBICONV_PREFIX, 
LIBINTL_PREFIX and DEPS.
+Rem All other arguments are stored into ARGS.
+:ArgLoop
+if "%1" == "nls" goto NextArgument
+if "%1" == "NLS" goto NextArgument
+if "%1" == "no-nls" goto NoNLS
+if "%1" == "no-NLS" goto NoNLS
+if "%1" == "NO-NLS" goto NoNLS
+goto CachingOption
+:NoNLS
+if "%1" == "no-nls" set NLS=disabled
+if "%1" == "no-NLS" set NLS=disabled
+if "%1" == "NO-NLS" set NLS=disabled
+if not "%NLS%" == "disabled" goto SmallEnv
+goto NextArgument
+:CachingOption
+if "%1" == "cache" goto NextArgument
+if "%1" == "CACHE" goto NextArgument
+if "%1" == "no-cache" goto NoCaching
+if "%1" == "no-CACHE" goto NoCaching
+if "%1" == "NO-CACHE" goto NoCaching
+goto DependencyOption
+:NoCaching
+if "%1" == "no-cache" set CACHING=disabled
+if "%1" == "no-CACHE" set CACHING=disabled
+if "%1" == "NO-CACHE" set CACHING=disabled
+if not "%CACHING%" == "disabled" goto SmallEnv
+goto NextArgument
+:DependencyOption
+if "%1" == "no-dep" goto NextArgument
+if "%1" == "no-DEP" goto NextArgument
+if "%1" == "NO-DEP" goto NextArgument
+if "%1" == "dep" goto DependecyTraking
+if "%1" == "DEP" goto DependecyTraking
+goto LibiconvPrefixOption
+:DependecyTraking
+if "%1" == "dep" set DEPENDENCY_TRACKING=enabled
+if "%1" == "DEP" set DEPENDENCY_TRACKING=enabled
+if not "%DEPENDENCY_TRACKING%" == "enabled" goto SmallEnv
+goto NextArgument
+:LibiconvPrefixOption
+if "%1" == "no-libiconvprefix" goto NextArgument
+if "%1" == "no-LIBICONVPREFIX" goto NextArgument
+if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
+if "%1" == "libiconvprefix" goto WithLibiconvPrefix
+if "%1" == "LIBICONVPREFIX" goto WithLibiconvPrefix
+goto LibintlPrefixOption
+:WithLibiconvPrefix
+if "%1" == "libiconvprefix" set LIBICONV_PREFIX=enabled
+if "%1" == "LIBICONVPREFIX" set LIBICONV_PREFIX=enabled
+if not "%LIBICONV_PREFIX%" == "enabled" goto SmallEnv
+goto NextArgument
+:LibintlPrefixOption
+if "%1" == "no-libiconvprefix" goto NextArgument
+if "%1" == "no-LIBICONVPREFIX" goto NextArgument
+if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
+if "%1" == "libintlprefix" goto _WithLibintlPrefix
+if "%1" == "LIBINTLPREFIX" goto _WithLibintlPrefix
+goto HTMLOption
+:_WithLibintlPrefix
+if "%1" == "libintlprefix" set LIBINTL_PREFIX=enabled
+if "%1" == "LIBINTLPREFIX" set LIBINTL_PREFIX=enabled
+if not "%LIBINTL_PREFIX%" == "enabled" goto SmallEnv
+:HTMLOption
+if "%1" == "withhtml" goto NextArgument
+if "%1" == "withHTML" goto NextArgument
+if "%1" == "WITHHTML" goto NextArgument
+if "%1" == "withouthtml" goto _WithoutHTML
+if "%1" == "withoutHTML" goto _WithoutHTML
+if "%1" == "WITHOUTHTML" goto _WithoutHTML
+goto SrcDirOption
+:_WithoutHTML
+if "%1" == "withouthtml" set HTML=disabled
+if "%1" == "withoutHTML" set HTML=disabled
+if "%1" == "WITHOUTHTML" set HTML=disabled
+if not "%HTML%" == "disabled" goto SmallEnv
+goto NextArgument
+:SrcDirOption
+echo %1 | grep -q "/"
+if errorlevel 1 goto CollectArgument
+set XSRC=%1
+if not "%XSRC%" == "%1" goto SmallEnv
+goto NextArgument
+:CollectArgument
+set _ARGS=%ARGS% %1
+if not "%_ARGS%" == "%ARGS% %1" if not "%_ARGS%" == "%ARGS%%1" goto SmallEnv
+echo %_ARGS% | grep -q "[^ ]"
+if not errorlevel 0 set ARGS=%_ARGS%
+set _ARGS=
+:NextArgument
+shift
+if not "%1" == "" goto ArgLoop
+
+Rem Create an arguments file for the configure script.
+echo --srcdir=%XSRC% > arguments
+if "%CACHING%" == "enabled"              echo 
--cache-file=%XSRC%/djgpp/config.cache >> arguments
+if "%DEPENDENCY_TRACKING%" == "enabled"  echo --enable-dependency-tracking >> 
arguments
+if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> 
arguments
+if "%LIBICONV_PREFIX%" == "enabled"      echo --with-libiconv-prefix >> 
arguments
+if "%LIBICONV_PREFIX%" == "disabled"     echo --without-libiconv-prefix >> 
arguments
+if "%LIBINTL_PREFIX%" == "enabled"       echo --with-libintl-prefix >> 
arguments
+if "%LIBINTL_PREFIX%" == "disabled"      echo --without-libintl-prefix >> 
arguments
+if "%HTML%" == "enabled"                 echo --enable-html >> arguments
+if "%HTML%" == "disabled"                echo --disable-html >> arguments
+if not "%ARGS%" == ""                    echo %ARGS% >> arguments
+set ARGS=
+set CACHING=
+set DEPENDENCY_TRACKING=
+
+if "%XSRC%" == "." goto InPlace
+
+:NotInPlace
+redir -e /dev/null update %XSRC%/configure.orig ./configure
+test -f ./configure
+if errorlevel 1 update %XSRC%/configure ./configure
+
+:InPlace
+Rem Update configuration files
+echo Updating configuration scripts...
+test -f ./configure.orig
+if errorlevel 1 update configure configure.orig
+sed -f %XSRC%/djgpp/config.sed configure.orig > configure
+if errorlevel 1 goto SedError
+
+Rem Make sure they have a config.site file
+set CONFIG_SITE=%XSRC%/djgpp/config.site
+if not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnv
+
+Rem Make sure crucial file names are not munged by unpacking
+test -f %XSRC%/po/Makefile.in.in
+if not errorlevel 1 mv -f %XSRC%/po/Makefile.in.in %XSRC%/po/Makefile.in-in
+test -f %XSRC%/po/Makefile.in-in
+if errorlevel 1 mv -f %XSRC%/po/Makefile.in %XSRC%/po/Makefile.in-in
+
+
+Rem Define DJGPP specific defs in config.hin
+echo Editing config.hin...
+test -f %XSRC%/config_h.orig
+if errorlevel 1 update %XSRC%/config.hin %XSRC%/config_h.orig
+sed -f %XSRC%/djgpp/config_h.sed %XSRC%/config_h.orig > config.hin
+if errorlevel 1 goto SedError2
+mv -f config.hin %XSRC%/config.hin
+
+Rem Fixing ilicit testsuite file name.
+test -f %XSRC%/tests/c++.at
+if not errorlevel 1 mv -f %XSRC%/tests/c++.at %XSRC%/tests/cxx.at
+
+Rem Fixing the scanner files to make file names 8.3 valid.
+Rem Use only if you want to change the scan-gram.l and scan-skel.l files.
+: sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-gram.l > scan-gram.l
+: if errorlevel 1 goto ScannerFileError
+: mv ./scan-gram.l %XSRC%/src/scan-gram.l
+: sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-skel.l > scan-skel.l
+: if errorlevel 1 goto ScannerFileError
+: mv ./scan-skel.l %XSRC%/src/scan-skel.l
+
+Rem This is required because DOS/Windows are case-insensitive
+Rem to file names, and "make install" will do nothing if Make
+Rem finds a file called `install'.
+if exist INSTALL ren INSTALL INSTALL.txt
+
+Rem Set SHELL to a sane default or some configure tests stop working
+Rem if the package is configured across partitions.
+if not "%SHELL%" == "" goto HomeName
+set SHELL=/bin/sh
+if not "%SHELL%" == "/bin/sh" goto SmallEnv
+echo No SHELL found in the environment, using default value
+
+:HomeName
+Rem Set HOME to a sane default so configure stops complaining.
+if not "%HOME%" == "" goto HostName
+set HOME=%XSRC%/djgpp
+if not "%HOME%" == "%XSRC%/djgpp" goto SmallEnv
+echo No HOME found in the environment, using default value
+
+:HostName
+Rem Set HOSTNAME so it shows in config.status
+if not "%HOSTNAME%" == "" goto hostdone
+if "%windir%" == "" goto msdos
+set OS=MS-Windows
+if not "%OS%" == "MS-Windows" goto SmallEnv
+goto haveos
+:msdos
+set OS=MS-DOS
+if not "%OS%" == "MS-DOS" goto SmallEnv
+:haveos
+if not "%USERNAME%" == "" goto haveuname
+if not "%USER%" == "" goto haveuser
+echo No USERNAME and no USER found in the environment, using default values
+set HOSTNAME=Unknown PC
+if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv
+goto userdone
+:haveuser
+set HOSTNAME=%USER%'s PC
+if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv
+goto userdone
+:haveuname
+set HOSTNAME=%USERNAME%'s PC
+if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv
+:userdone
+set _HOSTNAME=%HOSTNAME%, %OS%
+if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
+set HOSTNAME=%_HOSTNAME%
+:hostdone
+set _HOSTNAME=
+set OS=
+
+Rem install-sh is required by the configure script but clashes with the
+Rem various Makefile install-foo targets, so we MUST have it before the
+Rem script runs and rename it afterwards
+test -f %XSRC%/install-sh
+if not errorlevel 1 goto NoRen0
+test -f %XSRC%/install-sh.sh
+if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh
+:NoRen0
+
+if "%NLS%" == "disabled" goto WithoutNLS
+
+:WithNLS
+Rem Check for the needed libraries and binaries.
+test -x /dev/env/DJDIR/bin/msgfmt.exe
+if errorlevel 1 goto MissingNLSTools
+test -x /dev/env/DJDIR/bin/xgettext.exe
+if errorlevel 1 goto MissingNLSTools
+test -f /dev/env/DJDIR/include/libcharset.h
+if errorlevel 1 goto MissingNLSTools
+test -f /dev/env/DJDIR/lib/libcharset.a
+if errorlevel 1 goto MissingNLSTools
+test -f /dev/env/DJDIR/include/iconv.h
+if errorlevel 1 goto MissingNLSTools
+test -f /dev/env/DJDIR/lib/libiconv.a
+if errorlevel 1 goto MissingNLSTools
+test -f /dev/env/DJDIR/include/libintl.h
+if errorlevel 1 goto MissingNLSTools
+test -f /dev/env/DJDIR/lib/libintl.a
+if errorlevel 1 goto MissingNLSTools
+
+Rem Recreate the files in the %XSRC%/po subdir with our ported tools.
+redir -e /dev/null rm %XSRC%/po/*.gmo
+redir -e /dev/null rm %XSRC%/po/bison.pot
+redir -e /dev/null rm %XSRC%/po/cat-id-tbl.c
+redir -e /dev/null rm %XSRC%/po/stamp-cat-id
+
+Rem Update the arguments file for the configure script.
+Rem We prefer without-included-gettext because libintl.a from gettext package
+Rem is the only one that is garanteed to have been ported to DJGPP.
+echo --enable-nls --without-included-gettext >> arguments
+goto ConfigurePackage
+
+:MissingNLSTools
+echo Needed libs/tools for NLS not found. Configuring without NLS.
+:WithoutNLS
+Rem Update the arguments file for the configure script.
+echo --disable-nls >> arguments
+
+:ConfigurePackage
+echo Running the ./configure script...
+sh ./configure @arguments
+if errorlevel 1 goto CfgError
+rm arguments
+echo Done.
+goto End
+
+:ScannerFileError
+echo ./scanner file editing failed!
+goto End
+
+:SedError
+echo ./configure script editing failed!
+goto End
+
+:SedError2
+echo ./config.hin editing failed!
+goto End
+
+:CfgError
+echo ./configure script exited abnormally!
+goto End
+
+:SmallEnv
+echo Your environment size is too small.  Enlarge it and run me again.
+echo Configuration NOT done!
+
+:End
+test -f %XSRC%/install-sh.sh
+if not errorlevel 1 goto NoRen1
+test -f %XSRC%/install-sh
+if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh
+:NoRen1
+if "%SHELL%" == "/bin/sh" set SHELL=
+if "%HOME%" == "%XSRC%/djgpp" set HOME=
+set ARGS=
+set CONFIG_SITE=
+set HOSTNAME=
+set NLS=
+set CACHING=
+set DEPENDENCY_TRACKING=
+set XSRC=
diff -aprNU5 bison.orig/djgpp/config.sed bison/djgpp/config.sed
--- bison.orig/djgpp/config.sed 1970-01-01 00:00:00.000000000 +0000
+++ bison/djgpp/config.sed      2005-04-24 01:56:04.000000000 +0000
@@ -0,0 +1,136 @@
+# Additional editing of Makefiles
+/(echo[        ]*':t/ a\
+# DJGPP specific Makefile changes.\
+  /^aliaspath *        *=/s,:,";",g;t t\
+  /TEXINPUTS=/s,:,";",g;t t\
+  /PATH=/s,:,";",g;t t\
+  s,\\.deps,_deps,g;t t\
+  s,\\.new\\.,_new.,g;t t\
+  s,\\.old\\.,_old.,g;t t\
+  s,c++\\.at,cxx.at,g;t t\
+  s,Makefile\\.in\\.in,Makefile.in-in,g;t t\
+  s,Makefile\\.am\\.in,Makefile.am-in,g;t t\
+  s,(MAKEINFOFLAGS),& --no-split,\
+  /^install-info-am:/,/^$/ {\
+    /@list=/ s,\\\$(INFO_DEPS),& bison.i,\
+    /@for *file/ s,\\\$(INFO_DEPS),& bison.i,\
+    s,file-\\[0-9\\]\\[0-9\\],& \\$\\$file[0-9] \\$\\$file[0-9][0-9],\
+  }\
+  /^\\.y\\.c:/,/^$/ {\
+    /\\\$(YACCCOMPILE)/ {\
+      a\\\
+       address@hidden -f y.tab.c && mv -f y.tab.c y_tab.c\\\
+       address@hidden -f y.tab.h && mv -f y.tab.h y_tab.h\
+    }\
+  }\
+/^libbison.a:/ i\\\
+\\$(top_srcdir)/djgpp/subpipe.c: \\$(top_srcdir)/djgpp/subpipe.h\\\
+subpipe.o: \\$(top_srcdir)/djgpp/subpipe.c \\$(top_srcdir)/djgpp/subpipe.h\\\
+       \\$(COMPILE) -c \\$<\
+/^yacc:/ i\\\
+yacc.bat:\\\
+       echo "bison\\$(EXEEXT) -y %1 %2 %3 %4 %5 %6 %7 %8 %9" >address@hidden
+/^bin_SCRIPTS =/s/$/ yacc.bat/\
+/^MOSTLYCLEANFILES = yacc/s/$/ yacc.bat/
+
+
+# Makefile.in.in is renamed to Makefile.in-in.
+/ac_config_files=/,/_ACEOF/ {
+  s|po/Makefile\.in|&:po/Makefile.in-in|
+}
+/CONFIG_FILES=/ s|po/Makefile\.in|&:po/Makefile.in-in|2
+
+# We always use _deps and _libs instead of .deps and .libs, because
+# the latter is an invalid name on 8+3 MS-DOS filesystem.  This makes
+# the generated Makefiles good for every DJGPP installation, not only
+# the one where the package was configured (which could happen to be
+# a Windows box, where leading dots in file names are allowed).
+s,\.deps,_deps,g
+s,\.libs,_libs,g
+/^rmdir[       ]*\.tst/ i\
+am__leading_dot=_
+
+# Replace (command) > /dev/null with `command > /dev/null`, since
+# parenthesized commands always return zero status in the ported Bash,
+# even if the named command doesn't exist
+/if ([^|;`]*null/{
+  s,(,`,
+  s,),,
+  /null[       ]*2>&1/ s,2>&1,&`,
+  /null.*null/ s,null.*null,&`,
+  /null.*null/ !{
+    /null[     ]*2>&1/ !s,null,&`,
+  }
+}
+
+# DOS-style absolute file names should be supported as well
+/\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*,
+
+# Prevent the spliting of subs.sed.
+# The sed script: subs.sed is split into 48 lines long files.
+# This will produce sed scripts called subs-$ac_sed_frag.sed, where
+# $ac_sed_frag is some unique number. This will not work if the splited
+# sed script contains a multiple line sed command at line #48. In this
+# case the first part of the multiple line sed command will be written
+# at the end of one particular subs-$ac_sed_frag.sed and the rest of the
+# sed command will be written at the begining of the next subs-$ac_sed_frag.sed
+# making both sed script useless.
+# This matches the configure script produced by Autoconf 2.57
+/ac_max_sed_lines=[0-9]/ s,=.*$,=`sed -n "$=" $tmp/subs.sed`,
+
+# The following two items are changes needed for configuring
+# and compiling across partitions.
+# 1) The given srcdir value is always translated from the
+#    "x:" syntax into "/dev/x" syntax while we run configure.
+/^[    ]*-srcdir=\*.*$/ a\
+    ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
+/set X `ls -Lt \$srcdir/ i\
+   if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
+     srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
+   fi
+
+# Autoconf 2.52e generated configure scripts
+# write absolute paths into Makefiles and bison.in
+# making them useless for DJGPP installations for
+# which the package has not been configured for.
+/MISSING=/,/^$/ {
+  /^fi$/ a\
+am_missing_run=`echo "$am_missing_run" | sed 
's%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%'`
+}
+/^install_sh=/a\
+install_sh=`echo "$install_sh" | sed 
's%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%'`
+
+# This will only work if the assumption that the
+# testsuite is ran from the following path:
+#   ${top_srcdir}/tests/testsuite.dir
+# holds. The explicit names are of no importance.
+#   ../../. == ${top_srcdir}
+/\.)[  ]*ac_abs_builddir=/,/^esac$/ {
+ /^esac$/ a\
+ac_abs_builddir=`echo "$ac_abs_builddir" | sed 
"s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%"`
+}
+/\.)[  ]*ac_abs_top_builddir=/,/^esac$/ {
+ /^esac$/ a\
+ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed 
"s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%"`
+}
+/\.)[  ]*ac_abs_srcdir=/,/^esac$/ {
+ /^esac$/ a\
+ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed 
"s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%"`
+}
+/\.)[  ]*ac_abs_top_srcdir=/,/^esac$/ {
+ /^esac$/ a\
+ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed 
"s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%"`
+}
+ 
+# Add DJGPP version information.
+/^#define VERSION/ s/\$VERSION/&  (DJGPP port (r1))/
+
+# We need makeinfo to make the html formated docs.
+/\$am_missing_run[     ]*makeinfo/ s,\$am_missing_run,,
+
+# The path to the FORTRAN compiler and libraries
+# shall contain no absolute path reference so it
+# will be good for all djgpp installations.
+/^FLIBS="\$ac_cv_flibs"/ i\
+ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS 
$as_cr_letters`\
+ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"`
diff -aprNU5 bison.orig/djgpp/config.site bison/djgpp/config.site
--- bison.orig/djgpp/config.site        1970-01-01 00:00:00.000000000 +0000
+++ bison/djgpp/config.site     2005-04-24 01:56:04.000000000 +0000
@@ -0,0 +1,56 @@
+#! /bin/sh
+
+# This is the config.site file for configuring GNU packages
+# which are to be built with DJGPP tools.
+
+# Include the djgpp subdirectory in PATH, so that getconf is found
+PATH="$srcdir/djgpp;$PATH"
+
+# These two variables are required, otherwise looking for
+# programs along the PATH will not work.
+PATH_SEPARATOR=:
+PATH_EXPAND=y
+
+# This is required in for "test -f foo" to find foo.exe
+export TEST_FINDS_EXE=y
+
+# The root of the DJGPP tree serves as the default prefix
+test "x$prefix" = xNONE && prefix='/dev/env/DJDIR'
+
+# This is required for config.status script to be run, since
+# ./configure runs it by invoking ${CONFIG_SHELL-/bin/sh}
+CONFIG_SHELL=${CONFIG_SHELL='sh'}
+
+# A sane defualt for emacs.
+ac_cv_path_EMACS=${EMACS='/dev/env/DJDIR/gnu/emacs/bin/emacs'}
+
+# These are set here so the generated Makefile's will be good
+# for every DJGPP installation, not only the one where the
+# package was configured.
+# $INSTALL must be an absolute path name, otherwise config.status
+# will try to prepend ./ and ../ to it when it goes into subdirs.
+INSTALL=${INSTALL='/dev/env/DJDIR/bin/ginstall -c'}
+RANLIB=${RANLIB='ranlib'}
+GMSGFMT=${GMSGFMT='/dev/env/DJDIR/bin/msgfmt'}
+MSGFMT=${MSGFMT='/dev/env/DJDIR/bin/msgfmt'}
+XGETTEXT=${XGETTEXT='/dev/env/DJDIR/bin/xgettext'}
+
+# A sane default for emacs.
+ac_cv_path_EMACS=${EMACS='/dev/env/DJDIR/gnu/emacs/bin/emacs'}
+
+# A sane default for m4.
+ac_cv_path_M4=${M4='/dev/env/DJDIR/bin/m4'}
+
+# These are set here so the generated libtool will be good
+# for every DJGPP installation, not only the one where the
+# package was configured.
+NM=${NM='nm'}
+LD=${LD='ld'}
+
+# Force the test for 'ln -s' to report 'cp -pf'.
+ac_cv_prog_LN_S='cp -pf'
+
+# There is no fork and vfork functionality.
+ac_cv_func_fork=no
+ac_cv_func_vfork=no
+ac_cv_func_pipe=no
diff -aprNU5 bison.orig/djgpp/config_h.sed bison/djgpp/config_h.sed
--- bison.orig/djgpp/config_h.sed       1970-01-01 00:00:00.000000000 +0000
+++ bison/djgpp/config_h.sed    2005-04-24 01:56:04.000000000 +0000
@@ -0,0 +1,15 @@
+# sed script for DJGPP specific editing of config.hin
+
+$ a\
+\
+\
+/*  DJGPP specific defines.  */\
+\
+#include <unistd.h>\
+#define TAB_EXT     ((pathconf(NULL, _PC_NAME_MAX) > 12) ? ".tab" : "_tab")\
+#define OUTPUT_EXT  ((pathconf(NULL, _PC_NAME_MAX) > 12) ? ".output" : ".out")\
+\
+#define DEFAULT_TMPDIR  "/dev/env/DJDIR/tmp"
+
+
+
diff -aprNU5 bison.orig/djgpp/readme bison/djgpp/readme
--- bison.orig/djgpp/readme     1970-01-01 00:00:00.000000000 +0000
+++ bison/djgpp/readme  2005-04-24 01:56:04.000000000 +0000
@@ -0,0 +1,142 @@
+This is a port of GNU Bison @V1@ to MSDOS/DJGPP.
+
+
+1.:     DJGPP specific changes.
+        =======================
+
+        The DJGPP port of Bison offers LFN and SFN support depending on which
+        OS it is running. If LFN support is available or not is determinated at
+        run time. If LFN support is available (DOS session under Win9X), the
+        standard posix file name extensions will be used. These are: y.tab.c,
+        y.tab.c++, y.tab.h, y.output, etc. If only SFN support is available
+        (plain DOS), then the standard MSDOS short file names will be used.
+        These are: y_tab.c, y_tab.h, y.out, etc.
+        It should be noticed that this bison version needs the m4 program as
+        back end to generate the parser file (y.tab.c etc.) from the skeleton
+        files. This implies that m4 must always be installed to get bison
+        working. m4 will use a couple of m4 scripts that will be installed in
+        /dev/env/DJDIR/share/bison and shall not be removed.
+        It should also be noticed that the skeleton files bison.simple and
+        bison.hairy are no longer supported. This applies also to the environ-
+        ment variables BISON_HAIRY and BISON_SIMPLE. Those variables are *no*
+        longer honored at all.
+        The kind of skeleton file bison.hairy is no longer supported at all.
+        The skeleton file bison.simple is now called yacc.c and is an m4 
script.
+        The other two skeleton files supported by this bison version are glr.c
+        and lalr1.cc. The first one is a generalized LR C parser based on
+        Bison's LALR(1) tables and the second one is a experimental C++ parser
+        class.
+        As has been told before, bison uses m4 to generate the parser file.
+        This is done by forking and using pipes for the IPC. MSDOS does not
+        support this functionality so this has been reproduced in the usual
+        way by redirecting stdin and stdout of bison and m4 to temporary files
+        and processing these files in sequence. All the changes to the sources
+        are documented in the djgpp/diffs file.
+
+        Please **read** the docs.
+
+
+2.:     Installing the binary package.
+        ==============================
+
+2.1.:   Copy the binary distribution into the top DJGPP installation directory,
+        just unzip it preserving the directory structure running *ONE* of the
+        following commands:
+          unzip32 address@hidden@b.zip      or
+          djtarx address@hidden@b.zip       or
+          pkunzip -d address@hidden@b.zip
+
+
+
+3.:     Building the binaries from sources.
+        ===================================
+
+3.1.:   To build the binaries you will need the following binary packages:
+          djdev203.zip (or a later but NOT a prior version)
+          bsh204b.zip  (or a later but NOT a prior version)
+          gcc342b.zip, bnu215b.zip, mak3791b.zip,
+          fil40b.zip, shl20jb.zip, txt20b.zip,
+          txi48b.zip, grep24b.zip, sed414b.zip,
+          m4-143b.zip.
+
+        If you want to run the check you will need also:
+          dif281b.zip
+
+        All this packages can be found in the v2gnu directory of any
+        delorie.com mirror.
+        You will need bsh203b.zip or later and *NOT* a prior version or
+        the build will fail. The same applies to djdev203.zip. All the
+        other packages are the ones I have used to build the binaries
+        from this source. Previuos versions of this packages may do the
+        job as well but I have not tested this.
+
+3.2.:   Create a temporary directory and copy the source package into the
+        directory. If you download the source distribution from one of the
+        DJGPP archives, just unzip it preserving the directory structure
+        running *ONE* of the following commands:
+          unzip32 address@hidden@s.zip      or
+          djtarx address@hidden@s.zip       or
+          pkunzip -d address@hidden@s.zip
+
+3.3.:   If for some reason you want to reconfigure the package cd into the top
+        srcdir (address@hidden@) and run the following commands:
+          del djgpp\config.cache
+          make clean
+          djgpp\config
+
+        Please note that you *MUST* delete the config.cache file in the djgpp
+        subdir or you will not really reconfigure the sources because the
+        configuration informations will be read from the cache file instead
+        of being newly computed.
+        To build the programs in a directory other than where the sources are,
+        you must add the parameter that specifies the source directory,
+        e.g:
+          x:address@hidden@\djgpp\config x:/src/gnu/address@hidden@
+
+        Lets assume you want to build the binaries in a directory placed on a
+        different drive (z:\build in this case) from where the sources are,
+        then you will run the following commands:
+          z:
+          md \build
+          cd \build
+          x:address@hidden@\djgpp\config x:/src/gnu/address@hidden@
+
+        The order of the options and the srcdir option does not matter. You
+        *MUST* use forward slashes to specify the source directory.
+
+        The batch file will set same environment variables, make MSDOS specific
+        modifications to the Makefile.in's and supply all other needed options
+        to the configure script.
+
+
+3.4.:   To compile the package run from the top srcdir the command:
+          make
+
+3.5.:   Now you can run the tests if you like. From the top srcdir run the
+        command:
+          make check
+
+        No test should fail.
+        Please note that the testsuite only works with LFN available. On plain
+        DOS, most of the tests will fail due to invalid DOS names.
+
+3.6.:   To install the binaries, header, library, catalogs, and info docs
+        run the following command from the top srcdir:
+          make install
+
+        This will install the products into your DJGPP installation tree given
+        by the default prefix "/dev/env/DJDIR". If you prefer to install them
+        into some other directory you will have to set prefix to the appropiate
+        value:
+          make install prefix=z:/some/other/place
+
+
+
+        Send GNU bison specific bug reports to <address@hidden>.
+        Send suggestions and bug reports concerning the DJGPP port to
+        comp.os.msdos.djgpp or <address@hidden>.
+
+
+Enjoy.
+
+        Guerrero, Juan Manuel <address@hidden>
diff -aprNU5 bison.orig/djgpp/subpipe.c bison/djgpp/subpipe.c
--- bison.orig/djgpp/subpipe.c  1970-01-01 00:00:00.000000000 +0000
+++ bison/djgpp/subpipe.c       2005-04-24 01:56:04.000000000 +0000
@@ -0,0 +1,285 @@
+/* Subprocesses with pipes.
+
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+   This program 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 2, or (at your option)
+   any later version.
+
+   This program 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, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+/* Written by Juan Manuel Guerrero <address@hidden>. */
+
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "subpipe.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <process.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "xalloc.h"
+
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+
+
+#include "error.h"
+
+#include "gettext.h"
+#define _(Msgid)  gettext (Msgid)
+
+
+/* Initialize this module. */
+
+
+static int old_stdin;
+static int old_stdout;
+static char **arguments;
+static char tmp_file_name[2][L_tmpnam];
+
+#define remove_tmp_file(fd, name)                                     \
+  do {                                                                \
+    close ((fd));                                                     \
+    if (unlink ((name)))                                              \
+      error (EXIT_FAILURE, 0, _("removing of `%s' failed"), (name));  \
+  } while (0)
+
+
+void
+init_subpipe(void)
+{
+  int fd;
+
+  strcpy(tmp_file_name[0], "/dev/env/TMPDIR/bnXXXXXX");
+  fd = mkstemp(tmp_file_name[0]);
+  if (fd < 0)
+    error(EXIT_FAILURE, 0, _("creation of a temporary file failed"));
+  close (fd);
+  
+  strcpy(tmp_file_name[1], "/dev/env/TMPDIR/bnXXXXXX");
+  fd = mkstemp(tmp_file_name[1]);
+  if (fd < 0)
+    error(EXIT_FAILURE, 0, _("creation of a temporary file failed"));
+  close (fd);
+}
+
+
+/* Create a subprocess that is run as a filter.  ARGV is the
+   NULL-terminated argument vector for the subprocess.  Store read and
+   write file descriptors for communication with the subprocess into
+   FD[0] and FD[1]: input meant for the process can be written into
+   FD[0], and output from the process can be read from FD[1].  Return
+   the subprocess id.
+
+   Because DOS has neither fork nor pipe functionality to run the subprocess
+   as a filter, the filter is reproduced using temporary files. First bison's
+   stdout is redirected to a temporary file. After bison has produced all of
+   is output, this file is closed and connected to m4's stdin. All m4's output
+   is redirected from m4's stdout to a second temporary file and reopened as
+   bison's stdin. */
+
+pid_t
+create_subpipe(char const *const *argv, int fd[2])
+{
+  int argc;
+  int from_in_fd;  /* pipe from bison to m4. */
+  pid_t pid;
+
+
+  pid = getpid();
+
+  /*
+   *  Save original stdin and stdout
+   *  for later restauration.
+   */
+  old_stdin = dup(STDIN_FILENO);
+  if (old_stdin < 0)
+    error(EXIT_FAILURE, 0, _("saving stdin failed"));
+
+  old_stdout = dup(STDOUT_FILENO);
+  if (old_stdout < 0)
+    error(EXIT_FAILURE, 0, _("saving stdout failed"));
+
+  /*
+   *  Save argv for later use.
+   */
+  for (argc = 0; argv[argc]; argc++)
+    ;
+  argc++;
+  arguments = xmalloc(argc * sizeof(arguments[0]));
+  for (argc = 0; argv[argc]; argc++)
+  {
+    arguments[argc] = xmalloc((strlen(argv[argc]) + 1) * 
sizeof(arguments[0][0]));
+    strcpy(arguments[argc], argv[argc]);
+  }
+  arguments[argc] = NULL;
+
+  /*
+   *  All bison's output will be gathered in this temporary file
+   *  and will be redirected to m4's stdin.
+   */
+  from_in_fd = open(tmp_file_name[0], O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR);
+  if (from_in_fd < 0)
+    error(EXIT_FAILURE, 0, _("opening of tmpfile failed"));
+  if (dup2(from_in_fd, STDOUT_FILENO) < 0)
+  {
+    remove_tmp_file(from_in_fd, tmp_file_name[0]);
+    error(EXIT_FAILURE, 0, _("redirecting bison's stdout to the temporary file 
failed"));
+  }
+  close(from_in_fd);
+
+
+  fd[0] = STDOUT_FILENO;
+  return pid;
+}
+
+
+/* A signal handler that just records that a signal has happened. */
+static int child_interrupted;
+
+static void
+signal_catcher(int signo)
+{
+  child_interrupted++;
+}
+
+
+void
+end_of_output_subpipe(pid_t pid, int fd[2])
+{
+  char *program;
+  int from_out_fd = open(tmp_file_name[0], O_RDONLY, S_IRUSR);                 
  /* pipe from bison to m4. */
+  int to_in_fd = open(tmp_file_name[1], O_WRONLY | O_CREAT | O_TRUNC, 
S_IWUSR);  /* pipe from m4 to bison. */
+  int status;
+  void (*previous_handler)(int);
+
+
+  program = strrchr(arguments[0], '/');
+  if (program)
+    program++;
+  else
+    program = arguments[0];
+
+  /*
+   *  Redirect bison's output to m4's stdin.
+   */
+  if (from_out_fd < 0)
+    error(EXIT_FAILURE, 0, _("opening of tmpfile failed"));
+  if (dup2(from_out_fd, STDIN_FILENO) < 0)
+  {
+    remove_tmp_file(from_out_fd, tmp_file_name[0]);
+    error(EXIT_FAILURE, 0, _("redirecting m4's stdin from the temporary file 
failed"));
+  }
+  close(from_out_fd);
+
+  /*
+   *  All m4's output will be gathered in this temporary file
+   *  and will be redirected to bison's stdin.
+   */
+  if (to_in_fd < 0)
+  {
+    remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
+    error(EXIT_FAILURE, 0, _("opening of a temporary file failed"));
+  }
+  if (dup2(to_in_fd, STDOUT_FILENO) < 0)
+  {
+    remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
+    remove_tmp_file(to_in_fd, tmp_file_name[1]);
+    error(EXIT_FAILURE, 0, _("redirecting m4's stdout to a temporary file 
failed"));
+  }
+  close(to_in_fd);
+
+  /*
+   *  Run m4.
+   */
+  child_interrupted = 0;
+  errno = 0;
+  previous_handler = signal(SIGINT, signal_catcher);
+  status = spawnvp(P_WAIT, program, arguments);
+  signal(SIGINT, previous_handler);
+  if (child_interrupted)
+  {
+    remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
+    remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]);
+    error(EXIT_FAILURE, 0, _("subsidiary program `%s' interrupted"), program);
+  }
+  if (status)
+  {
+    remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
+    remove_tmp_file(STDOUT_FILENO, tmp_file_name[1]);
+    error(EXIT_FAILURE, 0, _(errno == ENOENT
+                             ? "subsidiary program `%s' not found"
+                             : status < 1
+                             ? "subsidiary program `%s' failed"
+                             : "subsidiary program `%s' failed (status=%i, 
errno=%i)"), program, status, errno);
+  }
+
+
+  /*
+   *  Redirect m4's output to bison's stdin.
+   */
+  if (dup2(old_stdout, STDOUT_FILENO) < 0)
+    error(EXIT_FAILURE, 0, "restore of bison's stdout failed");
+  close(old_stdout);
+  to_in_fd = open(tmp_file_name[1], O_RDONLY, S_IRUSR);  /* pipe from m4 to 
bison. */
+  if (to_in_fd < 0)
+  {
+    remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
+    error(EXIT_FAILURE, 0, _("opening of tmpfile failed"));
+  }
+  if (dup2(to_in_fd, STDIN_FILENO) < 0)
+  {
+    remove_tmp_file(STDIN_FILENO, tmp_file_name[0]);
+    remove_tmp_file(to_in_fd, tmp_file_name[1]);
+    error(EXIT_FAILURE, -1, "dup2");
+    error(EXIT_FAILURE, 0, _("redirecting bison's stdin from the temporary 
file failed"));
+  }
+  close(to_in_fd);
+
+
+  fd[1] = STDIN_FILENO;
+}
+
+
+/* Free resources, unlink temporary files and restore stdin and stdout. */
+
+void
+reap_subpipe(pid_t pid, char const *program)
+{
+  int argc;
+
+  for (argc = 0; arguments[argc]; argc++)
+    free(arguments[argc]);
+  free(arguments);
+
+  if (unlink(tmp_file_name[0]))
+    error(EXIT_FAILURE, 0, _("removing of `%s' failed"), tmp_file_name[0]);
+  if (unlink(tmp_file_name[1]))
+    error(EXIT_FAILURE, 0, _("removing of `%s' failed"), tmp_file_name[1]);
+
+  if (dup2(old_stdin, STDIN_FILENO) < 0)
+    error(EXIT_FAILURE, 0, "restore of bison's stdin failed");
+  close(old_stdin);
+}
diff -aprNU5 bison.orig/djgpp/subpipe.h bison/djgpp/subpipe.h
--- bison.orig/djgpp/subpipe.h  1970-01-01 00:00:00.000000000 +0000
+++ bison/djgpp/subpipe.h       2005-04-24 01:56:04.000000000 +0000
@@ -0,0 +1,30 @@
+/* Subprocesses with pipes.
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+   This file is part of Bison, the GNU Compiler Compiler.
+
+   Bison 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 2, or (at your option)
+   any later version.
+
+   Bison 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 Bison; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+/* Written by Juan Manuel Guerrero <address@hidden>. */
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+void init_subpipe(void);
+pid_t create_subpipe(char const * const *, int[2]);
+void end_of_output_subpipe(pid_t, int[2]);
+void reap_subpipe(pid_t, char const *);
diff -aprNU5 bison.orig/lib/subpipe.c bison/lib/subpipe.c
--- bison.orig/lib/subpipe.c    2004-04-28 06:30:04.000000000 +0000
+++ bison/lib/subpipe.c 2005-04-24 01:56:04.000000000 +0000
@@ -176,5 +176,10 @@ reap_subpipe (pid_t pid, char const *pro
                 : "subsidiary program `%s' failed (exit status %d)"),
               program, status);
     }
 #endif
 }
+
+void
+end_of_output_subpipe (pid_t pid, int fd[2])
+{
+}
diff -aprNU5 bison.orig/lib/subpipe.h bison/lib/subpipe.h
--- bison.orig/lib/subpipe.h    2004-04-28 06:30:04.000000000 +0000
+++ bison/lib/subpipe.h 2005-04-24 01:56:04.000000000 +0000
@@ -25,6 +25,7 @@
 # include <sys/types.h>
 #endif
 
 void init_subpipe (void);
 pid_t create_subpipe (char const * const *, int[2]);
+void end_of_output_subpipe (pid_t, int[2]);
 void reap_subpipe (pid_t, char const *);
diff -aprNU5 bison.orig/news bison/news
--- bison.orig/news     2005-04-17 08:07:14.000000000 +0000
+++ bison/news  2005-04-24 01:55:10.000000000 +0000
@@ -11,10 +11,12 @@ Changes in version 2.0a, ????-??-??:
   quote the literal strings associated with tokens.  For example, for
   a syntax error associated with '%token NUM "number"' they might
   print 'syntax error, unexpected number' instead of 'syntax error,
   unexpected "number"'.
 
+* DJGPP support added.
+
 Changes in version 2.0, 2004-12-25:
 
 * Possibly-incompatible changes
 
   - Bison-generated parsers no longer default to using the alloca function
diff -aprNU5 bison.orig/src/output.c bison/src/output.c
--- bison.orig/src/output.c     2005-04-17 08:07:14.000000000 +0000
+++ bison/src/output.c  2005-04-24 01:56:04.000000000 +0000
@@ -578,10 +578,11 @@ output_skeleton (void)
   fputs ("m4_divert_push(0)dnl\n", out);
   xfclose (out);
 
   /* Read and process m4's output.  */
   timevar_push (TV_M4);
+  end_of_output_subpipe (pid, filter_fd);
   in = fdopen (filter_fd[1], "r");
   if (! in)
     error (EXIT_FAILURE, get_errno (), "fdopen");
   scan_skel (in);
   xfclose (in);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]