FreeBSD Stream Handling added and debian control files improved
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- 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;
}