1 #ifndef LIBSSH2_CONFIG_H
2 #ifdef __VMS
3 
4 #define LIBSSH2_CONFIG_H
5 
6 /* VMS specific libssh2_config.h
7  */
8 
9 #define ssize_t SSIZE_T
10 
11 typedef unsigned int uint32_t ;
12 typedef unsigned int socklen_t; /* missing in headers on VMS */
13 
14 /* Have's */
15 
16 #define HAVE_UNISTD_H
17 #define HAVE_STDLIB_H
18 #define HAVE_INTTYPES_H
19 #define HAVE_SYS_TIME_H
20 #define HAVE_SELECT
21 #define HAVE_UIO
22 
23 #define HAVE_SYS_SOCKET.H
24 #define HAVE_NETINET_IN_H
25 #define HAVE_ARPA_INET_H
26 
27 #define HAVE_GETTIMEOFDAY 1
28 
29 #define POSIX_C_SOURCE
30 
31 /* Enable the possibility of using tracing */
32 
33 #define LIBSSH2DEBUG 1
34 
35 /* For selection of proper block/unblock function in session.c */
36 
37 #define HAVE_FIONBIO
38 
39 #include <stropts.h>
40 
41 /* In VMS TCP/IP Services and some BSD variants SO_STATE retrieves
42  * a bitmask revealing amongst others the blocking state of the
43  * socket. On VMS the bits are undocumented, but  SS_NBIO
44  * works, I did not test the other bits. Below bitdefs are
45  * from Berkely source socketvar.h at
46  * http://ftp.fibranet.cat/UnixArchive/PDP-11/Trees/2.11BSD/sys/h/socketvar.h
47  *  Socket state bits.
48  *  #define SS_NOFDREF          0x001    no file table ref any more
49  *  #define SS_ISCONNECTED      0x002    socket connected to a peer
50  *  #define SS_ISCONNECTING     0x004    in process of connecting to peer
51  *  #define SS_ISDISCONNECTING  0x008    in process of disconnecting
52  *  #define SS_CANTSENDMORE     0x010    can't send more data to peer
53  *  #define SS_CANTRCVMORE      0x020    can't receive more data from peer
54  *  #define SS_RCVATMARK        0x040    at mark on input
55  *  #define SS_PRIV             0x080    privileged for broadcast, raw...
56  *  #define SS_NBIO             0x100    non-blocking ops
57  *  #define SS_ASYNC            0x200    async i/o notify
58  *
59  */
60 
61 #ifdef SO_STATE
62 
63 /* SO_STATE is defined in stropts.h  by DECC
64  * When running on Multinet, SO_STATE renders a protocol
65  * not started error. Functionally this has no impact,
66  * apart from libssh2 not being able to restore the socket
67  * to the proper blocking/non-blocking state.
68  */
69 
70 #define SS_NBIO         0x100
71 
72 #endif
73 
74 /* Use OpenSSL */
75 #define LIBSSH2_OPENSSL 1
76 
77 /* Compile in zlib support. We link against gnv$libzshr, as available
78  * from https://sourceforge.net/projects/vms-ports/files/.
79  */
80 
81 #define LIBSSH2_HAVE_ZLIB
82 
83 /* Enable newer diffie-hellman-group-exchange-sha1 syntax */
84 
85 #define LIBSSH2_DH_GEX_NEW 1
86 
87 #endif /* __VMS */
88 #endif /* LIBSSH2_CONFIG_H */
89