commit 74b7932af4487bd088cb02ddb862990b8a1378f7
parent 46871e2b3d7b68d28d2019382256f89e608acb4a
Author: Kris Maglione <jg@suckless.org>
Date: Tue, 13 Feb 2007 12:15:04 -0500
Remove BSD specific make syntax. Sorry about that. This is prettier anyway.
Diffstat:
4 files changed, 57 insertions(+), 61 deletions(-)
diff --git a/Makefile b/Makefile
@@ -26,12 +26,8 @@ options:
${OBJ}: config.mk ixp.h ixp_fcall.h
-ixp_fcall.h: fcall.h.union fcall.h.nounion config.mk
-.ifndef NO_ANON_STRUCTS
- @cat fcall.h.union > ixp_fcall.h
-.else
- @cat fcall.h.nounion > ixp_fcall.h
-.endif
+ixp_fcall.h: fcall.h fcall.h.nounion config.mk
+ @cat fcall.h${FCALL_H_VERSION} > ixp_fcall.h
libixp.a: ${OBJ}
@echo AR $@
diff --git a/config.mk b/config.mk
@@ -24,7 +24,7 @@ SOFLAGS = -fPIC -shared
#SOFLAGS = -G
#LIBS += -lsocket -lnsl
#CFLAGS += -xtarget=ultra
-#NO_ANON_STRUCTS = TRUE
+#FCALL_H_VERSION= .nounion
# compiler and linker
AR = ar cr
diff --git a/fcall.h b/fcall.h
@@ -0,0 +1,54 @@
+/* from fcall(3) in plan9port */
+typedef struct Fcall {
+ unsigned char type;
+ unsigned short tag;
+ unsigned int fid;
+ union {
+ struct { /* Tversion, Rversion */
+ unsigned int msize;
+ char *version;
+ };
+ struct { /* Tflush */
+ unsigned short oldtag;
+ };
+ struct { /* Rerror */
+ char *ename;
+ };
+ struct { /* Ropen, Rcreate */
+ Qid qid; /* +Rattach */
+ unsigned int iounit;
+ };
+ struct { /* Rauth */
+ Qid aqid;
+ };
+ struct { /* Tauth, Tattach */
+ unsigned int afid;
+ char *uname;
+ char *aname;
+ };
+ struct { /* Tcreate */
+ unsigned int perm;
+ char *name;
+ unsigned char mode; /* +Topen */
+ };
+ struct { /* Twalk */
+ unsigned int newfid;
+ unsigned short nwname;
+ char *wname[IXP_MAX_WELEM];
+ };
+ struct { /* Rwalk */
+ unsigned short nwqid;
+ Qid wqid[IXP_MAX_WELEM];
+ };
+ struct { /* Twrite */
+ unsigned long long offset; /* +Tread */
+ /* +Rread */
+ unsigned int count; /* +Tread */
+ char *data;
+ };
+ struct { /* Twstat, Rstat */
+ unsigned short nstat;
+ unsigned char *stat;
+ };
+ };
+} Fcall;
diff --git a/fcall.h.union b/fcall.h.union
@@ -1,54 +0,0 @@
-/* from fcall(3) in plan9port */
-typedef struct Fcall {
- unsigned char type;
- unsigned short tag;
- unsigned int fid;
- union {
- struct { /* Tversion, Rversion */
- unsigned int msize;
- char *version;
- };
- struct { /* Tflush */
- unsigned short oldtag;
- };
- struct { /* Rerror */
- char *ename;
- };
- struct { /* Ropen, Rcreate */
- Qid qid; /* +Rattach */
- unsigned int iounit;
- };
- struct { /* Rauth */
- Qid aqid;
- };
- struct { /* Tauth, Tattach */
- unsigned int afid;
- char *uname;
- char *aname;
- };
- struct { /* Tcreate */
- unsigned int perm;
- char *name;
- unsigned char mode; /* +Topen */
- };
- struct { /* Twalk */
- unsigned int newfid;
- unsigned short nwname;
- char *wname[IXP_MAX_WELEM];
- };
- struct { /* Rwalk */
- unsigned short nwqid;
- Qid wqid[IXP_MAX_WELEM];
- };
- struct { /* Twrite */
- unsigned long long offset; /* +Tread */
- /* +Rread */
- unsigned int count; /* +Tread */
- char *data;
- };
- struct { /* Twstat, Rstat */
- unsigned short nstat;
- unsigned char *stat;
- };
- };
-} Fcall;