[vim/vim] Add AmigaOS 3.x (classic 68k) build support (PR #19840)

2 views
Skip to first unread message

Duncan

unread,
Mar 26, 2026, 10:34:31 PM (8 hours ago) Mar 26
to vim/vim, Subscribed

Summary

  • Add classic AmigaOS 3.x (68k) as a build target in Make_ami.mak alongside existing OS4/MorphOS/AROS targets
  • Fix several bugs in os_amiga.c that affect all Amiga targets (volume requester suppression, file handle leak)
  • Add stubs for functions not available in the libnix C runtime

Motivation

Vim was originally released on the Amiga (Fred Fish Disk 591, 1991). The Amiga code in os_amiga.c has been maintained continuously for 35 years, but the last working build for classic 68k AmigaOS was Vim 5.8 circa 1998.

This patch enables building Vim 9.1 on AmigaOS 3.x using the bebbo cross-compiler and libnix (-noixemul) runtime. The resulting binary runs on A1200, A4000, and accelerated A500/A2000 systems.

Build instructions

make -f Make_ami.mak UNM=AmigaOS3 CC=m68k-amigaos-gcc BUILD=normal

Changes

Bug fixes (benefit all Amiga targets):

  • safe_Lock() wrapper suppresses "Please insert volume" system requesters during path probing. Vim probes many paths at startup ($VIM, $VIMRUNTIME, defaults.vim, vimrc). Lock() on a bare name like "vim" triggers an AmigaDOS volume requester that blocks the process.
  • Global pr_WindowPtr = -1 in mch_init() catches Lock()/Open() calls through the C runtime library
  • Close nilfh file handle on error exit in mch_check_win() (prevents permanent handle leak)
  • Fix Delay() prototype for non-LATTICE compilers (already declared in <proto/dos.h>)

OS3-specific additions (conditionally compiled):

  • 256 KiB __stack cookie (conservative for systems with 2-4 MiB RAM)
  • fchown/fchmod/ftruncate no-op stubs (not in libnix)
  • gethostname() fallback (not in libnix)
  • IM function stubs, mch_rmdir(), getpwuid()/getgrgid()/getuid() stubs

Build system:

  • blowfish.c: Accept WORDS_BIGENDIAN or AMIGA without HAVE_CONFIG_H
  • xdiff/xmacros.h: Unconditional SIZE_MAX fallback

All OS3-specific code is guarded by:

#if defined(__GNUC__) && defined(AMIGA) && !defined(__amigaos4__) \
    && !defined(__AROS__) && !defined(__MORPHOS__)

Test plan

  • Builds cleanly with bebbo cross-compiler (-Os -m68020 -std=gnu99 -DFEAT_NORMAL)
  • 23 automated tests passing on FS-UAE with Workbench 3.1
  • Interactive editing verified (open, insert, save, quit, search, split windows)
  • No impact on existing OS4/MorphOS/AROS builds (all changes are conditionally compiled)
  • Verify no regression on OS4/MorphOS/AROS targets (I only have 68k test infrastructure)

Generated with Claude Code


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19840

Commit Summary

  • 3a167cf Add AmigaOS 3.x (classic 68k) build support

File Changes

(6 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19840@github.com>

Duncan

unread,
Mar 26, 2026, 10:41:35 PM (8 hours ago) Mar 26
to vim/vim, Push

@bdgscotland pushed 1 commit.

  • d658a3a Add AmigaOS 3.x (classic 68k) build support


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19840/before/3a167cf844afb5e0df028c8d03ae865730b5e360/after/d658a3afe2522f5d3821e74758ec741a22a092a9@github.com>

Duncan

unread,
Mar 26, 2026, 10:43:42 PM (7 hours ago) Mar 26
to vim/vim, Subscribed
bdgscotland left a comment (vim/vim#19840)

Binary and porting story here: https://amiport.platesteel.net/packages.html?name=vim


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19840/c4139743049@github.com>

Reply all
Reply to author
Forward
0 new messages