aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdeps/try_nsgetexecutablepath.c
blob: e2599ccb36b805a58164e21974a4995dd23bd89e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE

#include <stdint.h>
#include <mach-o/dyld.h>

int main (void)
{
  char buf[1024] ;
  uint32_t len = sizeof(buf) ;
  return _NSGetExecutablePath(buf, &len) >= 0 ;
}