rogue4, arogue5: improve portability.
Most changes merely prevent including header files that don't exist. All games now build and run on MinGW, though bugs remain.
This commit is contained in:
parent
120beada5a
commit
be61b1a69e
5 changed files with 46 additions and 40 deletions
|
|
@ -13,7 +13,7 @@ AC_PROG_CC
|
|||
MP_WITH_CURSES
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h])
|
||||
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_TYPE_SIZE_T
|
||||
|
|
|
|||
|
|
@ -42,9 +42,15 @@
|
|||
#undef MOUSE_MOVED
|
||||
#elif defined(__DJGPP__)
|
||||
#include <process.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -57,12 +63,10 @@
|
|||
|
||||
#include <curses.h>
|
||||
|
||||
#if defined(__INTERIX) || defined(__MSYS__)
|
||||
#if defined(HAVE_TERM_H)
|
||||
#include <term.h>
|
||||
#elif defined(HAVE_NCURSES_TERM_H)
|
||||
#include <ncurses/term.h>
|
||||
#else
|
||||
#include <term.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -93,14 +97,20 @@ md_init()
|
|||
}
|
||||
|
||||
int
|
||||
md_hasclreol()
|
||||
md_hasclreol(void)
|
||||
{
|
||||
#ifndef attron
|
||||
return(!CE);
|
||||
#elif !defined(__PDCURSES__)
|
||||
return(clr_eol != NULL);
|
||||
#else
|
||||
#if defined(clr_eol)
|
||||
#ifdef NCURSES_VERSION
|
||||
if (cur_term == NULL)
|
||||
return(0);
|
||||
if (cur_term->type.Strings == NULL)
|
||||
return(0);
|
||||
#endif
|
||||
return((clr_eol != NULL) && (*clr_eol != 0));
|
||||
#elif defined(__PDCURSES__)
|
||||
return(TRUE);
|
||||
#else
|
||||
return((CE != NULL) && (*CE != 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue