- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- socket_fd routine in DEC C 1.3
Operating System - OpenVMS
1753849
Members
7586
Online
108807
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2005 07:07 AM
тАО06-21-2005 07:07 AM
socket_fd routine in DEC C 1.3
Hello,
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.
CMA$OPEN_LIB_SHR/SHARE
SYS$SHARE:CMA$OPEN_RTL/SHARE
SYS$SHARE:CMA$LIB_SHR.EXE/share
SYS$SHARE:CMA$RTL.EXE/SHARE
SYS$SHARE:DECC$SHR.EXE/SHARE
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?
Thanks,
Malleka
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.
CMA$OPEN_LIB_SHR/SHARE
SYS$SHARE:CMA$OPEN_RTL/SHARE
SYS$SHARE:CMA$LIB_SHR.EXE/share
SYS$SHARE:CMA$RTL.EXE/SHARE
SYS$SHARE:DECC$SHR.EXE/SHARE
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?
Thanks,
Malleka
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2005 12:18 PM
тАО06-21-2005 12:18 PM
Re: socket_fd routine in DEC C 1.3
The following search:
$ search/format=nonulls sys$library:decc$shr.exe decc$socket_fd
should turn up something. If it doesn't, you don't have the function.
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
#define socket_fd decc$socket_fd
somewhere in the code.
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.
$ search/format=nonulls sys$library:decc$shr.exe decc$socket_fd
should turn up something. If it doesn't, you don't have the function.
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
#define socket_fd decc$socket_fd
somewhere in the code.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2005 08:45 PM
тАО06-21-2005 08:45 PM
Re: socket_fd routine in DEC C 1.3
VERY OLD compiler (and VERY OLD VMS version)!
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
So you may need to define (to make it C-version dependent):
Macro's:
#if __DECC_VER < 60000000
typedef int fd_set;
#define FD_SET(n,p) (*p|= (1< #define FD_CLR(n,p) (*p&= ~(1< #define FD_ISSET(n,p) (*p & (1< #define FD_ZERO(p) (*p= 0L)
#endif
Static data:
#if __DECC_VER < 60000000
static int socket_fd;
#else
static int i_socket_fd;
#endif
and code-contructs as:
#if __DECC_VER < 60000000
if (ReturnCode == FAIL) send(socket_fd,"-999",4,0);
shutdown(socket_fd,2);
close(socket_fd);
#else
if (ReturnCode == FAIL) send(i_socket_fd,"-999",4,0);
shutdown(i_socket_fd,2);
close(i_socket_fd);
#endif
...
#if __DECC_VER < 60000000
socket_fd = socket(UCX$C_AUXS,0,0);
if (socket_fd == -1) {
#else
i_socket_fd = socket(UCX$C_AUXS,0,0);
if (i_socket_fd == -1) {
#endif
...
#if __DECC_VER < 60000000
status = setsockopt(socket_fd, SOL_SOCKET, SO_SNDBUF,
(char *)&socketBufferSize, sizeof(socketBufferSize));
#else
status = setsockopt(i_socket_fd, SOL_SOCKET, SO_SNDBUF,
(char *)&socketBufferSize, sizeof(socketBufferSize));
#endif
(code sniplets are from different routines in the code. But you'll understand the meaning, I guess)
Willem
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
So you may need to define (to make it C-version dependent):
Macro's:
#if __DECC_VER < 60000000
typedef int fd_set;
#define FD_SET(n,p) (*p|= (1<
#endif
Static data:
#if __DECC_VER < 60000000
static int socket_fd;
#else
static int i_socket_fd;
#endif
and code-contructs as:
#if __DECC_VER < 60000000
if (ReturnCode == FAIL) send(socket_fd,"-999",4,0);
shutdown(socket_fd,2);
close(socket_fd);
#else
if (ReturnCode == FAIL) send(i_socket_fd,"-999",4,0);
shutdown(i_socket_fd,2);
close(i_socket_fd);
#endif
...
#if __DECC_VER < 60000000
socket_fd = socket(UCX$C_AUXS,0,0);
if (socket_fd == -1) {
#else
i_socket_fd = socket(UCX$C_AUXS,0,0);
if (i_socket_fd == -1) {
#endif
...
#if __DECC_VER < 60000000
status = setsockopt(socket_fd, SOL_SOCKET, SO_SNDBUF,
(char *)&socketBufferSize, sizeof(socketBufferSize));
#else
status = setsockopt(i_socket_fd, SOL_SOCKET, SO_SNDBUF,
(char *)&socketBufferSize, sizeof(socketBufferSize));
#endif
(code sniplets are from different routines in the code. But you'll understand the meaning, I guess)
Willem
Willem Grooters
OpenVMS Developer & System Manager
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2005 08:50 PM
тАО06-21-2005 08:50 PM
Re: socket_fd routine in DEC C 1.3
attached file may be helpfull as well, to be included where needed (rename socket.h)
Willem Grooters
OpenVMS Developer & System Manager
OpenVMS Developer & System Manager
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP