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