<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: socket_fd routine in DEC C 1.3 in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567943#M32325</link>
    <description>VERY OLD compiler (and VERY OLD VMS version)!&lt;BR /&gt;&lt;BR /&gt;I have run into the opposite, where older versions oc the C-compiler (before 6.0) defined these themselves. The data is not included in the libraries on older VMS / Compiler versions - that is: prior to C 6.0&lt;BR /&gt;&lt;BR /&gt;So you may need to define (to make it C-version dependent):&lt;BR /&gt;&lt;BR /&gt;Macro's:&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;typedef int fd_set; &lt;BR /&gt;#define FD_SET(n,p)     (*p|= (1&amp;lt;&lt;N&gt;&lt;/N&gt;#define FD_CLR(n,p)     (*p&amp;amp;= ~(1&amp;lt;&lt;N&gt;&lt;/N&gt;#define FD_ISSET(n,p)   (*p &amp;amp; (1&amp;lt;&lt;N&gt;&lt;/N&gt;#define FD_ZERO(p)      (*p= 0L)&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;Static data:&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;static int  socket_fd;&lt;BR /&gt;#else&lt;BR /&gt;static int  i_socket_fd;&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;and code-contructs as:&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;            if (ReturnCode == FAIL)  send(socket_fd,"-999",4,0);&lt;BR /&gt;            shutdown(socket_fd,2);&lt;BR /&gt;            close(socket_fd);&lt;BR /&gt;#else&lt;BR /&gt;            if (ReturnCode == FAIL)  send(i_socket_fd,"-999",4,0);&lt;BR /&gt;            shutdown(i_socket_fd,2);&lt;BR /&gt;            close(i_socket_fd);&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;        socket_fd = socket(UCX$C_AUXS,0,0);&lt;BR /&gt;        if (socket_fd == -1) {&lt;BR /&gt;#else&lt;BR /&gt;        i_socket_fd = socket(UCX$C_AUXS,0,0);&lt;BR /&gt;        if (i_socket_fd == -1) {&lt;BR /&gt;#endif&lt;BR /&gt;...&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;        status = setsockopt(socket_fd, SOL_SOCKET, SO_SNDBUF,&lt;BR /&gt;                      (char *)&amp;amp;socketBufferSize, sizeof(socketBufferSize));&lt;BR /&gt;#else&lt;BR /&gt;        status = setsockopt(i_socket_fd, SOL_SOCKET, SO_SNDBUF,&lt;BR /&gt;                      (char *)&amp;amp;socketBufferSize, sizeof(socketBufferSize));&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;(code sniplets are from different routines in the code. But you'll understand the meaning, I guess)&lt;BR /&gt;&lt;BR /&gt;Willem</description>
    <pubDate>Wed, 22 Jun 2005 03:45:51 GMT</pubDate>
    <dc:creator>Willem Grooters</dc:creator>
    <dc:date>2005-06-22T03:45:51Z</dc:date>
    <item>
      <title>socket_fd routine in DEC C 1.3</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567941#M32323</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have another of these strange behavior on this AXP 1.5 system with version 1.3 of DEC C compiler. I am unable to locate socket_fd routine. I tried using the following in addition to the UCX$IPC while linking.&lt;BR /&gt;CMA$OPEN_LIB_SHR/SHARE&lt;BR /&gt;SYS$SHARE:CMA$OPEN_RTL/SHARE&lt;BR /&gt;SYS$SHARE:CMA$LIB_SHR.EXE/share&lt;BR /&gt;SYS$SHARE:CMA$RTL.EXE/SHARE&lt;BR /&gt;SYS$SHARE:DECC$SHR.EXE/SHARE&lt;BR /&gt;&lt;BR /&gt;I don't see socket_fd in the online help for CC Socket routines. Does it mean that this routine is not available for the version I am using? The OpenSSL toolkit code that I am trying to back port has this call. If this routine is not supported, is there a way of rewriting my code to replace this call?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Malleka</description>
      <pubDate>Tue, 21 Jun 2005 14:07:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567941#M32323</guid>
      <dc:creator>Malleka Ramachandran</dc:creator>
      <dc:date>2005-06-21T14:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: socket_fd routine in DEC C 1.3</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567942#M32324</link>
      <description>The following search:&lt;BR /&gt;&lt;BR /&gt;$ search/format=nonulls sys$library:decc$shr.exe decc$socket_fd&lt;BR /&gt;&lt;BR /&gt;should turn up something.  If it doesn't, you don't have the function.  &lt;BR /&gt;&lt;BR /&gt;If it's in the library, it's possible this very old compiler doesn't know it needs to be prefixed, so you could experiment with /PREFIX qualifier on the compiler or stick a &lt;BR /&gt;&lt;BR /&gt;#define socket_fd decc$socket_fd&lt;BR /&gt;&lt;BR /&gt;somewhere in the code.&lt;BR /&gt;&lt;BR /&gt;This function, as I understand it, is a VMS extension that translates a channel number into a socket descriptor.  I think the only way to code around it would be to use standard socket routines from the outset so there are never any VMS channel numbers to be dealt with.</description>
      <pubDate>Tue, 21 Jun 2005 19:18:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567942#M32324</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2005-06-21T19:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: socket_fd routine in DEC C 1.3</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567943#M32325</link>
      <description>VERY OLD compiler (and VERY OLD VMS version)!&lt;BR /&gt;&lt;BR /&gt;I have run into the opposite, where older versions oc the C-compiler (before 6.0) defined these themselves. The data is not included in the libraries on older VMS / Compiler versions - that is: prior to C 6.0&lt;BR /&gt;&lt;BR /&gt;So you may need to define (to make it C-version dependent):&lt;BR /&gt;&lt;BR /&gt;Macro's:&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;typedef int fd_set; &lt;BR /&gt;#define FD_SET(n,p)     (*p|= (1&amp;lt;&lt;N&gt;&lt;/N&gt;#define FD_CLR(n,p)     (*p&amp;amp;= ~(1&amp;lt;&lt;N&gt;&lt;/N&gt;#define FD_ISSET(n,p)   (*p &amp;amp; (1&amp;lt;&lt;N&gt;&lt;/N&gt;#define FD_ZERO(p)      (*p= 0L)&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;Static data:&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;static int  socket_fd;&lt;BR /&gt;#else&lt;BR /&gt;static int  i_socket_fd;&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;and code-contructs as:&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;            if (ReturnCode == FAIL)  send(socket_fd,"-999",4,0);&lt;BR /&gt;            shutdown(socket_fd,2);&lt;BR /&gt;            close(socket_fd);&lt;BR /&gt;#else&lt;BR /&gt;            if (ReturnCode == FAIL)  send(i_socket_fd,"-999",4,0);&lt;BR /&gt;            shutdown(i_socket_fd,2);&lt;BR /&gt;            close(i_socket_fd);&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;        socket_fd = socket(UCX$C_AUXS,0,0);&lt;BR /&gt;        if (socket_fd == -1) {&lt;BR /&gt;#else&lt;BR /&gt;        i_socket_fd = socket(UCX$C_AUXS,0,0);&lt;BR /&gt;        if (i_socket_fd == -1) {&lt;BR /&gt;#endif&lt;BR /&gt;...&lt;BR /&gt;#if __DECC_VER &amp;lt; 60000000&lt;BR /&gt;        status = setsockopt(socket_fd, SOL_SOCKET, SO_SNDBUF,&lt;BR /&gt;                      (char *)&amp;amp;socketBufferSize, sizeof(socketBufferSize));&lt;BR /&gt;#else&lt;BR /&gt;        status = setsockopt(i_socket_fd, SOL_SOCKET, SO_SNDBUF,&lt;BR /&gt;                      (char *)&amp;amp;socketBufferSize, sizeof(socketBufferSize));&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;(code sniplets are from different routines in the code. But you'll understand the meaning, I guess)&lt;BR /&gt;&lt;BR /&gt;Willem</description>
      <pubDate>Wed, 22 Jun 2005 03:45:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567943#M32325</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2005-06-22T03:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: socket_fd routine in DEC C 1.3</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567944#M32326</link>
      <description>attached file may be helpfull as well, to be included where needed (rename socket.h)&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jun 2005 03:50:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/socket-fd-routine-in-dec-c-1-3/m-p/3567944#M32326</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2005-06-22T03:50:09Z</dc:date>
    </item>
  </channel>
</rss>

