summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorwlemb <wlemb>2003-12-30 06:31:35 +0000
committerwlemb <wlemb>2003-12-30 06:31:35 +0000
commit6c33fe612137b315457cb24f63b37054b58359ca (patch)
treeeaf2ae671767d31f9e9416f9a9302b2d3fa104cf /src/include
parente5e6dbda86fdfc7ef8b4c6eee598355526910766 (diff)
downloadgroff-6c33fe612137b315457cb24f63b37054b58359ca.tar.gz
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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/config.hin6
-rw-r--r--src/include/nonposix.h12
2 files changed, 17 insertions, 1 deletions
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)