FreeBSD Stream Handling added and debian control files improved
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 15:38:36 +0100
changeset 5 7c7fc8906920
parent 4 00ad78d34d4c
child 6 7eb12be31bb5
FreeBSD Stream Handling added and debian control files improved committer: Markus Bröker <mbroeker@largo.homelinux.org>
debian/changelog
debian/postinst
src/CMakeLists.txt
src/irc.c
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mcbot (0.93-3) unstable; urgency=low
+mcbot (0.94-1) unstable; urgency=low
 
   * Initial Release
   * the location of mcbot.cgi is stored in the db
@@ -6,5 +6,7 @@
   * mcbot.email and mcbot.user holds the admin information
   * Locale Settings changed to C
   * freenode connect fix
+  * stream handling for freebsd
+  * Debian Policy: Assume everything is working and start the service via default
 
- -- Markus Broeker <mbroeker@largo.homelinux.org>  Sun, 27 Apr 2008 09:05:54 +0200
+ -- Markus Broeker <mbroeker@largo.homelinux.org>  Fri, 8 Aug 2008 09:05:54 +0200
--- a/debian/postinst
+++ b/debian/postinst
@@ -37,7 +37,8 @@
 	chown -R nobody:nogroup /var/lib/nobody
 	echo "Setting permissions for /var/lib/nobody/.mcbotrc to 600"
 	chmod 600 /var/lib/nobody/.mcbotrc
-	echo "ENTER /etc/init.d/mcbot start after editing .mcbotrc"
+	echo "ENTER /etc/init.d/mcbot restart after editing .mcbotrc"
+	/etc/init.d/mcbot restart
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,7 @@
 PROJECT(mc_bot)
 
+cmake_minimum_required(VERSION 2.4)
+
 # Project Settings
 SET(CMAKE_VERBOSE_MAKEFILE Off)
 SET(CMAKE_BUILD_TYPE Release)
--- a/src/irc.c
+++ b/src/irc.c
@@ -61,7 +61,16 @@
     /*
      * rw mode,but many seek errors ...
      */
+#ifdef NETBSD
+    /* BEGIN OF STREAM */
+    stream = fdopen (csocket, "r+");
+#else
+    /* END OF STREAM */
     stream = fdopen (csocket, "a+");
+#endif
+    csocket = fileno(stream);
+
+    printf ("Using filedescriptor %d for stream operations\n", csocket);
     return stream;
 }