esac
;;
+ ## QNX Neutrino
+ *-nto-qnx* )
+ opsys=qnxnto
+ CFLAGS="$CFLAGS -D__NO_EXT_QNX"
+ ;;
+
## Intel 386 machines where we don't care about the manufacturer.
i[3456]86-*-* )
case "${canonical}" in
hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
+ qnxnto) LIBS_SYSTEM="-lsocket" ;;
+
sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
## Motif needs -lgen.
case "$opsys" in
## darwin ld insists on the use of malloc routines in the System framework.
darwin | mingw32 | nacl | sol2-10) ;;
- cygwin) hybrid_malloc=yes
+ cygwin | qnxto)
+ hybrid_malloc=yes
system_malloc= ;;
*) test "$ac_cv_func_sbrk" = yes && system_malloc=$emacs_cv_sanitize_address;;
esac
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [])
;;
- gnu | openbsd )
+ gnu | openbsd | qnxnto )
AC_DEFINE(FIRST_PTY_LETTER, ['p'])
;;
CYGWIN_OBJ=
PRE_ALLOC_OBJ=
POST_ALLOC_OBJ=lastfile.o
+elif test "$opsys" = "qnxnto"; then
+ CYGWIN_OBJ=sheap.o
else
CYGWIN_OBJ=
PRE_ALLOC_OBJ=lastfile.o
#include <sys/types.h>
#include <unistd.h>
-#if !defined (__NetBSD__) && !defined (__OpenBSD__)
-#include <elf.h>
-#endif /* not __NetBSD__ and not __OpenBSD__ */
+#ifdef __QNX__
+# include <sys/elf.h>
+#elif !defined __NetBSD__ && !defined __OpenBSD__
+# include <elf.h>
+#endif
#include <sys/mman.h>
#if defined (_SYSTYPE_SYSV)
#include <sys/elf_mips.h>
{
int new_file, old_file;
off_t new_file_size;
- void *new_break;
/* Pointers to the base of the image of the two files. */
caddr_t old_base, new_base;
if (old_bss_index == -1)
fatal ("no bss section found");
+ void *no_break = (void *) (intptr_t) -1;
+ void *new_break = no_break;
#ifdef HAVE_SBRK
new_break = sbrk (0);
-#else
- new_break = (byte *) old_bss_addr + old_bss_size;
#endif
+ if (new_break == no_break)
+ new_break = (byte *) old_bss_addr + old_bss_size;
new_bss_addr = (ElfW (Addr)) new_break;
bss_size_growth = new_bss_addr - old_bss_addr;
new_data2_size = bss_size_growth;