Start of port to QNX

This commit is contained in:
Kevin Tew 2011-09-29 14:42:04 -06:00
parent 09891c9263
commit f2b7d1eca3
5 changed files with 29 additions and 2 deletions

5
src/configure vendored
View File

@ -4093,6 +4093,9 @@ case "$host_os" in
PREFLAGS="$PREFLAGS -DXONX " PREFLAGS="$PREFLAGS -DXONX "
fi fi
;; ;;
nto-qnx*)
LIBS="$LIBS -lsocket"
;;
*) *)
;; ;;
esac esac
@ -5243,7 +5246,7 @@ if test "${enable_backtrace}" = "yes" ; then
fi fi
LFS_CFLAGS=`getconf LFS_CFLAGS 2> /dev/null` LFS_CFLAGS=`getconf LFS_CFLAGS 2> /dev/null`
if test "${LFS_CFLAGS}" != "" ; then if test "${LFS_CFLAGS}" != "" && test "${LFS_CFLAGS}" != "undefined"; then
echo "Large-file support: ${LFS_CFLAGS}" echo "Large-file support: ${LFS_CFLAGS}"
MZOPTIONS="${MZOPTIONS} ${LFS_CFLAGS}" MZOPTIONS="${MZOPTIONS} ${LFS_CFLAGS}"
fi fi

View File

@ -625,6 +625,9 @@ case "$host_os" in
PREFLAGS="$PREFLAGS -DXONX " PREFLAGS="$PREFLAGS -DXONX "
fi fi
;; ;;
nto-qnx*)
LIBS="$LIBS -lsocket"
;;
*) *)
;; ;;
esac esac
@ -837,7 +840,7 @@ if test "${enable_backtrace}" = "yes" ; then
fi fi
LFS_CFLAGS=`getconf LFS_CFLAGS 2> /dev/null` LFS_CFLAGS=`getconf LFS_CFLAGS 2> /dev/null`
if test "${LFS_CFLAGS}" != "" ; then if test "${LFS_CFLAGS}" != "" && test "${LFS_CFLAGS}" != "undefined"; then
echo "Large-file support: ${LFS_CFLAGS}" echo "Large-file support: ${LFS_CFLAGS}"
MZOPTIONS="${MZOPTIONS} ${LFS_CFLAGS}" MZOPTIONS="${MZOPTIONS} ${LFS_CFLAGS}"
fi fi

View File

@ -45,6 +45,20 @@
# endif # endif
# endif # endif
/* PLTSCHEME: added QNX: */
/* And one for QNX: */
# if defined(__QNX__)
# define I386
# define OS_TYPE "QNX"
# define SA_RESTART 0
# define HEURISTIC1
extern char etext[];
# define DATASTART ((ptr_t)(etext))
extern int _end[];
# define DATAEND (_end)
# define mach_type_known
# endif
/* And one for NetBSD: */ /* And one for NetBSD: */
# if defined(__NetBSD__) # if defined(__NetBSD__)
# define NETBSD # define NETBSD

View File

@ -937,6 +937,11 @@
#endif /* end not OSKit */ #endif /* end not OSKit */
#if defined(__QNX__)
# define USE_FCNTL_O_NONBLOCK
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-QNX"
#endif
/************** (END KNOWN ARCHITECTURE/SYSTEMS) ****************/ /************** (END KNOWN ARCHITECTURE/SYSTEMS) ****************/

View File

@ -4925,6 +4925,8 @@ static Scheme_Object *do_directory_list(int break_ok, int argc, Scheme_Object *a
while ((e = readdir(dir))) { while ((e = readdir(dir))) {
# ifdef DIRENT_NO_NAMLEN # ifdef DIRENT_NO_NAMLEN
nlen = strlen(e->d_name); nlen = strlen(e->d_name);
# elif defined(__QNX__) || defined(__QNXNTO__)
nlen = e->d_namelen;
# else # else
nlen = e->d_namlen; nlen = e->d_namlen;
# endif # endif