Minor BSD fixes for Hugs Aug03
Volker Stolz
vs@foldr.org
Wed, 27 Aug 2003 11:21:26 +0200
--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
The first patch to prelude.h avoids loads of gratuitious warnings about
using malloc.h (which is deprecated).
The second patch to configure.in caters for FreeBSDs different pthread-flags.
(Perhaps it's better to let the user supply the correct CFLAGS for threads?)
I think both patches apply to OpenBSD and NetBSD as well.
Regards,
Volker
(cc: Mr. OpenBSD)
--
Volker Stolz * http://www-i2.informatik.rwth-aachen.de/stolz/ * PGP * S/MIME
--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=hugs1
--- prelude.h.orig Wed Aug 27 10:13:06 2003
+++ prelude.h Wed Aug 27 10:17:58 2003
@@ -553,7 +553,7 @@
# define farCalloc(n,s) farcalloc((unsigned long)n,(unsigned long)s)
#elif HAVE_VALLOC
# include <stdlib.h>
-#ifndef __SYMBIAN32__
+#if !defined(__SYMBIAN32__) && !defined(__FreeBSD__)
# include <malloc.h>
#endif
# define farCalloc(n,s) (Void *)valloc(((unsigned)n)*((unsigned)s))
--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=hugs2
--- configure.in.orig Wed Aug 27 10:04:54 2003
+++ configure.in Wed Aug 27 10:10:50 2003
@@ -107,7 +107,16 @@
AC_ARG_WITH(pthreads,
AC_HELP_STRING([--with-pthreads],
[build Hugs using pthreads C library]),
- [AC_DEFINE(DONT_PANIC) MTCFLAGS="-D_REENTRANT"; LIBS="$LIBS -lpthread"])
+ [AC_DEFINE(DONT_PANIC) MTCFLAGS="-D_REENTRANT";
+case $HostPlatform in
+ *-*-freebsd*)
+ LIBS="$LIBS -pthread"
+ ;;
+ *)
+ LIBS="$LIBS -lpthread"
+ ;;
+esac
+])
AC_ARG_WITH(fptools,
AC_HELP_STRING([--with-fptools=<dir>],
--PEIAKu/WMn1b1Hv9--