summary refs log tree commit diff
path: root/compat/getprogname_linux.c
blob: 1850e8666b1f84c0ef0e6738ef689ae14d2738d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdlib.h>

#include <errno.h>

const char *
getprogname(void)
{
#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
	/*
	 * Android added getprogname with API 21, so we should not end up here
	 * with APIs newer than 21.
	 * https://github.com/aosp-mirror/platform_bionic/blob/1eb6d3/libc/include/stdlib.h#L160
	 *
	 * Since Android is using portions of OpenBSD libc, it should have
	 * a symbol called __progname.
	 * https://github.com/aosp-mirror/platform_bionic/commit/692207
	 */
	extern const char *__progname;
	return __progname;
#else
	return program_invocation_short_name;
#endif
}
it/image.c?id=5e1eef754cb3a09f083577d3e934af583a56337d&follow=1'>madvise MADV_NOCORE in imageJune McEnroe 2019-01-07Add license notice to explore JavaScriptJune McEnroe 2019-01-07Add Q/Home binding in exploreJune McEnroe 2019-01-07Fix explore image URLJune McEnroe 2019-01-07Add HOME button, ssh link, AGPL notice to exploreJune McEnroe 2019-01-06Add meta viewport to exploreJune McEnroe 2019-01-06Set background and max-width in exploreJune McEnroe 2019-01-06Swallow writes after the connection is closedJune McEnroe 2019-01-06Handle KCGI_HUPJune McEnroe 2019-01-06Install html filesJune McEnroe