summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwlemb <wlemb>2003-01-28 08:29:26 +0000
committerwlemb <wlemb>2003-01-28 08:29:26 +0000
commit61db599eb999f38f54c3e5f260b9d8437f393ae5 (patch)
tree5b358b7743007fa42948c5b3c264588cd0a2fd31 /src
parent0354cdb0e9405e4087f496294a857111cb19d330 (diff)
downloadgroff-61db599eb999f38f54c3e5f260b9d8437f393ae5.tar.gz
* src/utils/indxbib/indxbib.cc (main) [__EMX__]: Check with
`access' before calling `unlink'. (do_file): Handle __EMX__. * src/include/nonposix.h: Handle __EMX__. * Makefile.in (SEP): New variable; set to @PATH_SEPARATOR@. (fontpath,tmacpath): Use it. * src/preproc/eqn/neqn.sh, src/roff/nroff/nroff.sh: Use @PATH_SEPARATOR@.
Diffstat (limited to 'src')
-rw-r--r--src/include/nonposix.h14
-rw-r--r--src/preproc/eqn/neqn.sh2
-rw-r--r--src/roff/nroff/nroff.sh2
-rw-r--r--src/utils/indxbib/indxbib.cc5
4 files changed, 14 insertions, 9 deletions
diff --git a/src/include/nonposix.h b/src/include/nonposix.h
index 86aa2e0e..88a1a214 100644
--- a/src/include/nonposix.h
+++ b/src/include/nonposix.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Eli Zaretskii (eliz@is.elta.co.il)
This file is part of groff.
@@ -26,7 +26,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# endif
#endif
-#if defined(__MSDOS__) \
+#if defined(__MSDOS__) || defined(__EMX__) \
|| (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__))
/* Binary I/O nuisances. Note: "setmode" is right for DJGPP and
@@ -60,9 +60,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* The system shell. Groff assumes a Unixy shell, but non-Posix
systems don't have standard places where it lives, and might not
have it installed to begin with. We want to give them some leeway. */
-# define BSHELL (system_shell_name())
-# define BSHELL_DASH_C (system_shell_dash_c())
-# define IS_BSHELL(s) (is_system_shell(s))
+# ifdef __EMX__
+# define getcwd(b,s) _getcwd2(b,s)
+# else
+# define BSHELL (system_shell_name())
+# define BSHELL_DASH_C (system_shell_dash_c())
+# define IS_BSHELL(s) (is_system_shell(s))
+# endif
/* The separator for directories in PATH and other environment
variables. */
diff --git a/src/preproc/eqn/neqn.sh b/src/preproc/eqn/neqn.sh
index 08346b05..1090b652 100644
--- a/src/preproc/eqn/neqn.sh
+++ b/src/preproc/eqn/neqn.sh
@@ -3,7 +3,7 @@
# GNU eqn with groff -Tascii|-Tlatin1|-Tutf8|-Tcp1047 is supported.
: ${GROFF_BIN_PATH=@BINDIR@}
-PATH=$GROFF_BIN_PATH:$PATH
+PATH=$GROFF_BIN_PATH@PATH_SEPARATOR@$PATH
export PATH
exec @g@eqn -Tascii ${1+"$@"}
diff --git a/src/roff/nroff/nroff.sh b/src/roff/nroff/nroff.sh
index 2d0628f0..03ff4666 100644
--- a/src/roff/nroff/nroff.sh
+++ b/src/roff/nroff/nroff.sh
@@ -86,6 +86,6 @@ done
: ${GROFF_BIN_PATH=@BINDIR@}
export GROFF_BIN_PATH
-PATH=$GROFF_BIN_PATH:$PATH groff -mtty-char $T $opts ${1+"$@"}
+PATH=$GROFF_BIN_PATH@PATH_SEPARATOR@$PATH groff -mtty-char $T $opts ${1+"$@"}
# eof
diff --git a/src/utils/indxbib/indxbib.cc b/src/utils/indxbib/indxbib.cc
index bd10772c..5c8651a4 100644
--- a/src/utils/indxbib/indxbib.cc
+++ b/src/utils/indxbib/indxbib.cc
@@ -287,7 +287,8 @@ int main(int argc, char **argv)
strcat(index_file, INDEX_SUFFIX);
#ifdef HAVE_RENAME
#ifdef __EMX__
- unlink(index_file);
+ if (access(index_file, R_OK) == 0)
+ unlink(index_file);
#endif /* __EMX__ */
if (rename(temp_index_file, index_file) < 0) {
#ifdef __MSDOS__
@@ -494,7 +495,7 @@ static int do_file(const char *filename)
else
ungetc(peek, fp);
}
-#if defined(__MSDOS__) || defined(_MSC_VER)
+#if defined(__MSDOS__) || defined(_MSC_VER) || defined(__EMX__)
else if (c == 0x1a) // ^Z means EOF in text files
break;
#endif