From f3ca432df308842637feef2ae3da0cd37acd4ddd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 17 Jan 2009 09:24:00 +0100 Subject: [PATCH] Update use of API that has changed in MacOS X 10.4. --- ChangeLog | 6 ++++++ lib/progreloc.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10f07bc2b5..6bb652e2d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-17 Bruno Haible + + Update use of _NSGetExecutablePath after API change in MacOS X 10.4. + * lib/progreloc.c (find_executable): Fix type of pointer passed to + _NSGetExecutablePath. + 2009-01-16 Jim Meyering strerror: avoid warnings about discarding "const" diff --git a/lib/progreloc.c b/lib/progreloc.c index 0eaad38559..a79ef7a2c9 100644 --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -1,5 +1,5 @@ /* Provide relocatable programs. - Copyright (C) 2003-2008 Free Software Foundation, Inc. + Copyright (C) 2003-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or modify @@ -196,10 +196,10 @@ find_executable (const char *argv0) #endif #if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH /* On MacOS X 10.2 or newer, the function - int _NSGetExecutablePath (char *buf, unsigned long *bufsize); + int _NSGetExecutablePath (char *buf, uint32_t *bufsize); can be used to retrieve the executable's full path. */ char location[4096]; - unsigned long length = sizeof (location); + unsigned int length = sizeof (location); if (_NSGetExecutablePath (location, &length) == 0 && location[0] == '/') return canonicalize_file_name (location); -- 2.30.2