[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
relocatable: update for MacOS X 10.4
From: |
Bruno Haible |
Subject: |
relocatable: update for MacOS X 10.4 |
Date: |
Sat, 17 Jan 2009 09:26:23 +0100 |
User-agent: |
KMail/1.9.9 |
The function _NSGetExecutablePath was declared as
int _NSGetExecutablePath (char *buf, unsigned long *bufsize);
in MacOS X 10.3, but is declared as
int _NSGetExecutablePath (char *buf, uint32_t *bufsize);
in MacOS X 10.4 and newer. This leads to a warning in progreloc.c,
indicating a bug when compiled in 64-bit mode. (MacOS X 10.3 did
not support 64-bit mode.)
This fixes it.
2009-01-17 Bruno Haible <address@hidden>
Update use of _NSGetExecutablePath after API change in MacOS X 10.4.
* lib/progreloc.c (find_executable): Fix type of pointer passed to
_NSGetExecutablePath.
--- lib/progreloc.c.orig 2009-01-17 09:18:41.000000000 +0100
+++ lib/progreloc.c 2009-01-17 09:11:50.000000000 +0100
@@ -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 <address@hidden>, 2003.
This program is free software: you can redistribute it and/or modify
@@ -196,10 +196,10 @@
#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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- relocatable: update for MacOS X 10.4,
Bruno Haible <=