diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-04-02 06:02:35 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-04-02 06:02:35 +0000 |
| commit | 200a70765a503fc94b546e5a52fdd90a59eee3b3 (patch) | |
| tree | 343e317b83e45454239cdb50a50b3649bcdc174f /src/sysdeps/try_nsgetexecutablepath.c | |
| parent | 56ab53289c60c6fbb06f8d548d353535d5ed1140 (diff) | |
| download | skalibs-200a70765a503fc94b546e5a52fdd90a59eee3b3.tar.gz | |
Add sagetexecname() and all the necessary infrastructure
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/sysdeps/try_nsgetexecutablepath.c')
| -rw-r--r-- | src/sysdeps/try_nsgetexecutablepath.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sysdeps/try_nsgetexecutablepath.c b/src/sysdeps/try_nsgetexecutablepath.c new file mode 100644 index 0000000..e2599cc --- /dev/null +++ b/src/sysdeps/try_nsgetexecutablepath.c @@ -0,0 +1,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 ; +} |
