compile on BSD

This commit is contained in:
psyc://psyced.org/~lynX 2015-01-07 18:55:08 +01:00
parent 727399dbcf
commit a83b39cb87
3 changed files with 20 additions and 9 deletions

6
TODO
View File

@ -21,9 +21,11 @@ BUGS
Error loading place: *Error in loading object: 'place/testotest'.
Warning: place "/place/testotest" did not return ME on load()
2009.04.21 12:35:19 ERROR caught. Backtrace:
' parse' in ' net/irc/user.c' (' net/irc/user#User') line 32
' parse' in ' net/irc/user.c' (' net/irc/user#User') line 32
[...]
' CATCH' in ('drivers/ldmud/library/library')
' CATCH' in ('drivers/ldmud/library/library')
- libpsyc detection fails on BSD, hotfix by adding #define HAS_PSYC manually
- BSD needs -liconv in generated makefile
WINDOWS SUPPORT
+ with the new __NO_SRV__ detection psyclpc compiles under cygwin but it

View File

@ -1221,6 +1221,7 @@ echo "*** libpsyc"
lp_cv_has_psyc_lib="no"
AC_CHECK_LIB(psyc,main, lp_cv_has_psyc_lib="yes")
# dont know why this fails on bsd, had to patch machine.h manually... FIXME
if test $lp_cv_has_psyc_lib = yes; then
LIBS="-lpsyc"
AC_CACHE_CHECK(for libpsyc usability,lp_cv_has_psyc,
@ -1304,7 +1305,13 @@ if test -f /usr/sbin/iconvconfig; then
lp_cv_has_broken_iconv="no"
fi
else
lp_cv_has_broken_iconv="no"
if test -f /usr/local/bin/iconv; then
lp_cv_has_broken_iconv="no"
lp_cv_has_iconv="yes"
else
lp_cv_has_broken_iconv="no"
lp_cv_has_iconv="no"
fi
fi
echo "$as_me:$LINENO: result: $lp_cv_has_broken_iconv" >&5
echo "${ECHO_T}$lp_cv_has_broken_iconv" >&6

View File

@ -267,17 +267,19 @@ typedef bytecode_t * bytecode_p;
# define LOAD_INT32(d,p) LOAD_4BYTE(d,p)
# define STORE_INT32(p,d) STORE_4BYTE(p,d)
#else
# define GET_LONG(d,p) GET_4BYTE(d,p)
# define LOAD_LONG(d,p) LOAD_4BYTE(d,p)
# define PUT_LONG(p,d) MACRO(unsigned long _us = (unsigned long)d; \
# ifndef GET_LONG /* happens on BSD */
# define GET_LONG(d,p) GET_4BYTE(d,p)
# define LOAD_LONG(d,p) LOAD_4BYTE(d,p)
# define PUT_LONG(p,d) MACRO(unsigned long _us = (unsigned long)d; \
PUT_4BYTE(p,_us);)
# define STORE_LONG(p,d) MACRO(unsigned long _us = (unsigned long)d; \
# define STORE_LONG(p,d) MACRO(unsigned long _us = (unsigned long)d; \
STORE_4BYTE(p,_us);)
# define RSTORE_LONG(p,d) MACRO(unsigned long _us = (unsigned long)d; \
# define RSTORE_LONG(p,d) MACRO(unsigned long _us = (unsigned long)d; \
RSTORE_4BYTE(p,_us);)
/* TODO: The above assumes sizeof(long) == 4. */
# define LOAD_INT32(d,p) LOAD_2BYTE(d,p)
# define LOAD_INT32(d,p) LOAD_2BYTE(d,p)
# endif
#endif
#endif /* CHAR_BIT */