Mercurial > hg > xemacs-beta
comparison src/sysdll.c @ 5495:1f0b15040456
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 May 2011 18:44:03 +0100 |
parents | 4dee0387b9de |
children | 5d5aeb79edb4 |
comparison
equal
deleted
inserted
replaced
5494:861f2601a38b | 5495:1f0b15040456 |
---|---|
4 | 4 |
5 Author: William Perry <wmperry@aventail.com> | 5 Author: William Perry <wmperry@aventail.com> |
6 | 6 |
7 This file is part of XEmacs. | 7 This file is part of XEmacs. |
8 | 8 |
9 XEmacs is free software; you can redistribute it and/or modify it | 9 XEmacs is free software: you can redistribute it and/or modify it |
10 under the terms of the GNU General Public License as published by the | 10 under the terms of the GNU General Public License as published by the |
11 Free Software Foundation; either version 2, or (at your option) any | 11 Free Software Foundation, either version 3 of the License, or (at your |
12 later version. | 12 option) any later version. |
13 | 13 |
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT | 14 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
17 for more details. | 17 for more details. |
18 | 18 |
19 You should have received a copy of the GNU General Public License | 19 You should have received a copy of the GNU General Public License |
20 along with XEmacs; see the file COPYING. If not, write to the Free | 20 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
21 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
22 02111-1307, USA. */ | |
23 | 21 |
24 /* This file has been Mule-ized, Ben Wing, 1-26-10. */ | 22 /* This file has been Mule-ized, Ben Wing, 1-26-10. */ |
25 | 23 |
26 #ifdef HAVE_CONFIG_H | 24 #ifdef HAVE_CONFIG_H |
27 #include <config.h> | 25 #include <config.h> |
343 | 341 |
344 return mh; | 342 return mh; |
345 } | 343 } |
346 | 344 |
347 /* | 345 /* |
348 * dyld adds libraries by first adding the directly dependant libraries in | 346 * dyld adds libraries by first adding the directly dependent libraries in |
349 * link order, and then adding the dependencies for those libraries, so we | 347 * link order, and then adding the dependencies for those libraries, so we |
350 * should do the same... but we don't bother adding the extra dependencies, if | 348 * should do the same... but we don't bother adding the extra dependencies, if |
351 * the symbols are neither in the loaded image nor any of it's direct | 349 * the symbols are neither in the loaded image nor any of it's direct |
352 * dependencies, then it probably isn't there. | 350 * dependencies, then it probably isn't there. |
353 */ | 351 */ |
366 if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) | 364 if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) |
367 { | 365 { |
368 struct mach_header *wh; | 366 struct mach_header *wh; |
369 | 367 |
370 if ((wh = (struct mach_header *) | 368 if ((wh = (struct mach_header *) |
371 my_find_image((Rawbyte *) | 369 my_find_image((const Chbyte *) |
372 (((struct dylib_command *) lc)-> | 370 (((struct dylib_command *) lc)-> |
373 dylib.name.offset + (Rawbyte *) lc)))) | 371 dylib.name.offset + (const Chbyte *) lc)))) |
374 { | 372 { |
375 Extbyte *symext = | 373 Extbyte *symext = |
376 ITEXT_TO_EXTERNAL (symbol, Qdll_symbol_encoding); | 374 ITEXT_TO_EXTERNAL (symbol, Qdll_symbol_encoding); |
377 if (NSIsSymbolNameDefinedInImage (wh, symext)) | 375 if (NSIsSymbolNameDefinedInImage (wh, symext)) |
378 { | 376 { |
440 Extbyte *next; | 438 Extbyte *next; |
441 | 439 |
442 MAYBE_PREPEND_UNDERSCORE (n); | 440 MAYBE_PREPEND_UNDERSCORE (n); |
443 next = ITEXT_TO_EXTERNAL (n, Qdll_variable_name_encoding); | 441 next = ITEXT_TO_EXTERNAL (n, Qdll_variable_name_encoding); |
444 | 442 |
445 sym = NSLookupSymbolInModule ((NSModule) h, n); | 443 sym = NSLookupSymbolInModule ((NSModule) h, (const Chbyte *)n); |
446 if (sym == 0) return 0; | 444 if (sym == 0) return 0; |
447 return (dll_var) NSAddressOfSymbol (sym); | 445 return (dll_var) NSAddressOfSymbol (sym); |
448 } | 446 } |
449 | 447 |
450 Lisp_Object | 448 Lisp_Object |