As far as I know it is the only way to get things fixed. Solaris has alot of different settings and function definitions than other Unix variant.
If the eggdrop's ./configure sets a define for the operating system you can use that define in any of your eggdrop's source files and recompile. That way if you would ever move the eggdrop to another Unix variant you won't have to edit the sources again.
There is a define for SunOS 4 in the
config.h file
Code: Select all
/* Define if running on SunOS 4.0. */
/* #undef DLOPEN_1 */
Maybe you can make a check yourself in the
aclocal.m4 file. Something like this:
Code: Select all
dnl EGG_CHECK_OS()
dnl
dnl Various operating system tests.
dnl
AC_DEFUN([EGG_CHECK_OS],
[
MOD_CC="$CC"
MOD_LD="$CC"
MOD_STRIP="$STRIP"
SHLIB_CC="$CC"
SHLIB_LD="$CC"
SHLIB_STRIP="$STRIP"
LINUX="no"
IRIX="no"
SUNOS="no"
HPUX="no"
EGG_CYGWIN="no"
case "$egg_cv_var_system_type" in
BSD/OS)
case "`echo $egg_cv_var_system_release | cut -d . -f 1`" in
2)
# Fallthrough.
;;
3)
MOD_CC="shlicc"
MOD_LD="shlicc"
if test ! "$STRIP" = "touch"; then
MOD_STRIP="$STRIP -d"
fi
SHLIB_LD="shlicc -r"
SHLIB_STRIP="touch"
;;
*)
if test ! "$STRIP" = "touch"; then
MOD_STRIP="$STRIP -d"
fi
SHLIB_CC="$CC -export-dynamic -fPIC"
SHLIB_LD="$CC -shared -nostartfiles"
;;
esac
;;
CYGWI*)
AC_PROG_CC_WIN32
SHLIB_LD="$CC -shared"
CC="$CC $WIN32FLAGS"
MOD_CC="$CC"
MOD_LD="$CC"
EGG_CYGWIN="yes"
EGG_CYGWIN_BINMODE
AC_DEFINE(CYGWIN_HACKS, 1, [Define if running under Cygwin.])
;;
HP-UX)
HPUX="yes"
if test "$CC" = "cc"; then
# HP-UX ANSI C Compiler.
MOD_LD="$CC +z"
SHLIB_CC="$CC +z"
else
# GCC
MOD_LD="$CC -fPIC -shared"
SHLIB_CC="$CC -fPIC"
fi
SHLIB_LD="ld -b"
;;
dell)
SHLIB_STRIP="touch"
MOD_LD="$CC -lelf -lucb"
;;
IRIX)
SHLIB_LD="ld -n32 -shared -rdata_shared"
IRIX="yes"
SHLIB_STRIP="touch"
;;
Ultrix)
SHLIB_STRIP="touch"
DEFAULT_MAKE="static"
SHELL="/bin/sh5"
;;
SINIX*)
SHLIB_STRIP="touch"
SHLIB_CC="cc -G"
;;
BeOS)
# Fallthrough.
;;
Linux)
LINUX="yes"
MOD_LD="$CC"
SHLIB_CC="$CC -fPIC"
SHLIB_LD="$CC -shared -nostartfiles"
;;
Lynx)
# Fallthrough.
;;
QNX)
SHLIB_LD="ld -shared"
;;
OSF1)
case "`echo $egg_cv_var_system_release | cut -d . -f 1`" in
V*)
# Digital OSF uses an ancient version of gawk
if test "$AWK" = "gawk"; then
AWK="awk"
fi
SHLIB_LD="ld -shared -expect_unresolved \"'*'\""
SHLIB_STRIP="touch"
;;
1.0|1.1|1.2)
SHLIB_LD="ld -R -export $@:"
;;
1.*)
SHLIB_CC="$CC -fpic"
SHLIB_LD="ld -shared"
;;
esac
AC_DEFINE(BROKEN_SNPRINTF, 1, [Define to use Eggdrop's snprintf functions regardless of HAVE_SNPRINTF.])
AC_DEFINE(STOP_UAC, 1, [Define if running on OSF/1 platform.])
;;
SunOS)
if test "`echo $egg_cv_var_system_release | cut -d . -f 1`" = "5"; then
# Solaris
if test -n "$GCC"; then
SHLIB_CC="$CC -fPIC"
SHLIB_LD="$CC -shared"
else
SHLIB_CC="$CC -KPIC"
SHLIB_LD="$CC -G -z text"
fi
else
# SunOS 4
SUNOS="yes"
SHLIB_LD="ld"
SHLIB_CC="$CC -PIC"
fi
;;
*BSD)
# FreeBSD/OpenBSD/NetBSD
SHLIB_CC="$CC -fPIC"
SHLIB_LD="ld -Bshareable -x"
;;
Darwin)
# Mac OS X
SHLIB_CC="$CC -fPIC"
SHLIB_LD="ld -bundle -undefined error"
;;
*)
if test -r /mach; then
# At this point, we're guessing this is NeXT Step.
AC_DEFINE(BORGCUBES, 1, [Define if running on NeXT Step.])
else
if test -r /cmds; then
# Probably QNX.
SHLIB_LD="ld -shared"
SHLIB_STRIP="touch"
fi
fi
;;
esac
AC_SUBST(MOD_LD)
AC_SUBST(MOD_CC)
AC_SUBST(MOD_STRIP)
AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_CC)
AC_SUBST(SHLIB_STRIP)
])
That way you only have to say
./configure and it's all fixed for your current Unix variant. If it works well try suggesting it to the eggheads and maybe they like the approach and theyll add it to the next version.
Imo it's good to to make a sort of check during
./configure that allows developers to use defines everywhere to make the eggdrop platform independant. Thus far it ok-ish, but problems like these will scare off people with less knowledge of C...
Sorry for the long post, I hoped it would make nice scrolling code boxes