summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2002-08-24 07:07:24 +0000
committerwlemb <wlemb>2002-08-24 07:07:24 +0000
commit9e4b02ecac4533b349215f78412aca7b6a044018 (patch)
tree273e7789ff61f8e5e82d3c01a12094ff3b999f8f
parent7e8b271a03212d4ae0cc3b25c6bc956b82afd8eb (diff)
downloadgroff-9e4b02ecac4533b349215f78412aca7b6a044018.tar.gz
* src/include/nonposix.h (mkdir, WAIT, creat) [_MSC_VER]: Define.
(WAIT, _WAIT_CHILD) [!_MSC_VER]: Define. * src/preproc/html/pre-html.cc (waitForChild): Use WAIT. * src/preproc/html/pushback.cc: Include nonposix.h. * src/roff/groff/pipeline.c: Define strcasecmp and strncasecmp conditionally.
-rw-r--r--ChangeLog9
-rw-r--r--src/include/nonposix.h19
-rw-r--r--src/preproc/html/pre-html.cc2
-rw-r--r--src/preproc/html/pushback.cc1
-rw-r--r--src/roff/groff/pipeline.c8
5 files changed, 33 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 867c1ed5..d449a235 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-24 Werner LEMBERG <wl@gnu.org>
+
+ * src/include/nonposix.h (mkdir, WAIT, creat) [_MSC_VER]: Define.
+ (WAIT, _WAIT_CHILD) [!_MSC_VER]: Define.
+ * src/preproc/html/pre-html.cc (waitForChild): Use WAIT.
+ * src/preproc/html/pushback.cc: Include nonposix.h.
+ * src/roff/groff/pipeline.c: Define strcasecmp and strncasecmp
+ conditionally.
+
2002-08-23 Werner LEMBERG <wl@gnu.org>
Use $(OBJEXT) for the object file extension.
diff --git a/src/include/nonposix.h b/src/include/nonposix.h
index 8180b672..86aa2e0e 100644
--- a/src/include/nonposix.h
+++ b/src/include/nonposix.h
@@ -24,7 +24,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# ifndef _WIN32
# define _WIN32
# endif
-# define setmode(f,m) _setmode(f,m)
#endif
#if defined(__MSDOS__) \
@@ -37,17 +36,21 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
-# define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0)
-# define FOPEN_RB "rb"
-# define FOPEN_WB "wb"
-# define FOPEN_RWB "wb+"
# ifdef _MSC_VER
# define POPEN_RT "rt"
# define POPEN_WT "wt"
# define popen(c,m) _popen(c,m)
# define pclose(p) _pclose(p)
# 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)
+# define creat(p,m) _creat(p,m)
# endif
+# define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0)
+# define FOPEN_RB "rb"
+# define FOPEN_WB "wb"
+# define FOPEN_RWB "wb+"
# ifndef O_BINARY
# ifdef _O_BINARY
# define O_BINARY (_O_BINARY)
@@ -138,3 +141,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GS_NAME
# define GS_NAME "gs"
#endif
+#ifndef WAIT
+# define WAIT(s,p,m) wait(s)
+#endif
+#ifndef _WAIT_CHILD
+# define _WAIT_CHILD 0
+#endif
diff --git a/src/preproc/html/pre-html.cc b/src/preproc/html/pre-html.cc
index 41ec8997..52d81f29 100644
--- a/src/preproc/html/pre-html.cc
+++ b/src/preproc/html/pre-html.cc
@@ -1073,7 +1073,7 @@ static void waitForChild (PID_T pid)
PID_T waitpd;
int status;
- waitpd = wait(&status);
+ waitpd = WAIT(&status, pid, _WAIT_CHILD);
if (waitpd != pid)
sys_fatal("wait");
}
diff --git a/src/preproc/html/pushback.cc b/src/preproc/html/pushback.cc
index 143392fa..d18c5e2e 100644
--- a/src/preproc/html/pushback.cc
+++ b/src/preproc/html/pushback.cc
@@ -29,6 +29,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "error.h"
#include "stringclass.h"
#include "posix.h"
+#include "nonposix.h"
#include <errno.h>
#include <sys/types.h>
diff --git a/src/roff/groff/pipeline.c b/src/roff/groff/pipeline.c
index 96f61db2..59480dda 100644
--- a/src/roff/groff/pipeline.c
+++ b/src/roff/groff/pipeline.c
@@ -36,6 +36,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern char *strerror();
#endif
+#ifndef HAVE_STRCASECMP
+#define strcasecmp(a,b) strcmp((a),(b))
+#endif
+
+#ifndef HAVE_STRNCASECMP
+#define strncasecmp(a,b,c) strncmp((a),(b),(c))
+#endif
+
#ifdef _POSIX_VERSION
#include <sys/wait.h>