diff options
-rw-r--r-- | ChangeLog | 25 | ||||
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | contrib/mom/Makefile.sub | 2 | ||||
-rw-r--r-- | doc/Makefile.sub | 2 | ||||
-rw-r--r-- | src/include/config.hin | 6 | ||||
-rw-r--r-- | src/include/nonposix.h | 12 | ||||
-rw-r--r-- | src/roff/troff/node.cpp | 2 | ||||
-rw-r--r-- | src/utils/lookbib/lookbib.cpp | 4 | ||||
-rw-r--r-- | test-groff.in (renamed from test-groff) | 36 |
10 files changed, 76 insertions, 24 deletions
@@ -1,3 +1,28 @@ +2003-12-29 Werner LEMBERG <wl@gnu.org> + + More fixes for MSVC compiler. + + * doc/Makefile.sub, contrib/mom/Makefile.sub (GROFF_BIN_PATH): Use + $(SEP). + + * src/include/nonposix.h (STDIN_FILENO, STDOUT_FILENO, + STDERR_FILENO) [_MSC_VER]: Define conditionally. + (getpid) [_MSC_VER]: Remove. + Include direct.h and process.h conditionally. + + * src/roff/troff/node.cpp (suppress_node::tprint): Don't use + parentheses for a_delete. + + * src/utils/lookbib/lookbib.cpp: Include nonposix.h. + + * test-groff: Replaced with... + * test-groff.in: This new template to handle path separator + properly. + + * configure.ac: Check for direct.h and process.h. + Generate test-groff script. + * configure, src/include/config.hin: Regenerated. + 2003-12-28 Werner LEMBERG <wl@gnu.org> Add integral extension glyph. @@ -3864,8 +3864,10 @@ done + + for ac_header in stdlib.h unistd.h dirent.h limits.h sys/dir.h \ - string.h strings.h math.h sys/time.h + string.h strings.h math.h sys/time.h direct.h process.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -7958,6 +7960,8 @@ echo "${ECHO_T}no" >&6 ac_config_files="$ac_config_files Makefile doc/Makefile src/xditview/Imakefile" + ac_config_files="$ac_config_files test-groff" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -8487,6 +8491,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/xditview/Imakefile" ) CONFIG_FILES="$CONFIG_FILES src/xditview/Imakefile" ;; + "test-groff" ) CONFIG_FILES="$CONFIG_FILES test-groff" ;; "src/include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/config.h:src/include/config.hin" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -8859,6 +8864,7 @@ s,@INSTALL@,$ac_INSTALL,;t t # Run the commands associated with the file. case $ac_file in stamp-h ) echo timestamp > stamp-h ;; + test-groff ) chmod +x test-groff ;; esac done _ACEOF diff --git a/configure.ac b/configure.ac index 8fc78f4d..f3a69326 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_SUBST([SH_SCRIPT_SED_CMD]) # checks for headers AC_CHECK_HEADERS([stdlib.h unistd.h dirent.h limits.h sys/dir.h \ - string.h strings.h math.h sys/time.h]) + string.h strings.h math.h sys/time.h direct.h process.h]) GROFF_ISC_SYSV3 GROFF_POSIX @@ -93,6 +93,7 @@ GROFF_PNMTOPS_NOSETPAGE AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) AC_CONFIG_FILES([Makefile doc/Makefile src/xditview/Imakefile]) +AC_CONFIG_FILES([test-groff], [chmod +x test-groff]) AC_OUTPUT AC_MSG_NOTICE([ diff --git a/contrib/mom/Makefile.sub b/contrib/mom/Makefile.sub index 88c0cac8..c8653930 100644 --- a/contrib/mom/Makefile.sub +++ b/contrib/mom/Makefile.sub @@ -19,7 +19,7 @@ # These may be overridden if cross-compiling. GROFFBIN=$(top_builddir)/src/roff/groff/groff -GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'` +GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|$(SEP)|g'` groff_bin_dirs=\ $(top_builddir)/src/roff/groff \ diff --git a/doc/Makefile.sub b/doc/Makefile.sub index e97d0cc0..b57fc8e0 100644 --- a/doc/Makefile.sub +++ b/doc/Makefile.sub @@ -19,7 +19,7 @@ # These may be overridden if cross-compiling. GROFFBIN=$(top_builddir)/src/roff/groff/groff -GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'` +GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|$(SEP)|g'` # Since info files are distributed within the groff package, no # autoconf test for the makeinfo binary is done. diff --git a/src/include/config.hin b/src/include/config.hin index dff8af90..20b305ba 100644 --- a/src/include/config.hin +++ b/src/include/config.hin @@ -16,6 +16,9 @@ don't. */ #undef HAVE_DECL_SYS_SIGLIST +/* Define to 1 if you have the <direct.h> header file. */ +#undef HAVE_DIRECT_H + /* Define to 1 if you have the <dirent.h> header file. */ #undef HAVE_DIRENT_H @@ -55,6 +58,9 @@ /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define to 1 if you have the <process.h> header file. */ +#undef HAVE_PROCESS_H + /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV diff --git a/src/include/nonposix.h b/src/include/nonposix.h index 86167357..a9e78cc4 100644 --- a/src/include/nonposix.h +++ b/src/include/nonposix.h @@ -36,13 +36,23 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # ifdef HAVE_UNISTD_H # include <unistd.h> # endif +# ifndef STDIN_FILENO +# define STDIN_FILENO 0 +# define STDOUT_FILENO 1 +# define STDERR_FILENO 2 +# endif +# ifdef HAVE_DIRECT_H +# include <direct.h> +# endif +# ifdef HAVE_PROCESS_H +# include <process.h> +# endif # if defined(_MSC_VER) || defined(__MINGW32__) # define POPEN_RT "rt" # define POPEN_WT "wt" # define popen(c,m) _popen(c,m) # define pclose(p) _pclose(p) # define pipe(pfd) _pipe((pfd),0,_O_BINARY|_O_NOINHERIT) -# define getpid() (1) # define mkdir(p,m) _mkdir(p) # define setmode(f,m) _setmode(f,m) # define WAIT(s,p,m) _cwait(s,p,m) diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp index 20be65d4..fd6f73b1 100644 --- a/src/roff/troff/node.cpp +++ b/src/roff/troff/node.cpp @@ -3765,7 +3765,7 @@ void suppress_node::tprint(troff_output_file *out) const char *tem = last_image_filename; last_image_filename = strsave(filename.contents()); if (tem) - a_delete(tem); + a_delete tem; last_image_id = image_id; // printf("start of image and page = %d\n", current_page); } diff --git a/src/utils/lookbib/lookbib.cpp b/src/utils/lookbib/lookbib.cpp index 65e89bcf..32a6344b 100644 --- a/src/utils/lookbib/lookbib.cpp +++ b/src/utils/lookbib/lookbib.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -33,6 +34,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* for isatty() */ #include "posix.h" +#include "nonposix.h" extern "C" { const char *Version_string; diff --git a/test-groff b/test-groff.in index cceecee5..9840cd5e 100644 --- a/test-groff +++ b/test-groff.in @@ -2,31 +2,33 @@ # This script runs groff without requiring that it be installed. # The current directory must be the top build directory. +SEP=@PATH_SEPARATOR@ +EXEEXT=@EXEEXT@ builddir=./src srcdir=`echo $0 | sed -e 's;/[^/]*$;;'` if test ! -d $builddir/roff/groff || \ - test ! -r $builddir/roff/groff/groff; then + test ! -r $builddir/roff/groff/groff$EXEEXT; then echo $0 must be run with the top build directory as the current directory 2>&1 exit 1 fi GROFF_BIN_PATH=\ -$builddir/roff/groff:\ -$builddir/roff/troff:\ -$builddir/preproc/pic:\ -$builddir/preproc/eqn:\ -$builddir/preproc/tbl:\ -$builddir/preproc/grn:\ -$builddir/preproc/refer:\ -$builddir/preproc/soelim:\ -$builddir/preproc/html:\ -$builddir/devices/grops:\ -$builddir/devices/grodvi:\ -$builddir/devices/grotty:\ -$builddir/devices/grolj4:\ -$builddir/devices/grolbp:\ -$builddir/devices/grohtml:\ +$builddir/roff/groff$SEP\ +$builddir/roff/troff$SEP\ +$builddir/preproc/pic$SEP\ +$builddir/preproc/eqn$SEP\ +$builddir/preproc/tbl$SEP\ +$builddir/preproc/grn$SEP\ +$builddir/preproc/refer$SEP\ +$builddir/preproc/soelim$SEP\ +$builddir/preproc/html$SEP\ +$builddir/devices/grops$SEP\ +$builddir/devices/grodvi$SEP\ +$builddir/devices/grotty$SEP\ +$builddir/devices/grolj4$SEP\ +$builddir/devices/grolbp$SEP\ +$builddir/devices/grohtml$SEP\ $srcdir/$builddir/xditview test -n "$srcdir" || srcdir=. @@ -35,7 +37,7 @@ XENVIRONMENT=`cd $srcdir; pwd`/src/xditview/GXditview.ad export XENVIRONMENT GROFF_COMMAND_PREFIX= -GROFF_FONT_PATH=$builddir/../font:$srcdir/font +GROFF_FONT_PATH=$builddir/../font$SEP$srcdir/font GROFF_TMAC_PATH=$srcdir/tmac export GROFF_BIN_PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH |