Files
Claude 579fc9a706 Add SSH to the Windows 95 build
The win32-picolibc build (Windows 95, 98, ME, NT 4.0 and later) now has
libssh and mbedTLS, as the other builds do. DMODEM_GUI_SSH is ON for
every build.

- mbedTLS: CryptGenRandom of CryptoAPI, found at run time, in place of
  BCryptGenRandom (Vista) before Vista; picolibc's gmtime_r and the
  Windows zeroize in place of gmtime_s and memset_s.
- libssh: SHGetSpecialFolderPathA (IE4 shell), if_nametoindex (Vista) and
  WSAStringToAddressA (Winsock 2) found at run time before Vista, with
  USERPROFILE and inet_addr in their place; picolibc build flags and a
  <direct.h>.
- gai_strerrorA with FormatMessageA (mingw-w64's calls FormatMessageW).
- agent.c: strcasecmp for _stricmp on picolibc.

The app still imports only DLLs that every Windows 95 has; the 9x and
NT 4.0 import checks pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRhKGCaYUyYtH7Boap
2026-11-20 10:44:54 +00:00

19 lines
561 B
C

/*
* SPDX-License-Identifier: AGPL-3.0-only
* Copyright (C) 2026 D-Modem Authors
*
* direct.h - for libssh on picolibc (the Windows 95 build of clang-retro),
* which has no <direct.h>: the names of Microsoft's C library
* that libssh's misc.c uses, as picolibc's POSIX functions.
*/
#ifndef DMODEM_PICOLIBC_DIRECT_H
#define DMODEM_PICOLIBC_DIRECT_H
#include <unistd.h>
#include <sys/stat.h>
#define _mkdir(path) mkdir((path), 0700)
#define _access access
#define _stat stat
#define _S_IFDIR S_IFDIR
#define _S_IWRITE S_IWUSR
#endif