-- --
-- S p e c --
-- --
--- Copyright (C) 2000-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 2000-2007, 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- --
-- by the GNAT.Sockets package (g-socket.ads). This package should not be
-- directly with'ed by an applications program.
--- This is the version for powerpc-apple-darwin7.4.1
+-- This is the version for powerpc-apple-darwin8.8.0
-- This file is generated automatically, do not modify it by hand! Instead,
-- make changes to gen-soccon.c and re-run it on each target.
-- System limits --
-------------------
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
+ IOV_MAX : constant := 1024; -- Maximum writev iovcnt
----------------------
-- Type definitions --
SIZEOF_tv_sec : constant := 4; -- tv_sec
SIZEOF_tv_usec : constant := 4; -- tv_usec
+ ----------------------------------------
+ -- Properties of supported interfaces --
+ ----------------------------------------
+
+ Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
+
+ ----------------------
+ -- Additional flags --
+ ----------------------
+
+ Thread_Blocking_IO : constant Boolean := True;
+ -- Set False for contexts where socket i/o are process blocking
+
end GNAT.Sockets.Constants;
* *
* G E N - S O C C O N *
* *
- * Copyright (C) 2004-2005, Free Software Foundation, Inc. *
+ * Copyright (C) 2004-2007, 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- *
TXT("-- --")
TXT("-- S p e c --")
TXT("-- --")
-TXT("-- Copyright (C) 2000-2005, Free Software Foundation, Inc. --")
+TXT("-- Copyright (C) 2000-2007, Free Software Foundation, Inc. --")
TXT("-- --")
TXT("-- GNAT is free software; you can redistribute it and/or modify it under --")
TXT("-- terms of the GNU General Public License as published by the Free Soft- --")
CND(SIZEOF_tv_usec, "tv_usec")
}
+_NL
+TXT(" ----------------------------------------")
+TXT(" -- Properties of supported interfaces --")
+TXT(" ----------------------------------------")
+_NL
+
+CND(Need_Netdb_Buffer, "Need buffer for Netdb ops")
+
#ifdef __vxworks
_NL
TXT(" --------------------------------")
CND(ERROR, "VxWorks generic error")
#endif
+#ifdef __MINGW32__
+_NL
+TXT(" ------------------------------")
+TXT(" -- MinGW-specific constants --")
+TXT(" ------------------------------")
+_NL
+TXT(" -- These constants may be used only within the MinGW version of")
+TXT(" -- GNAT.Sockets.Thin.")
+_NL
+
+CND(WSASYSNOTREADY, "System not ready")
+CND(WSAVERNOTSUPPORTED, "Version not supported")
+CND(WSANOTINITIALISED, "Winsock not intialized")
+CND(WSAEDISCON, "Disconnected")
+
+#endif
+
+_NL
+TXT(" ----------------------")
+TXT(" -- Additional flags --")
+TXT(" ----------------------")
+_NL
+TXT(" Thread_Blocking_IO : constant Boolean := True;")
+TXT(" -- Set False for contexts where socket i/o are process blocking")
+
_NL
TXT("end GNAT.Sockets.Constants;")
* *
* C Header File *
* *
- * Copyright (C) 2004-2005, Free Software Foundation, Inc. *
+ * Copyright (C) 2004-2006, 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- *
#include <sys/ioctl.h>
#include <netdb.h>
#endif
+
+/*
+ * Handling of gethostbyname, gethostbyaddr, getservbyname and getservbyport
+ * =========================================================================
+ *
+ * The default implementation of GNAT.Sockets.Thin requires that these
+ * operations be either thread safe, or that a reentrant version getXXXbyYYY_r
+ * be provided. In both cases, socket.c provides a __gnat_safe_getXXXbyYYY
+ * function with the same signature as getXXXbyYYY_r. If the operating
+ * system version of getXXXbyYYY is thread safe, the provided auxiliary
+ * buffer argument is unused and ignored.
+ *
+ * Target specific versions of GNAT.Sockets.Thin for platforms that can't
+ * fulfill these requirements must provide their own protection mechanism
+ * in Safe_GetXXXbyYYY, and if they require GNAT.Sockets to provide a buffer
+ * to this effect, then we need to set Need_Netdb_Buffer here (case of
+ * VxWorks and VMS).
+ */
+
+#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
+# define HAVE_THREAD_SAFE_GETxxxBYyyy 1
+#elif defined (sgi) || defined (linux) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
+# define HAVE_GETxxxBYyyy_R 1
+#endif
+
+#if defined (HAVE_GETxxxBYyyy_R) || !defined (HAVE_THREAD_SAFE_GETxxxBYyyy)
+# define Need_Netdb_Buffer 1
+#else
+# define Need_Netdb_Buffer 0
+#endif