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
}
nroe 2013-09-06Disable some options in terminalsJune McEnroe 2013-09-05Only set colorscheme for gvimJune McEnroe 2013-08-17Add vim-ragtagJune McEnroe 2013-06-08Update base16-vimJune McEnroe 2013-06-07Switch to my own fork of base16-vimJune McEnroe 2013-05-24Indent compojure correctlyJune McEnroe 2013-05-23Remove vim-clojure-staticJune McEnroe 2013-05-23Replace VimClojure with vim-clojure-staticJune McEnroe 2013-05-18Do not run gitgutter eagerlyJune McEnroe 2013-05-15Remove tabularJune McEnroe 2013-05-15Use long names for all settingsJune McEnroe 2013-05-15Add vim-gitgutterJune McEnroe 2013-04-23Remove unused pluginsJune McEnroe 2013-04-23Switch to base16-default colorschemeJune McEnroe 2013-03-26Replace nerdcommenter with vim-commentaryJune McEnroe 2013-03-24Add paredit.vimJune McEnroe 2013-03-14Update base16-vimJune McEnroe 2013-03-12Hide mode from below statuslineJune McEnroe 2013-03-12Switch to powerlineJune McEnroe 2013-03-12Remove vim-powerlineJune McEnroe 2013-02-03Update base16 and refheapJune McEnroe 2013-02-03Ignore plugin/private.vimJune McEnroe 2012-09-29Disable GUI dialogsJune McEnroe