Allan Odgaard
398e55cdbe
Add helper functions to get OS version
...
We need this in a few places and while calling Gestalt() isn’t that much code, that function is deprecated in 10.8 and the alternative is a lot more code, so we don’t want to repeat that once we update the code.
2013-03-17 15:44:06 +01:00
Allan Odgaard
d18b30f280
Remove oak::lock_t and oak::mutex_t
2013-03-13 12:37:21 +01:00
Allan Odgaard
13edc6d131
Use O_CLOEXEC when opening files
...
This avoids leaking file descriptors into child processes, which would otherwise happen if another thread forks while the file descriptor is open.
2013-03-10 16:07:10 +01:00
Allan Odgaard
090a6ac698
Increase queue size for test (web) server
...
With concurrent tests and sequential handling of requests, the queue size is likely to grow to “number of concurrent tests”.
2013-03-10 16:07:10 +01:00
Allan Odgaard
eb893105e4
Disallow copying test::jail_t
...
Since we delete the jailed directory in the destructor we can’t support a deep copy of this type. Since we don’t need it, and it’s just a type used in tests, I opted for simply disabling this (to get a compiler error, should it be attempted) rather than introduce the necessary code to allow shallow copies.
2013-02-25 15:26:41 +01:00
Allan Odgaard
4712515e8b
Allow passing a window to OakSetupApplicationWithView
...
Should rename the function to reflect this new flexibility.
2013-02-04 19:38:31 +01:00
Allan Odgaard
701c9a0541
Use ‘std’ namespace prefix when calling search()
...
This is to avoid a clash with other things named ‘search’.
2012-12-28 02:47:19 +01:00
Allan Odgaard
452c0b3889
Make cocoa.h usable with ARC
...
This means removing a few autoreleases so it’ll leak when building without ARC, but as this is just for a short-lived test, it shouldn’t matter.
2012-09-24 20:58:42 +02:00
Allan Odgaard
a94e89d7be
Remove code for beginof/endof
2012-09-20 12:22:21 +02:00
Allan Odgaard
0f3861fec7
Retire custom begin/endof functions
...
We can now use std::begin/end although for containers we explicitly call the member functions.
2012-09-20 12:22:21 +02:00
Allan Odgaard
45c87c47f8
Rename CocoaSTL.h → objc_ptr.h
2012-09-20 12:22:20 +02:00
Allan Odgaard
4273bf968b
Get rid of C++ style NSIndexSet iteration
2012-09-20 12:22:19 +02:00
Allan Odgaard
2739b4cf20
Remove unused stuff from CocoaSTL.h
2012-09-20 12:22:19 +02:00
Allan Odgaard
45fdb380ea
Extend std::string’s lifetime for safe use of c_str
...
20% of reported crashes are in launch_tbz which indirectly call oak::c_array. My hunch is that the c_str buffer is overwritten because the std::string which returned it has been disposed, this makes strdup() do a bad allocation / memory read.
This would likely be a race condition (wrt. the c_str buffer) and coincidentally the oak::c_array is called in a thread (when it crashes).
2012-09-16 11:41:24 +02:00
Allan Odgaard
b2acb02a7f
Use std::function with cf::callback_t
2012-09-09 16:22:19 +02:00
Allan Odgaard
0e96a04d76
Remove compatibility checks
...
Since we now require 10.7 we don’t need all of this. Keeping it around is just noise that can lead to confusion about code paths.
2012-08-29 16:02:29 +02:00
Jacob Bandes-Storch
c5520a6919
Use libc++: replace typeof with decltype
2012-08-28 13:30:21 +02:00
Jacob Bandes-Storch
e3aa997b06
Use libc++: replace std::tr1 with std
2012-08-28 13:30:20 +02:00
Allan Odgaard
485bdde0f7
Move oak::c_array to oak/datatypes.h
...
This simple wrapper is useful in a few places so we shouldn’t need to depend on the OakSystem framework in order to use it.
2012-08-11 19:21:28 +02:00
Allan Odgaard
9894969e67
Initial commit
2012-08-09 16:25:56 +02:00