Commit Graph

145 Commits

Author SHA1 Message Date
Nicholas Marriott
775789fbd5 Rename header guards on compat/queue.h to avoid it conflicting if the system
header is included first. This matters on some platforms (macOS) where queue.h
is old. From Saagar Jha in GitHub issue 4041.
2024-08-04 09:57:26 +01:00
Nicholas Marriott
3823fa2c57 Send SIGHUP since some programs ignore SIGTERM, from Eduardo Grajeda in GitHub
issue 3958.
2024-04-30 12:38:58 +01:00
Nicholas Marriott
dd4c0109a9 Missing headers for Android, from Biswapriyo Nath. 2024-04-15 09:07:41 +01:00
Nicholas Marriott
f3f1c3db58 Add missing headers, from Marvin Schmidt. 2024-03-06 21:29:28 +00:00
Nicholas Marriott
55d0abad89 Need htonll and ntohll. 2024-01-17 10:57:32 +00:00
Nicholas Marriott
7d91b4b90b htobe is not portable. 2024-01-17 09:47:35 +00:00
Nicholas Marriott
66369416fc Update imsg. 2024-01-17 09:41:53 +00:00
Nicholas Marriott
b9524f5b72 Add support for spawning panes in separate cgroups with systemd and a configure
flag to disable. From Eric T Johnson yut23 AT gvljohnsons DOT com in GitHub
issue 3514.
2023-04-03 08:54:06 +01:00
Nicholas Marriott
5ce34add77 Do not attempt to connect to the socket as a client if systemd is active, from
Julien Moutinho in GitHub issue 3345.
2022-10-18 15:58:06 +01:00
Nicholas Marriott
19344ec890 Add headers and fix type, from Marvin Schmidt. GitHub issue 3332. 2022-09-19 07:03:17 +01:00
Nicholas Marriott
19344efa78 Fix fallback implementaion of getpeereid, from Pino Toscano. 2022-08-22 08:21:42 +01:00
Nicholas Marriott
be2617036f Remove extra definition of getpeereid. From Eric N Vander Weele in GitHub issue
3209.
2022-06-02 21:45:53 +01:00
Nicholas Marriott
8bcd392ee7 On platforms with no way to get peer UID, use getuid(), also fix some failure
checks.
2022-04-06 16:47:59 +01:00
Nicholas Marriott
fc7f1e7acb Add support for systemd socket activation (where systemd creates the Unix
domain socket for tmux rather than tmux creating it). Build with
--enable-systemd. From Julien Moutinho in GitHub issue 3119.
2022-03-28 08:42:13 +01:00
Nicholas Marriott
04952f15df Use getpeerucred if available (not tested). 2022-03-08 11:35:06 +00:00
Nicholas Marriott
afd9b68d10 Add getpeerid compat. 2022-03-08 11:02:17 +00:00
Nicholas Marriott
0792b65863 Remove compat.h again. 2021-03-08 08:59:13 +00:00
Nicholas Marriott
c01251d023 Merge branch 'master' into 3.2-rc 2021-03-02 12:08:34 +00:00
Nicholas Marriott
e3d71d9bdf Add compat clock_gettime for older macOS. GitHub issue 2555. 2021-02-05 11:01:21 +00:00
Nicholas Marriott
681c0d2bfb Include compat.h after system headers, GitHub issue 2492. 2020-12-07 12:13:20 +00:00
Nicholas Marriott
2f1578ef83 Update closefrom from OpenSSH for macOS code which is now needed. 2020-11-20 09:05:32 +00:00
Nicholas Marriott
bfdc4373d7 Update closefrom from OpenSSH for macOS code which is now needed. 2020-11-17 17:57:21 +00:00
Nicholas Marriott
72c46aa15e Add support for Haiku, from David Carlier. GitHub issue 2453. 2020-11-09 09:00:41 +00:00
Nicholas Marriott
991d5a9c74 Add compat for getdtablesize, GitHub issue 2406. 2020-10-07 09:39:43 +01:00
Nicholas Marriott
3a1fc7315c Add getline compat. 2020-06-18 21:01:55 +01:00
Nicholas Marriott
5423bf6db8 Missing headers from compat/asprintf.c, from cyyever at outlook dot com. 2019-09-08 21:29:22 +01:00
Nicholas Marriott
9f0904ce6f Remove unused fparseln compat code. 2019-05-27 14:28:05 +01:00
Nicholas Marriott
aebb17dc75 Sync imsg from OpenBSD. 2018-04-23 15:40:15 +01:00
Nicholas Marriott
6ce8fe0537 Still need to globfree on failure. 2017-12-27 13:54:37 +00:00
Nicholas Marriott
143ccd27b4 Add memmem to compat. 2017-06-09 08:53:58 +01:00
Nicholas Marriott
78352fdd32 Add a small dance to daemon() to reattach tmux to the user's namespace (which
allows access to the clipboard) on OS X 10.10 and above.

Chis Johnsen has done much work on and documentation of this issue, the code is
copied (with some tweaks) from his reattach-to-user-namespace at:

    https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard

Tested by Enrico Ghirardi.

Will see how this goes, if it breaks stuff it might go away again.
2017-06-06 07:59:53 +01:00
Nicholas Marriott
9420758127 getptmfd() and fdforkpty() compat. 2017-04-20 19:09:07 +01:00
Nicholas Marriott
9583878a7b Accept NULL pointer. 2017-04-12 07:41:11 +01:00
Nicholas Marriott
d720a1487b Update imsg*.c from OpenBSD. 2017-04-11 11:51:25 +01:00
Nicholas Marriott
2e5664d2df Update imsg*.[ch] from OpenBSD, add some compat bits it needs and remove some
bits it doesn't.
2017-03-24 10:05:53 +00:00
Nicholas Marriott
cd7550cdf1 Some __unused. 2017-03-21 19:27:18 +00:00
Nicholas Marriott
640666fb36 Fix some warnings. 2017-03-17 14:55:33 +00:00
Nicholas Marriott
fd96ccfd80 No extra : for errx and warnx. 2017-03-09 16:49:37 +00:00
Nicholas Marriott
b79df1dc29 Compat code for strndup and strnlen. 2017-03-09 15:43:08 +00:00
Nicholas Marriott
514a723f74 Solaris fixes, mostly from Dagobert Michelsen. 2017-03-09 15:39:13 +00:00
Nicholas Marriott
4eabd7ec90 Do not declare program_invocation_short_name because people can't make up their
mind what type it should be.
2017-02-06 13:34:19 +00:00
Nicholas Marriott
c7c1018e9b Update sys/queue.h from OpenBSD. 2017-02-06 10:05:56 +00:00
Nicholas Marriott
3e495b4001 compat/* should not include tmux.h. 2017-01-25 13:49:01 +00:00
Nicholas Marriott
acf331f7f1 Add b64_pton as well. 2017-01-22 19:12:15 +00:00
Nicholas Marriott
178894b0fe Do not force symbols to width 1, from Yen Chi Hsuan. 2016-10-28 19:58:14 +01:00
Nicholas Marriott
e6f7180af1 tmux no longer uses openat() so we can remove the compatibilty function. 2016-10-13 22:17:29 +01:00
Nicholas Marriott
6c94774b70 Add support for using utf8proc with --enable-utf8proc, useful for platforms
(like OS X) where the system implementation is crap. From Joshua Rubin.
2016-09-01 20:40:03 +01:00
Thomas Adam
c10d83b4df __progname -> getprogname()
Fix fallout from recent use of getprogname(), which deprecates __progname.
2016-05-27 20:11:32 +01:00
Nicholas Marriott
cfef0c6658 getprogname() and setproctitle() on Linux. 2016-05-27 18:04:25 +01:00
Nicholas Marriott
e9d369a09e Fixed fgetln(3) implementation (from Joerg Jung) which does not depend on *BSD
fgets(3) semantics.
2016-02-19 13:35:46 +00:00