Changes to fix the compile for FreeBSD 5.3.
authorMichael Poole <mdpoole@troilus.org>
Fri, 21 Jan 2005 22:52:22 +0000 (22:52 +0000)
committerMichael Poole <mdpoole@troilus.org>
Fri, 21 Jan 2005 22:52:22 +0000 (22:52 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1301 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/engine_kqueue.c
ircd/fileio.c
ircd/ircd_log.c
ircd/os_generic.c
ircd/s_auth.c

index dd2dabf03108cc1d0c68c9395eac5f5f40e13da4..4a0a0cd912098bbdfeae414353eb90b8de708e72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,22 @@
+2005-01-21  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/engine_kqueue.c: Move <sys/types.h> earlier to fix build on
+       FreeBSD 5.x (which needs it for <sys/event.h>).
+
+       * ircd/fileio.c (fbopen): Replace BSDism S_IREAD, S_IWRITE with
+       portable equivalents.
+
+       * ircd/ircd_log.c (log_open): Likewise.
+
+       * ircd/os_generic.c (_XOPEN_SOURCE): Increase to 600 (SuSv3?) so
+       that IPv6 definitions become visible on FreeBSD 5.3.
+
+       * ircd/s_auth.c: Remove apparently unused <sys/file.h> because
+       it fails to compile on FreeBSD 5.3.
+
 2005-01-22  Perry Lorier <isomer@undernet.org>
 
-       * ircd/ircd_lexer.l: Fix missing ;
+       * ircd/ircd_parser.y: Fix missing ;
 
 2005-01-19  Michael Poole <mdpoole@troilus.org>
 
index 0ff2d1f54c6c4b5b5e7283f7932f77bb7ce49c5d..6b4b29901522be4155ed3c9c73e9b48b8dc13848 100644 (file)
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <errno.h>
 #include <signal.h>
+#include <sys/types.h>
 #include <sys/event.h>
 #include <sys/socket.h>
 #include <sys/time.h>
-#include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
 
index 2684a3808d037376fb14f59237de708ab397eabc..9eef0a57a3978960e4e46b1f9daf1e6f92467511 100644 (file)
@@ -68,11 +68,11 @@ FBFILE* fbopen(const char *filename, const char *mode)
       break;
     case 'w':
       openmode = O_WRONLY | O_CREAT | O_TRUNC;
-      pmode = S_IREAD | S_IWRITE;
+      pmode = S_IRUSR | S_IWUSR;
       break;
     case 'a':
       openmode = O_WRONLY | O_CREAT | O_APPEND;
-      pmode = S_IREAD | S_IWRITE;
+      pmode = S_IRUSR | S_IWUSR;
       break;
     case '+':
       openmode &= ~(O_RDONLY | O_WRONLY);
index 66b3318b1941cf47f2a76d5df928490ba57308dc..008ab3bdd29e1728815403417156dd3950da58f5 100644 (file)
@@ -197,7 +197,7 @@ log_open(struct LogFile *lf)
   if (lf && lf->fd < 0) {
     alarm(3); /* if NFS hangs, we hang only for 3 seconds */
     lf->fd = open(lf->file, O_WRONLY | O_CREAT | O_APPEND,
-                 S_IREAD | S_IWRITE);
+                 S_IRUSR | S_IWUSR);
     alarm(0);
   }
 }
index f72bbe900bede427e86a6a9c2b2c47bc4d9c5b28..e99d52107368daf6aac96f996b355be444c4bc26 100644 (file)
@@ -22,7 +22,7 @@
  */
 #include "config.h"
 
-#define _XOPEN_SOURCE  500 /**< make limits.h #define IOV_MAX */
+#define _XOPEN_SOURCE  600 /**< make limits.h #define IOV_MAX */
 #define __EXTENSIONS__  1   /**< make Solaris netinet/in.h know IPv6 */
 
 #include "ircd_osdep.h"
index a7d47f470dd6aaaa57bce981f79d60ea138a741f..ad95e1f019d8f2816d3225824febc3bcb456003c 100644 (file)
@@ -62,7 +62,6 @@
 #include <fcntl.h>
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <sys/socket.h>
-#include <sys/file.h>
 #include <sys/ioctl.h>
 
 /** Array of message text (with length) pairs for AUTH status