weston/shared
Pekka Paalanen 1da1b8f3f1 Rewrite shm buffer file allocation v2
We had duplicated code in many places, using hardcoded paths for
temporary files into more than one path. Some cases did not bother with
O_CLOEXEC, and all hardcoded paths that might not exist.

Add an OS helper function for creating a unique anonymous file with
close-on-exec semantics. The helper uses $XDG_RUNTIME_DIR as the
directory for a file.

This patch unifies the buffer file creation in both Weston and the
clients.

As simple clients are better not linking to libshared, as it would
require e.g. Cairo, they pull the OS compatibility code directly.

Android does not have mkostemp(), so a configure test is added for it,
and a fallback used if it is not available.

Changes in v2:
	remove all the alternate possible directory definitions and use
	XDG_RUNTIME_DIR only, and fail is it is not set.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06 13:26:30 -04:00
..
cairo-util.c Share code to to classify pointer location in frame 2012-05-22 16:38:53 -04:00
cairo-util.h Share code to to classify pointer location in frame 2012-05-22 16:38:53 -04:00
config-parser.c config-parser: add missing return for an error case 2012-04-17 14:33:30 +03:00
config-parser.h Fix a few -pedantic warnings 2012-05-10 14:11:44 -04:00
image-loader.c Fix a few -pedantic warnings 2012-05-10 14:11:44 -04:00
Makefile.am compositor: work around missing SOCK_CLOEXEC 2012-05-31 13:52:20 -04:00
option-parser.c Add an option parser 2012-03-12 01:28:50 -04:00
os-compatibility.c Rewrite shm buffer file allocation v2 2012-06-06 13:26:30 -04:00
os-compatibility.h Rewrite shm buffer file allocation v2 2012-06-06 13:26:30 -04:00