[mw-devel] [Git][arthur/mw][master] Remove the dependency on cproto

Andrew Price welshbyte at sucs.org
Thu Oct 22 14:59:53 BST 2015


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
253cffef by Andrew Price at 2015-10-22T14:54:16Z
Remove the dependency on cproto

"There is a limit to the time assigned you, and if you don't use it to
free yourself it will be gone and never return."
                                               -- Marcus Aurelius

- - - - -


5 changed files:

- .gitignore
- mw.spec
- src/Makefile
- src/nonce.c
- + src/nonce.h


Changes:

=====================================
.gitignore
=====================================
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,7 @@ src/client/mw
 src/mw
 src/mwserv
 src/mwtest
-src/nonce.h
+src/nonce-def.h
 src/server/mwserv
 src/utils/del_user
 src/utils/fixuser


=====================================
mw.spec
=====================================
--- a/mw.spec
+++ b/mw.spec
@@ -11,7 +11,7 @@ Requires: readline sqlite curl
 #Requires(post): systemd-units
 #Requires(preun): systemd-units
 #Requires(postun): systemd-units
-BuildRequires: libtermcap-devel readline-devel glibc-devel sqlite-devel curl-devel openssl-devel jansson-devel postgresql-devel cproto
+BuildRequires: libtermcap-devel readline-devel glibc-devel sqlite-devel curl-devel openssl-devel jansson-devel postgresql-devel
 URL: http://projects.sucs.org/projects/mw/
 
 %description


=====================================
src/Makefile
=====================================
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,12 +12,11 @@ build: $(JSOBJ) libmw.a
 libmw.a: $(CODE:.c=.o)
 	ar rcs libmw.a $^
 
-nonce.c: nonce.h
+nonce.c: nonce.h nonce-def.h
 
-nonce.h:
-	echo -n "#define NONCE \"" > nonce.h
-	dd if=/dev/urandom bs=1 count=8 | base64 | sed -e 's/$$/"/' >> nonce.h
-	cproto nonce.c >> nonce.h
+nonce-def.h:
+	echo -n "#define NONCE \"" > $@
+	dd if=/dev/urandom bs=1 count=8 | base64 | sed -e 's/$$/"/' >> $@
 
 install: all
 	$(MAKE) -C client $@


=====================================
src/nonce.c
=====================================
--- a/src/nonce.c
+++ b/src/nonce.c
@@ -1,4 +1,5 @@
 #include <string.h>
+#include "nonce-def.h"
 #include "nonce.h"
 
 const char * get_nonce()


=====================================
src/nonce.h
=====================================
--- /dev/null
+++ b/src/nonce.h
@@ -0,0 +1,7 @@
+#ifndef NONCE_H
+#define NONCE_H
+
+const char *get_nonce(void);
+int match_nonce(const char *test);
+
+#endif /* NONCE_H */



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/253cffef7f36c981da760beed1893ebb3fb7867f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20151022/c9b18114/attachment.html>


More information about the mw-devel mailing list