aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/mk
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-02 17:34:15 +0000
committerrsc <devnull@localhost>2004-03-02 17:34:15 +0000
commit8f314994dbcc11b2d8397535ce8b0cf9d84150d0 (patch)
tree073d6711e464fc28770e1b450223b5b8cd4b447e /src/cmd/mk
parent53dbac948575b07e95d184bbfbe4d8953c5ccc4c (diff)
downloadplan9port-8f314994dbcc11b2d8397535ce8b0cf9d84150d0.tar.gz
plan9port-8f314994dbcc11b2d8397535ce8b0cf9d84150d0.tar.bz2
plan9port-8f314994dbcc11b2d8397535ce8b0cf9d84150d0.zip
More Mac tweaks.
Diffstat (limited to 'src/cmd/mk')
-rw-r--r--src/cmd/mk/main.c1
-rw-r--r--src/cmd/mk/mk.h36
-rw-r--r--src/cmd/mk/shprint.c2
-rw-r--r--src/cmd/mk/unix.c1
4 files changed, 5 insertions, 35 deletions
diff --git a/src/cmd/mk/main.c b/src/cmd/mk/main.c
index 267ed73f..fdd94777 100644
--- a/src/cmd/mk/main.c
+++ b/src/cmd/mk/main.c
@@ -226,6 +226,7 @@ main(int argc, char **argv)
if(uflag)
prusage();
exits(0);
+ return 0;
}
void
diff --git a/src/cmd/mk/mk.h b/src/cmd/mk/mk.h
index 9b3f627d..33402de0 100644
--- a/src/cmd/mk/mk.h
+++ b/src/cmd/mk/mk.h
@@ -1,38 +1,4 @@
-#include <utf.h>
-#include <fmt.h>
-#include <setjmp.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <bio.h>
-#include <regexp9.h>
-#include <time.h>
-
-#define uchar _mkuchar
-#define ushort _mkushort
-#define uint _mkuint
-#define ulong _mkulong
-#define vlong _mkvlong
-#define uvlong _mkuvlong
-
-#define nil ((void*)0)
-
-typedef unsigned char uchar;
-typedef unsigned short ushort;
-typedef unsigned int uint;
-typedef unsigned long ulong;
-
-#define nelem(x) (sizeof(x)/sizeof((x)[0]))
-
-#define OREAD O_RDONLY
-#define OWRITE O_WRONLY
-#define ORDWR O_RDWR
-#define USED(x) if(x);else
-#define remove unlink
-#define seek lseek
-#define exits(s) exit((s) && ((char*)s)[0] ? 1 : 0)
-#define create(name, mode, perm) creat(name, perm)
-#define ERRMAX 256
+#include "sys.h"
#undef assert
#define assert mkassert
diff --git a/src/cmd/mk/shprint.c b/src/cmd/mk/shprint.c
index 9e15bcef..7cfa5f4c 100644
--- a/src/cmd/mk/shprint.c
+++ b/src/cmd/mk/shprint.c
@@ -2,6 +2,8 @@
static char *vexpand(char*, Envy*, Bufblock*);
+#define getfields mkgetfields
+
static int
getfields(char *str, char **args, int max, int mflag, char *set)
{
diff --git a/src/cmd/mk/unix.c b/src/cmd/mk/unix.c
index 60222788..8b7e9cb8 100644
--- a/src/cmd/mk/unix.c
+++ b/src/cmd/mk/unix.c
@@ -1,3 +1,4 @@
+#define NOPLAN9DEFINES
#include "mk.h"
#include <sys/wait.h>
#include <signal.h>