chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(initial)
Compiles and runs. Now all it needs is meat.
author
ian
<ian>
Mon, 26 Aug 2002 16:07:14 +0000
(16:07 +0000)
committer
ian
<ian>
Mon, 26 Aug 2002 16:07:14 +0000
(16:07 +0000)
base/troglodyte-Makefile
[new file with mode: 0644]
patch
|
blob
dgram/misc.c
[new file with mode: 0644]
patch
|
blob
diff --git a/base/troglodyte-Makefile
b/base/troglodyte-Makefile
new file mode 100644
(file)
index 0000000..
2ae36d5
--- /dev/null
+++ b/
base/troglodyte-Makefile
@@ -0,0
+1,20
@@
+OBJS= forwarder.o \
+ main.o \
+ misc.o \
+ intr-sigio.o \
+ bget/bget.o
+
+HDRS= misc.h \
+ forwarder.h \
+ intr.h
+
+CFLAGS= -g -Wall
+
+fvpn: $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+%.o: %.c $(HDRS)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
+
+clean:
+ rm -f $(OBJS) *~ ./#*#
diff --git a/dgram/misc.c
b/dgram/misc.c
new file mode 100644
(file)
index 0000000..
1d37020
--- /dev/null
+++ b/
dgram/misc.c
@@ -0,0
+1,14
@@
+/**/
+
+#include "all.h"
+
+int setnonblock(int fd, int isnonblock) {
+ int r;
+
+ r= fcntl(fd,F_GETFL);
+ if (r==-1) return -1;
+ r= fcntl(fd,F_SETFL, isnonblock ? r|O_NONBLOCK : r&~O_NONBLOCK);
+ if (r==-1) return -1;
+ return 0;
+}
+