| tlibmach: move machbyname, mach to crack.c to avoid OS X linker problem - plan9port - [fork] Plan 9 from user space |
| git clone git://src.adamsgaard.dk/plan9port |
| Log |
| Files |
| Refs |
| README |
| LICENSE |
| --- |
| commit 760f2fb6a9d0ce3b3deffae2ddcd799a9347337c |
| parent 2640996af869dbdee7c0461c69a0c6e59ed58235 |
| Author: Russ Cox |
| Date: Mon, 5 Nov 2007 14:53:16 -0500
libmach: move machbyname, mach to crack.c to avoid OS X linker problem
Diffstat:
M src/libmach/crack.c | 26 ++++++++++++++++++++++++++
D src/libmach/mach.c | 30 ------------------------------
M src/libmach/mkfile | 1 -
3 files changed, 26 insertions(+), 31 deletions(-)
--- |
| diff --git a/src/libmach/crack.c b/src/libmach/crack.c |
| t@@ -4,6 +4,32 @@
#include
#include "elf.h"
+
+Mach *mach;
+
+extern Mach mach386;
+extern Mach machpower;
+
+static Mach *machs[] =
+{
+ &mach386,
+ &machpower,
+};
+
+Mach*
+machbyname(char *name)
+{
+ int i;
+
+ for(i=0; iname, name) == 0){
+ mach = machs[i];
+ return machs[i];
+ }
+ werrstr("machine '%s' not found", name);
+ return nil;
+}
+
static struct
{
ulong magic; |
| diff --git a/src/libmach/mach.c b/src/libmach/mach.c |
| t@@ -1,30 +0,0 @@
-#include
-#include
-#include
-#include
-
-Mach *mach;
-
-extern Mach mach386;
-extern Mach machpower;
-
-static Mach *machs[] =
-{
- &mach386,
- &machpower,
-};
-
-Mach*
-machbyname(char *name)
-{
- int i;
-
- for(i=0; iname, name) == 0){
- mach = machs[i];
- return machs[i];
- }
- werrstr("machine '%s' not found", name);
- return nil;
-}
- |
| diff --git a/src/libmach/mkfile b/src/libmach/mkfile |
| t@@ -27,7 +27,6 @@ OFILES=\
ieee.$O\
loc.$O\
localaddr.$O\
- mach.$O\
mach386.$O\
macho.$O\
machocorepower.$O\ |