- check in some small compile patches from Martin Str|mberg <ams@ludd.luth.se>

to make Bochs compile on DJGPP.
  - put references to SIGSTOP and SIGTSTP in #ifdefs
  - add definition of BX_CD_FRAMESIZE and CD_FRAMESIZE
  - look for curses functions in -ldcurses

Modified Files:
  gui/term.cc iodev/cdrom.cc configure.in configure
This commit is contained in:
Bryce Denney 2002-11-20 12:23:42 +00:00
parent 0967c89ec2
commit c43b46c531
4 changed files with 83 additions and 7 deletions

63
bochs/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in,v 1.168 2002/11/18 02:32:53 bdenney Exp .
# From configure.in Id: configure.in,v 1.169 2002/11/19 16:36:17 bdenney Exp .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53.
#
@ -21062,8 +21062,67 @@ if test $ac_cv_lib_termlib_mvaddch = yes; then
GUI_LINK_OPTS_TERM='-ltermlib'
fi
echo "$as_me:$LINENO: checking for mvaddch in -lpdcurses" >&5
echo $ECHO_N "checking for mvaddch in -lpdcurses... $ECHO_C" >&6
if test "${ac_cv_lib_pdcurses_mvaddch+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpdcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mvaddch ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
mvaddch ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pdcurses_mvaddch=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_pdcurses_mvaddch=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pdcurses_mvaddch" >&5
echo "${ECHO_T}$ac_cv_lib_pdcurses_mvaddch" >&6
if test $ac_cv_lib_pdcurses_mvaddch = yes; then
GUI_LINK_OPTS_TERM='-lpdcurses'
fi
if test "$GUI_LINK_OPTS_TERM" = ""; then
echo Curses library not found: tried curses, ncurses, and termlib.
echo Curses library not found: tried curses, ncurses, termlib and pdcurses.
exit 1
fi
fi

View File

@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(bochs.h)
AC_REVISION([[$Id: configure.in,v 1.169 2002-11-19 16:36:17 bdenney Exp $]])
AC_REVISION([[$Id: configure.in,v 1.170 2002-11-20 12:23:42 bdenney Exp $]])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(ltdlconf.h)
@ -1867,8 +1867,9 @@ if test "$use_curses" = yes -a "$cross_configure" = 0; then
AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses')
AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses')
AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib')
AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses')
if test "$GUI_LINK_OPTS_TERM" = ""; then
echo Curses library not found: tried curses, ncurses, and termlib.
echo Curses library not found: tried curses, ncurses, termlib and pdcurses.
exit 1
fi
fi

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: term.cc,v 1.24 2002-11-19 05:47:44 bdenney Exp $
// $Id: term.cc,v 1.25 2002-11-20 12:23:40 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2000 MandrakeSoft S.A.
@ -108,8 +108,12 @@ bx_term_gui_c::get_sighandler_mask ()
(1<<SIGHUP)
| (1<<SIGINT)
| (1<<SIGQUIT)
#ifdef SIGSTOP
| (1<<SIGSTOP)
#endif
#ifdef SIGTSTP
| (1<<SIGTSTP)
#endif
| (1<<SIGTERM);
}
@ -120,12 +124,16 @@ bx_term_gui_c::sighandler(int signo)
case SIGINT:
do_scan(BX_KEY_C,0,1,0);
break;
#ifdef SIGSTOP
case SIGSTOP:
do_scan(BX_KEY_S,0,1,0);
break;
#endif
#ifdef SIGTSTP
case SIGTSTP:
do_scan(BX_KEY_Z,0,1,0);
break;
#endif
default:
BX_INFO(("sig %d caught",signo));
break;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cdrom.cc,v 1.51 2002-11-19 05:47:44 bdenney Exp $
// $Id: cdrom.cc,v 1.52 2002-11-20 12:23:41 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -73,6 +73,14 @@ extern "C" {
}
#endif /* __sun */
#ifdef __DJGPP__
extern "C" {
#include <sys/ioctl.h>
#define BX_CD_FRAMESIZE 2048
#define CD_FRAMESIZE 2048
}
#endif
#ifdef __BEOS__
#include "cdrom_beos.h"
#define BX_CD_FRAMESIZE 2048
@ -455,7 +463,7 @@ cdrom_interface::cdrom_interface(char *dev)
void
cdrom_interface::init(void) {
BX_DEBUG(("Init $Id: cdrom.cc,v 1.51 2002-11-19 05:47:44 bdenney Exp $"));
BX_DEBUG(("Init $Id: cdrom.cc,v 1.52 2002-11-20 12:23:41 bdenney Exp $"));
BX_INFO(("file = '%s'",path));
}