+2018-01-11 Jerome Lambourg <lambourg@adacore.com>
+
+ * libgnat/g-soliop__qnx.ads: New.
+ * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
+ for QNX.
+
2018-01-11 Bob Duff <duff@adacore.com>
* par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
#define __BSD_VISIBLE 1
#endif
+#if defined (__QNX__)
+#define _LARGEFILE64_SOURCE 1
+#endif
+
#ifdef IN_RTS
#include "tconfig.h"
#include "tsystem.h"
}
#if defined (_WIN32) || defined (__linux__) || defined (__sun__) \
- || defined (__FreeBSD__) || defined(__DragonFly__)
+ || defined (__FreeBSD__) || defined(__DragonFly__) || defined (__QNX__)
#define HAS_TARGET_WCHAR_T
#endif
#if defined (__linux__) || defined (__sun__) || defined (_AIX) \
|| defined (__APPLE__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- || defined (__DragonFly__) || defined (__NetBSD__)
+ || defined (__DragonFly__) || defined (__NetBSD__) || defined (__QNX__)
cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
#elif defined (__hpux__)
* *
* C Header File *
* *
- * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
determine at compile time what support the system offers for large files.
For now we just list the platforms we have manually tested. */
-#if defined (__GLIBC__) || defined (__sun__)
+#if defined (__GLIBC__) || defined (__sun__) || defined (__QNX__)
#define GNAT_FOPEN fopen64
#define GNAT_OPEN open64
#define GNAT_STAT stat64
* *
* Auxiliary C functions for Interfaces.C.Streams *
* *
- * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
getcwd approach instead. */
realpath (nam, buffer);
+#elif defined (__QNX__)
+
+ int length;
+
+ if (__gnat_is_absolute_path (nam, strlen (nam)))
+ realpath (nam, buffer);
+ else
+ {
+ length = __gnat_max_path_len;
+ __gnat_get_current_dir (buffer, &length);
+ strncat (buffer, nam, __gnat_max_path_len - length - 1);
+ }
+
#elif defined (__vxworks)
/* On VxWorks systems, an absolute path can be represented (depending on
--- /dev/null
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S . L I N K E R _ O P T I O N S --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2001-2018, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package is used to provide target specific linker_options for the
+-- support of sockets as required by the package GNAT.Sockets.
+
+-- This is an empty version for default use where no additional libraries
+-- are required. On some targets a target specific version of this unit
+-- ensures linking with required libraries for proper sockets operation.
+
+-- This package should not be directly with'ed by an application program
+
+package GNAT.Sockets.Linker_Options is
+ pragma Linker_Options ("-lsocket");
+end GNAT.Sockets.Linker_Options;
-- --
-- S p e c --
-- --
--- Copyright (C) 2000-2017, Free Software Foundation, Inc. --
+-- Copyright (C) 2000-2018, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
#if defined(__linux__) || defined(__FreeBSD__) \
|| (defined(_AIX) && defined(_AIXVERSION_530)) \
- || defined(__DragonFly__)
+ || defined(__DragonFly__) || defined(__QNX__)
/** On these platforms use system provided monotonic clock instead of
** the default CLOCK_REALTIME. We then need to set up cond var attributes
** appropriately (see thread.c).
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
|| defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
|| (defined (__svr4__) && defined (__i386__)) || defined (__Lynx__) \
|| defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__)
+ || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
+ || defined (__QNX__)
# ifdef __MINGW32__
# if OLD_MINGW
|| defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \
|| defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__)
+ || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
+ || defined (__QNX__)
char c;
int nread;
int good_one = 0;
|| defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \
|| defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__)
+ || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
+ || defined (__QNX__)
eof_ch = termios_rec.c_cc[VEOF];
/* If waiting (i.e. Get_Immediate (Char)), set MIN = 1 and wait for
#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (__linux__) \
|| defined (__GLIBC__) || defined (__DragonFly__) || defined (__OpenBSD__) \
- || defined (__DJGPP__)
+ || defined (__DJGPP__) || defined (__QNX__)
{
localtime_r (timer, &tp);
*off = tp.tm_gmtoff;