Permalink
Browse files

Fix eggdrop to compile and run under Haiku

Patch by: michaelortmann

* Fix Haiku: Fix parse error before free_func: zlib.h must be included after crypto.h
* Fix Haiku: Internal compiler error, output_operand_lossage invalid expression as operand: unwiched unnecessary pointer magick
* update doc/BUG-REPORT for Haiku
* update COMPILE-GUIDE for Haiku
* enable shared build by default for Haiku
* Fix checking for a working resolver library and Fix coredns.c:154: field data has incomplete type
  • Loading branch information...
michaelortmann authored and vanosg committed Oct 4, 2018
1 parent 38330f0 commit a8425cb1b83cd2c86d5817048a508d0e98862cb6
Showing with 42 additions and 25 deletions.
  1. +3 −0 aclocal.m4
  2. +1 −0 doc/BUG-REPORT
  3. +30 −20 doc/COMPILE-GUIDE
  4. +4 −1 src/mod/compress.mod/compress.c
  5. +1 −1 src/mod/dns.mod/configure.ac
  6. +3 −3 src/mod/share.mod/share.c
View
@@ -609,6 +609,9 @@ AC_DEFUN([EGG_CHECK_MODULE_SUPPORT],
EGG_DARWIN_BUNDLE
EGG_APPEND_VAR(MODULE_XLIBS, $BUNDLE)
;;
Haiku)
WEIRD_OS="no"
;;
*)
if test -r /mach; then
# At this point, we're guessing this is NeXT Step. We support rld, so
View
@@ -68,6 +68,7 @@ DO NOT SEND HTML E-MAIL TO THE LISTS.
( ) Dell SVR4
( ) DragonFly BSD
( ) FreeBSD/TrueOS
( ) Haiku
( ) HP-UX
( ) IRIX
( ) Linux
View
@@ -1,5 +1,5 @@
Eggdrop Compile Guide and FAQ
Last revised: September 4, 2018
Last revised: September 20, 2018
_____________________________________________________________________
Eggdrop Compile Guide and FAQ
@@ -25,7 +25,8 @@ Last revised: September 4, 2018
F. IRIX
G. Solaris / SunOS
H. Cygwin / Windows
I. Tcl Detection and Installation
I. Haiku
J. Tcl Detection and Installation
Frequently Asked Questions:
1. I get a lot of warnings.
@@ -301,31 +302,40 @@ Last revised: September 4, 2018
cp /bin/cygz.dll 'C:/eggdrop' (if you selected compress.mod)
I. Tcl Detection and Installation
If ./configure does not correctly detect the location of your Tcl
library and header file, or if you experience errors related to Tcl
during linking, perform these steps:
I. Haiku
If you compile Tcl from source and it breaks with a thread error
(and --disable-threads doesn't help), you can workaround this by
removing the 'pkgs/thread<VERSION>' directory.
1. Depending on what shell your using:
Note that on Haiku, the LIBRARY_PATH environment variable must be used
instead of LD_LIBRARY_PATH.
bash/ksh:
export LD_LIBRARY_PATH=<path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
csh/tcsh/tclsh:
setenv LD_LIBRARY_PATH <path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
J. Tcl Detection and Installation
If ./configure does not correctly detect the location of your Tcl
library and header file, or if you experience errors related to Tcl
during linking, perform these steps:
1. Depending on what shell your using:
Note that some OS's use a different environment variable to tell
ld where to look for a library. See the notes for your specific OS
above (if applicable).
bash/ksh:
export LD_LIBRARY_PATH=<path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
2. Run the following command from your Eggdrop compilation directory
(this is all one command):
csh/tcsh/tclsh:
setenv LD_LIBRARY_PATH <path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
./configure --with-tclinc='<full path to tcl.h>'
--with-tcllib='<full path to Tcl library>'
Note that some OS's use a different environment variable to tell
ld where to look for a library. See the notes for your specific OS
above (if applicable).
2. Run the following command from your Eggdrop compilation directory
(this is all one command):
./configure --with-tclinc='<full path to tcl.h>'
--with-tcllib='<full path to Tcl library>'
3. Continue compiling the bot as outlined in Section A., starting
with 'make config'.
3. Continue compiling the bot as outlined in Section A., starting
with 'make config'.
If you do not have Tcl installed on your system, you can compile it in
your /home directory. Download Tcl from Tcl's SourceForge project page
@@ -29,9 +29,12 @@
#include <string.h>
#include <errno.h>
#include <zlib.h>
#include "src/mod/module.h"
#include <zlib.h> /* after src/mod/module.h because it could collide with
crypto.h free_func */
#include "share.mod/share.h"
#ifdef HAVE_MMAP
@@ -16,7 +16,7 @@ dns_reslib_avail="false"
AC_HEADER_RESOLV
for lib in '' -lresolv -lbind -lsocket
for lib in '' -lresolv -lbind -lsocket -lnetwork
do
LIBS="$lib"
AC_LINK_IFELSE([AC_LANG_PROGRAM([
@@ -1461,14 +1461,14 @@ static void shareout_but EGG_VARARGS_DEF(struct chanset_t *, arg1)
*/
static void new_tbuf(char *bot)
{
tandbuf **old = &tbuf, *new;
tandbuf *new;
new = nmalloc(sizeof(tandbuf));
strncpyz(new->bot, bot, sizeof new->bot);
new->q = NULL;
new->timer = now;
new->next = *old;
*old = new;
new->next = tbuf;
tbuf = new;
putlog(LOG_BOTS, "*", "Creating resync buffer for %s", bot);
}

0 comments on commit a8425cb

Please sign in to comment.