Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ekermit/dist Make ekermit compile on NetBSD:



details:   https://anonhg.NetBSD.org/src/rev/03fb1b8c6c1c
branches:  trunk
changeset: 798089:03fb1b8c6c1c
user:      apb <apb%NetBSD.org@localhost>
date:      Fri Aug 08 19:29:34 2014 +0000

description:
Make ekermit compile on NetBSD:

* Add several #includes of standard headers in platform.h.
* #undef X_OK in platform.h.  It's defined in the standard <access.h>,
  but also used in the local "kermit.h" for a differentpurpose.
* Declare {struct k_data}.dbf as a function returning void, not int,
  to match the way it's used.

diffstat:

 external/bsd/ekermit/dist/kermit.h   |  2 +-
 external/bsd/ekermit/dist/platform.h |  6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r d2daad1020e8 -r 03fb1b8c6c1c external/bsd/ekermit/dist/kermit.h
--- a/external/bsd/ekermit/dist/kermit.h        Fri Aug 08 19:20:39 2014 +0000
+++ b/external/bsd/ekermit/dist/kermit.h        Fri Aug 08 19:29:34 2014 +0000
@@ -383,7 +383,7 @@
     int (*readf)(struct k_data *);              /* read-file function  */
     int (*writef)(struct k_data *,UCHAR *, int); /* write-file function */
     int (*closef)(struct k_data *,UCHAR,int);    /* close-file function */
-    int (*dbf)(int,UCHAR *,UCHAR *,long);  /* debug function */
+    void (*dbf)(int,UCHAR *,UCHAR *,long);  /* debug function */
     UCHAR * zinbuf;                    /* Input file buffer itself */
     int zincnt;                                /* Input buffer position */
     int zinlen;                                /* Length of input file buffer */
diff -r d2daad1020e8 -r 03fb1b8c6c1c external/bsd/ekermit/dist/platform.h
--- a/external/bsd/ekermit/dist/platform.h      Fri Aug 08 19:20:39 2014 +0000
+++ b/external/bsd/ekermit/dist/platform.h      Fri Aug 08 19:29:34 2014 +0000
@@ -1,8 +1,14 @@
 /* Unix platform.h for EK */
 
+#include <ctype.h>
+#include <errno.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include <sys/stat.h>
 
+#undef X_OK    /* namespace collision between kermit.h and unistd.h */
+
 #ifndef IBUFLEN
 #define IBUFLEN  4096                  /* File input buffer size */
 #endif /* IBUFLEN */



Home | Main Index | Thread Index | Old Index