Files
LisherSong--ps5-web-file-ma…/tests/mingw_host.h
T
Songlx516 5cb0b76e7a Initial import of PS5 Web File Manager v1.7
Homebrew HTTP file manager payload for jailbroken PS5 consoles (x86_64-sie-ps5,
title id FMGR88888). Browse, edit, upload, download and extract ZIPs through
any browser on the LAN; single self-contained ELF, no external services.

Highlights (v1.7):
- ZIP large-file profile (large=1): 2 TiB total / 1 TiB per entry / 1000:1
  ratio. Frontend prompts for confirmation whenever archive > 60 GiB on disk.
- Default ZIP profile stays safe: 512 GiB / 64 GiB / 200:1.
- 69 host-side C tests (tests/run-tests.sh) covering traversal, ZIP64,
  encryption rejection, conflict policies and the large-file profile.
- Three-phase extraction engine (scan -> extract -> publish -> cleanup) with
  atomic staging + rename, located in src/zip_extract.{c,h}.

Project layout:
  src/          C payload sources
  assets/       HTML / CSS / JS / icons / param.json
  tests/        POSIX/host test suite + fixtures
  third_party/  vendored zlib + minizip-ng (zlib license)
  docs/screenshots/  README screenshot images
  LICENSE       GPLv3+

Build:
  make         # cross-compile with PS5_PAYLOAD_SDK
  make linux   # Linux host binary for UI dev
2026-09-04 14:21:15 +08:00

34 lines
718 B
C

/* Host-only shim used to build minizip-ng's POSIX backend on MinGW.
mz_os_posix.c needs utime(), lstat(), symlink() and readlink(); Windows has
none of them. The stubs are only compiled into the host test binary. */
#ifndef WFM_TEST_MINGW_HOST_H
#define WFM_TEST_MINGW_HOST_H
#include "posix_compat.h"
#if defined(__MINGW32__) || defined(_WIN32)
#include <sys/utime.h>
static int __attribute__((unused))
symlink(const char *target, const char *linkpath) {
(void)target;
(void)linkpath;
errno = ENOSYS;
return -1;
}
static ssize_t __attribute__((unused))
readlink(const char *path, char *buf, size_t size) {
(void)path;
(void)buf;
(void)size;
errno = ENOSYS;
return -1;
}
#endif
#endif