diff --git a/src/configure b/src/configure index d305222935..85000e0cf7 100755 --- a/src/configure +++ b/src/configure @@ -4093,6 +4093,9 @@ case "$host_os" in PREFLAGS="$PREFLAGS -DXONX " fi ;; + nto-qnx*) + LIBS="$LIBS -lsocket" + ;; *) ;; esac @@ -5243,7 +5246,7 @@ if test "${enable_backtrace}" = "yes" ; then fi 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}" MZOPTIONS="${MZOPTIONS} ${LFS_CFLAGS}" fi diff --git a/src/racket/configure.ac b/src/racket/configure.ac index aeb8dbf08a..2700d8176a 100644 --- a/src/racket/configure.ac +++ b/src/racket/configure.ac @@ -625,6 +625,9 @@ case "$host_os" in PREFLAGS="$PREFLAGS -DXONX " fi ;; + nto-qnx*) + LIBS="$LIBS -lsocket" + ;; *) ;; esac @@ -837,7 +840,7 @@ if test "${enable_backtrace}" = "yes" ; then fi 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}" MZOPTIONS="${MZOPTIONS} ${LFS_CFLAGS}" fi diff --git a/src/racket/gc/include/private/gcconfig.h b/src/racket/gc/include/private/gcconfig.h index c8e60f3c70..3eb01a4b7f 100644 --- a/src/racket/gc/include/private/gcconfig.h +++ b/src/racket/gc/include/private/gcconfig.h @@ -45,6 +45,20 @@ # 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: */ # if defined(__NetBSD__) # define NETBSD diff --git a/src/racket/sconfig.h b/src/racket/sconfig.h index 54775fb230..d5c5d384c9 100644 --- a/src/racket/sconfig.h +++ b/src/racket/sconfig.h @@ -937,6 +937,11 @@ #endif /* end not OSKit */ +#if defined(__QNX__) +# define USE_FCNTL_O_NONBLOCK +# define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-QNX" +#endif + /************** (END KNOWN ARCHITECTURE/SYSTEMS) ****************/ diff --git a/src/racket/src/file.c b/src/racket/src/file.c index 27b1349e9b..225fae5a0e 100644 --- a/src/racket/src/file.c +++ b/src/racket/src/file.c @@ -4925,6 +4925,8 @@ static Scheme_Object *do_directory_list(int break_ok, int argc, Scheme_Object *a while ((e = readdir(dir))) { # ifdef DIRENT_NO_NAMLEN nlen = strlen(e->d_name); +# elif defined(__QNX__) || defined(__QNXNTO__) + nlen = e->d_namelen; # else nlen = e->d_namlen; # endif