Source-Changes-HG archive

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

[src/trunk]: src/dist/pdisk fix nits to compile and function on osX



details:   https://anonhg.NetBSD.org/src/rev/e0e7fcf4269f
branches:  trunk
changeset: 546258:e0e7fcf4269f
user:      dbj <dbj%NetBSD.org@localhost>
date:      Thu Apr 24 03:38:53 2003 +0000

description:
fix nits to compile and function on osX

diffstat:

 dist/pdisk/dump.c       |  4 ++--
 dist/pdisk/file_media.c |  2 +-
 dist/pdisk/makefile     |  2 +-
 dist/pdisk/pdisk.c      |  6 +++++-
 4 files changed, 9 insertions(+), 5 deletions(-)

diffs (68 lines):

diff -r d3cb9d360f04 -r e0e7fcf4269f dist/pdisk/dump.c
--- a/dist/pdisk/dump.c Thu Apr 24 03:34:34 2003 +0000
+++ b/dist/pdisk/dump.c Thu Apr 24 03:38:53 2003 +0000
@@ -272,7 +272,7 @@
     int driver;
     // int kind;
     char *buf;
-#if 0 || defined(__NetBSD__)
+#if 1
     BZB *bp;
 #endif
 
@@ -337,7 +337,7 @@
        printf(" (%#5.1f%c)", bytes, j);
     }
 
-#if 0 || defined(__NetBSD__)
+#if 1
     // Old A/UX fields that no one pays attention to anymore.
     bp = (BZB *) (p->dpme_bzb);
     j = -1;
diff -r d3cb9d360f04 -r e0e7fcf4269f dist/pdisk/file_media.c
--- a/dist/pdisk/file_media.c   Thu Apr 24 03:34:34 2003 +0000
+++ b/dist/pdisk/file_media.c   Thu Apr 24 03:38:53 2003 +0000
@@ -60,7 +60,7 @@
 #ifdef __linux__
 #define LOFF_MAX 9223372036854775807LL
 extern __loff_t llseek __P ((int __fd, __loff_t __offset, int __whence));
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__APPLE__)
 #define loff_t off_t
 #define llseek lseek
 #define LOFF_MAX LLONG_MAX
diff -r d3cb9d360f04 -r e0e7fcf4269f dist/pdisk/makefile
--- a/dist/pdisk/makefile       Thu Apr 24 03:34:34 2003 +0000
+++ b/dist/pdisk/makefile       Thu Apr 24 03:38:53 2003 +0000
@@ -129,7 +129,7 @@
        pdisk_68k.hqx
 
 
-CFLAGS = -Wall
+CFLAGS = -Wall -D__unix__
 DIST_TAR_FLAGS = cvf
 
 
diff -r d3cb9d360f04 -r e0e7fcf4269f dist/pdisk/pdisk.c
--- a/dist/pdisk/pdisk.c        Thu Apr 24 03:34:34 2003 +0000
+++ b/dist/pdisk/pdisk.c        Thu Apr 24 03:38:53 2003 +0000
@@ -30,7 +30,7 @@
 // for printf()
 #include <stdio.h>
 
-#if defined(__linux__) || defined(__NetBSD__)
+#if defined(__linux__)
 #include <getopt.h>
 #endif
 #ifdef __linux__
@@ -44,6 +44,10 @@
 #endif
 #endif
 
+#ifdef __unix__
+#include <unistd.h>
+#endif
+
 // for strncpy() & strlen()
 #include <string.h>
 // for O_RDONLY



Home | Main Index | Thread Index | Old Index