Changeset 36fcd41 in ada-examples


Ignore:
Timestamp:
02/06/08 18:07:52 (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
ada-examples-4-10-branch, ada-examples-4-9-branch, master
Children:
e72d576
Parents:
14f44a3
Message:

2008-02-06 Joel Sherrill <joel.sherrill@…>

  • gen-soccon.c, gsocket.h: Update to GCC SVN trunk.
Location:
gen-soconn
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gen-soconn/ChangeLog

    r14f44a3 r36fcd41  
     12008-02-06      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * gen-soccon.c, gsocket.h: Update to GCC SVN trunk.
     4
    152007-09-28      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • gen-soconn/gen-soccon.c

    r14f44a3 r36fcd41  
    2525/* This program generates g-soccon.ads */
    2626
    27 /* To build using DEC C:
    28   CC/DEFINE="TARGET=""OpenVMS""" gen-soccon
    29   LINK gen-soccon
    30   RUN gen-soccon
    31 */
     27/*
     28 * To build using DEC C:
     29 *
     30 * CC/DEFINE="TARGET=""OpenVMS""" gen-soccon
     31 * LINK gen-soccon
     32 * RUN gen-soccon
     33 *
     34 * Note: OpenVMS versions older than 8.3 provide an incorrect value in
     35 * the DEC C header files for MSG_WAITALL. To generate the VMS version
     36 * of g-soccon.ads, gen-soccon should be run on an 8.3 or later machine.
     37 */
    3238
    3339#ifndef TARGET
     
    498504CND(SO_REUSEADDR, "Bind reuse local address")
    499505
     506#ifndef SO_REUSEPORT
     507#define SO_REUSEPORT -1
     508#endif
     509CND(SO_REUSEPORT, "Bind reuse port number")
     510
    500511#ifndef SO_KEEPALIVE
    501512#define SO_KEEPALIVE -1
     
    590601}
    591602
     603_NL
     604TXT("   ----------------------------------------")
     605TXT("   -- Properties of supported interfaces --")
     606TXT("   ----------------------------------------")
     607_NL
     608
     609CND(Need_Netdb_Buffer, "Need buffer for Netdb ops")
     610
    592611#ifdef __vxworks
    593612_NL
     
    603622CND(ERROR, "VxWorks generic error")
    604623#endif
     624
     625#ifdef __MINGW32__
     626_NL
     627TXT("   ------------------------------")
     628TXT("   -- MinGW-specific constants --")
     629TXT("   ------------------------------")
     630_NL
     631TXT("   --  These constants may be used only within the MinGW version of")
     632TXT("   --  GNAT.Sockets.Thin.")
     633_NL
     634
     635CND(WSASYSNOTREADY,     "System not ready")
     636CND(WSAVERNOTSUPPORTED, "Version not supported")
     637CND(WSANOTINITIALISED,  "Winsock not intialized")
     638CND(WSAEDISCON,         "Disconnected")
     639
     640#endif
     641
     642_NL
     643TXT("   ----------------------")
     644TXT("   -- Additional flags --")
     645TXT("   ----------------------")
     646_NL
     647TXT("   Thread_Blocking_IO : constant Boolean := True;")
     648TXT("   --  Set False for contexts where socket i/o are process blocking")
    605649
    606650_NL
  • gen-soconn/gsocket.h

    r14f44a3 r36fcd41  
    77 *                              C Header File                               *
    88 *                                                                          *
    9  *         Copyright (C) 2004-2005, Free Software Foundation, Inc.          *
     9 *         Copyright (C) 2004-2006, Free Software Foundation, Inc.          *
    1010 *                                                                          *
    1111 * GNAT is free software;  you can  redistribute it  and/or modify it under *
     
    155155#include <netdb.h>
    156156#endif
     157
     158/*
     159 * Handling of gethostbyname, gethostbyaddr, getservbyname and getservbyport
     160 * =========================================================================
     161 *
     162 * The default implementation of GNAT.Sockets.Thin requires that these
     163 * operations be either thread safe, or that a reentrant version getXXXbyYYY_r
     164 * be provided. In both cases, socket.c provides a __gnat_safe_getXXXbyYYY
     165 * function with the same signature as getXXXbyYYY_r. If the operating
     166 * system version of getXXXbyYYY is thread safe, the provided auxiliary
     167 * buffer argument is unused and ignored.
     168 *
     169 * Target specific versions of GNAT.Sockets.Thin for platforms that can't
     170 * fulfill these requirements must provide their own protection mechanism
     171 * in Safe_GetXXXbyYYY, and if they require GNAT.Sockets to provide a buffer
     172 * to this effect, then we need to set Need_Netdb_Buffer here (case of
     173 * VxWorks and VMS).
     174 */
     175
     176#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
     177# define HAVE_THREAD_SAFE_GETxxxBYyyy 1
     178#elif defined (sgi) || defined (linux) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
     179# define HAVE_GETxxxBYyyy_R 1
     180#endif
     181
     182#if defined (HAVE_GETxxxBYyyy_R) || !defined (HAVE_THREAD_SAFE_GETxxxBYyyy)
     183# define Need_Netdb_Buffer 1
     184#else
     185# define Need_Netdb_Buffer 0
     186#endif
Note: See TracChangeset for help on using the changeset viewer.