From 41dd733ca7123c9ac4bfc6c781697a660e95b052 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Sat, 4 Apr 2026 19:22:04 +0300 Subject: feat: finish ghostty pane backend integration --- vendor/libghostty-vt/src/pty.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 vendor/libghostty-vt/src/pty.c (limited to 'vendor/libghostty-vt/src/pty.c') diff --git a/vendor/libghostty-vt/src/pty.c b/vendor/libghostty-vt/src/pty.c new file mode 100644 index 00000000..fe50d2b4 --- /dev/null +++ b/vendor/libghostty-vt/src/pty.c @@ -0,0 +1,40 @@ +#if defined(__FreeBSD__) + + #include // ioctl and constants + #include // openpty + #include // ptsname_r + #include // tcgetpgrp + +#elif defined(__linux__) + + #define _GNU_SOURCE // ptsname_r + #include // openpty + #include // ptsname_r + #include // ioctl and constants + #include // tcgetpgrp, setsid + +#elif defined(__APPLE__) + + #include // ioctl and constants + #include // ioctl and constants for TIOCPTYGNAME + #include + #include // tcgetpgrp + #include // openpty + + #ifndef tiocsctty + #define tiocsctty 536900705 + #endif + + #ifndef tiocswinsz + #define tiocswinsz 2148037735 + #endif + + #ifndef tiocgwinsz + #define tiocgwinsz 1074295912 + #endif + +#else + + #error "unsupported platform" + +#endif -- cgit v1.2.3