Tom Briggs wrote:
>> The real mystery is why differing values of _HAVE_UNISTD_H should be
>> generated for the config.h files in wv and psiconv. Since it's the
>> same system, maybe one of the configure scripts has a bug.
Are you sure we have do have different values?
It may be just that wv checks for unistd.h but includes it sometimes
irrespective of the configuration... (I'm attaching a patch against
wvWare's wv that corrects this.)
Regards, Frank
<[EMAIL PROTECTED]>
Francis James Franklin
[EMAIL PROTECTED]
Diodorus the professor of logic died of shame because he could not at once
solve a problem put to him in jest by Stilpo.
--- Pliny the Elder
diff -Naur wv.orig/getopt.c wv/getopt.c
--- wv.orig/getopt.c Sat Sep 2 21:04:10 2000
+++ wv/getopt.c Thu Jan 25 08:54:42 2001
@@ -70,7 +70,9 @@
/* Don't include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#endif /* GNU C library. */
#ifdef VMS
diff -Naur wv.orig/gtk/tester.c wv/gtk/tester.c
--- wv.orig/gtk/tester.c Fri Dec 8 06:01:22 2000
+++ wv/gtk/tester.c Thu Jan 25 08:59:06 2001
@@ -5,7 +5,9 @@
#include <gnome.h>
#include <gtk/gtk.h>
#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <limits.h>
#ifndef MAXPATH
diff -Naur wv.orig/magick/magick.h wv/magick/magick.h
--- wv.orig/magick/magick.h Sat Sep 2 21:04:34 2000
+++ wv/magick/magick.h Thu Jan 25 09:01:08 2001
@@ -4,6 +4,10 @@
#ifndef _MAGICK_H
#define _MAGICK_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#if defined(sun)
#define __EXTENSIONS__ 1
#endif
@@ -33,7 +37,9 @@
#if defined(_VISUALC_)
#include <direct.h>
#else
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#endif
#include <ctype.h>
#include <signal.h>
diff -Naur wv.orig/wvConvert.c wv/wvConvert.c
--- wv.orig/wvConvert.c Fri Dec 8 06:01:20 2000
+++ wv/wvConvert.c Thu Jan 25 08:55:31 2001
@@ -1,11 +1,10 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-/* already done in wv.h
- #include "config.h"
-*/
#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
#endif
#include "wv.h"
#include "getopt.h"
diff -Naur wv.orig/wvRTF.c wv/wvRTF.c
--- wv.orig/wvRTF.c Wed Dec 27 18:48:33 2000
+++ wv/wvRTF.c Thu Jan 25 08:56:46 2001
@@ -1,13 +1,15 @@
-#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <time.h>
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
#include "getopt.h"
#include "wv.h"
diff -Naur wv.orig/wvWare.c wv/wvWare.c
--- wv.orig/wvWare.c Thu Dec 28 16:50:53 2000
+++ wv/wvWare.c Thu Jan 25 08:57:39 2001
@@ -1,10 +1,12 @@
-#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#ifdef HAVE_CONFIG_H
-#include "config.h"
#endif
#include "wv.h"
#include "getopt.h"