build: define ssize_t for MSVC in ghostty.h

MSVC's <sys/types.h> does not define ssize_t (it is a POSIX type).
This causes the translate-c build step to fail when translating
ghostty.h on Windows. Use SSIZE_T from <BaseTsd.h> which is the
Windows SDK equivalent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alessandro De Blasis
2026-03-24 16:35:49 +01:00
parent d5aef6e845
commit a35f84db32

View File

@@ -17,6 +17,11 @@ extern "C" {
#include <stdint.h>
#include <sys/types.h>
#ifdef _MSC_VER
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
//-------------------------------------------------------------------
// Macros