17 Commits

Author SHA1 Message Date
Allan Odgaard
f66788f4a7 Use non-deprecated API to obtain socket from privileged launch daemon 2020-04-23 12:25:11 +07:00
Allan Odgaard
b7c6720074 Don’t go through wrappers for unlink, copyfile, and access
The wrappers doesn’t add anything useful in this context.
2020-04-21 15:05:50 +07:00
Allan Odgaard
9078ae7771 Use __DATE__ instead of (custom) COMPILE_DATE macro
I prefer the YYYY-MM-DD format of our custom macro, but it has a problem with precompiled headers in that the macro changes value daily, and so, if specified when precompiling headers, they become invalid the next day.

Previously we solved it by declaring the macro only for application targets, but the new build system is not hierarchical in the same way and does not currently support this.
2019-06-26 23:32:54 +02:00
mathbunnyru
440414f96c Use nullptr in all C++ files instead of NULL
This brings us a bit of extra type safety, for example where an integer is expected, nullptr should be disallowed by the compiler (unlike NULL).
2016-10-22 21:40:14 +07:00
Allan Odgaard
7e01d3d153 Exit with EX_NOPERM instead of calling abort()
The latter will create a crash report so we should not use it for something that might happen due to incorrect usage.
2016-09-10 13:36:38 +02:00
Allan Odgaard
b0c77ff656 Fix minor whitespace issues 2016-08-29 12:44:15 +02:00
Allan Odgaard
46fb745bbe Use perrorf when printing errors with dynamic strings
Also revise error messages to be more consistent.
2016-08-28 17:25:26 +02:00
Allan Odgaard
417193e089 Update link dependencies for all targets
Some targets were including headers from frameworks not specified in their link dependencies. For a clean build this could cause an issue because the header was not available at the time of building the target.

The updated link dependencies are also based on what a target’s tests require. Ideally tests would have separate link dependencies, but as we don’t want to maintain this manually, this will have to wait until the build system automatically handles link dependencies.

Currently the commit command uses constants from the CommitWindow framework but should actually not be linked with it. However, the optimizer will strip dead code, so it should not result in much if any difference in the resulting binary and does solve a build dependency issue.
2016-05-07 13:00:55 +02:00
Allan Odgaard
f16e83fb4f Get rid of APP_REVISION
This was just mirroring the last part of our version number so redundant and it wasn’t monotonically increasing as we switched from alpha.n → beta.1 (with n > 1), so it probably did more harm than good.
2014-10-30 20:49:10 +01:00
Allan Odgaard
421f087b18 Do not destroy shared authorization rights
Each time we used an authorization right in the privileged helper tool, TextMate would lose the right since the helper tool destroyed it after use.
2014-07-30 17:40:23 +02:00
Allan Odgaard
6359a2ef7c Use symbolic exit success/failure constants 2014-04-21 17:05:35 +07:00
Allan Odgaard
69c83e56df The ‘const’ keyword should be to the right of its type
The standard doesn’t care which side the keyword is placed on, but placing it on the right makes it easier to read types.

E.g. reading “int const* const” from right to left we get “const pointer to const integer”.
2014-03-31 08:27:19 +07:00
Allan Odgaard
2c20ab23b0 Ask for maximum queue length for pending socket connections
This is mainly because the SOMAXCONN constant looks better (in the source) than some arbitrarily chosen number. The constant is presently defined as 128 so it doesn’t seem wasteful, and presumably the queue will only take up space if we are not actually responding to socket connections.
2014-03-23 22:47:16 +07:00
Allan Odgaard
6d6c3e4de6 Use path::is_absolute instead of custom code 2013-02-25 15:25:17 +01:00
Allan Odgaard
49ae19c527 Keep (installed) auth server up-to-date
The recent move to 64 bit broke the (binary) protocol used between TextMate and the server for authenticated reads/writes (since size_t is now 64 bit).

This fixes issue #354.
2012-08-31 23:16:39 +02:00
Allan Odgaard
cbe91ff831 Assume compiler support for explicit keyword
Since we require a fairly recent clang for other features, there is no reason to test for this one.
2012-08-29 14:27:35 +02:00
Allan Odgaard
9894969e67 Initial commit 2012-08-09 16:25:56 +02:00