]> jfr.im git - irc/denora/denora.git/commitdiff
DragonFly BSD fixes, and fix error if backtrace() not installed
authortrystanscott <redacted>
Mon, 18 Nov 2013 00:47:58 +0000 (17:47 -0700)
committertrystanscott <redacted>
Mon, 18 Nov 2013 00:47:58 +0000 (17:47 -0700)
and a make strict fix to channels.c

Changes
docs/osbuild.html
include/denora.h
include/extern.h
src/channels.c
src/mysql.c
version.in

diff --git a/Changes b/Changes
index 5fb1846704fbc6460ba1ffa7a22d07b4da74eb6d..7c4a1366dc93d7b58fcefbf399f2d71314b60e18 100644 (file)
--- a/Changes
+++ b/Changes
@@ -29,6 +29,9 @@ Changes
 13/05/16 Do not free unallocated memory in InspIRCd protocol
 
 Fixes
+13/11/17 Fixes compiler error when mysql backtrace is enabled, and the system doesn't have backtrace()
+         also properly includes the header for backtrace()
+13/11/17 Fixes compiler warning on DragonFly BSD
 13/11/15 BSD systems fixes
 13/11/13 Denora can compile on Solairs/OpenIndian 
 13/11/13 Fixed crash bug with nefarious ircds
index f8fe37cdfc9a99840bd9964d58ebbf33abeaa0aa..6af853931e904ce536ccf4b458f904be8303173e 100644 (file)
@@ -42,22 +42,36 @@ gcc version 4.2.1 20070831 patched [FreeBSD]
     </td>
   </tr>
   <tr>
-   <td>FreeBSD<br>
+   <td>NetBSD<br>
     NetBSD netbsd.Home 6.1.2 NetBSD 6.1.2 (GENERIC) i386
    </td>
    <td>
-COLLECT_GCC=gcc
-Target: i486--netbsdelf
-Thread model: posix
+COLLECT_GCC=gcc<br>
+Target: i486--netbsdelf<br>
+Thread model: posix<br>
 gcc version 4.5.3 (NetBSD nb2 20110806)
 <br>
     </td>
    <td>mysql v5.5.33</td>
-   <td>make strict, does have a warning, to be fixed in future release
+   <td>   </td>
+  </tr>
+
+  <tr>
+   <td>DragonFly BSD<br>
+    DragonFly dragon 3.4-RELEASE DragonFly v3.4.3-RELEASE #0: Wed Aug 28 01:55:49 UTC 2013     root@:/usr/obj/usr/src/sys/GENERIC  i386
+   </td>
+   <td>
+Target: i386-pc-dragonflybsd<br>
+Configured with: DragonFly/i386 system compiler (c, c++, objc, LTO)<br>
+Thread model: posix<br>
+gcc version 4.7.2 [DragonFly] Release/2012-09-20<br>
     </td>
+   <td>mysql v5.1.67</td>
+   <td>A couple of make strict items to be cleaned up later</td>
   </tr>
 
 
+
 </table>
 
 </body>
index 731aed18da63ccb0d62d6f520466de2df6a1ce98..10d19465d6ba445b5f190371e2aa03552fc7e156 100644 (file)
 #else
 #ifdef HAVE_MALLOC_H
 #ifndef __OpenBSD__
+#ifndef __DragonFly__
 #include <malloc.h>
 #endif
 #endif
 #endif
+#endif
 
 /************************************************************************/
 /* These are our headers that setup various things                     */
index 0a94b73f9fef5ca908bfba3831fecc436a2bc9be..61efa9a377bf45fe5351c50155e75f16f8c464b8 100644 (file)
@@ -1235,13 +1235,20 @@ E void init_csmodes(void);
 E int ChanHasMode(char *chan, int m);
 
 #if defined(HAVE_CRYPT) && !defined(HAVE_CRYPT_H)
-#if !defined(__FreeBSD__) || !defined(__NetBSD__)
+
+#ifndef __FreeBSD__
+#ifndef __NetBSD__
+#ifndef __DragonFly__
 E char *crypt (__const char *__key, __const char *__salt);
+
+
 #else
 #ifndef HAVE_UNISTD_H 
 E char *crypt (__const char *__key, __const char *__salt);
 #endif
 #endif
 #endif
+#endif
+#endif
 
 #endif /* EXTERN_H */
index bbc9fe47a36e727c1dcf472b26ad236c5dc18718..c871be6bf4a4ca007c55d6448eb3231e9878f031 100644 (file)
@@ -717,7 +717,6 @@ char *p10_mode_parse(Channel *c, User *u, char *mode, int *nomode)
        char modebuf[15];
        char *temp = NULL;
        const char *flag;
-       const char *operlevelchar = "o";
        int is_operlevel = 0;
 
 
index 62d3f58bc5b8b0c9f874027f189f80b29b4dd9ab..823bdf20c2c3c0f207194e3d8cde53dd11a71d2b 100644 (file)
@@ -194,9 +194,11 @@ int db_mysql_query(char *sql, int con)
        int closesql = 0;
 
 #ifdef USE_MYSQL_BT
+#ifdef HAVE_BACKTRACE
        int nptrs, j;
        void *buffer[100];
        char **strings;
+#endif
 #endif
 
        if (!denora->do_sql)
@@ -214,6 +216,7 @@ int db_mysql_query(char *sql, int con)
                {
                        alog(LOG_DEBUG, "[con %d/%s] %s", con, result == 0 ? "Accepted" : "Rejected", sql);
 #ifdef USE_MYSQL_BT
+#ifdef HAVE_BACKTRACE
                        nptrs = backtrace(buffer, 6);
                        strings = backtrace_symbols(buffer, nptrs);
                        if (strings != NULL) {
@@ -221,6 +224,7 @@ int db_mysql_query(char *sql, int con)
                                        alog(LOG_DEBUG, "[bt %d/%d] %s", j, nptrs, strings[j]);
                                free(strings);
                        }
+#endif
 #endif
                }
        }
index 24975ff8988963d9011b34c0520c0d1656db743d..7dfe9b6a643aaa5ee9ba14b1222b5ca992185704 100644 (file)
@@ -8,4 +8,4 @@ VERSION_MAJOR="1"
 VERSION_MINOR="5"
 VERSION_PATCH="0"
 VERSION_EXTRA="git-beta"
-VERSION_BUILD="747"
+VERSION_BUILD="748"