/[cmucl]/src/code/foreign.lisp
ViewVC logotype

Diff of /src/code/foreign.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by dtc, Tue Nov 11 18:51:56 1997 UTC revision 1.27 by dtc, Sat Nov 15 11:03:27 1997 UTC
# Line 394  Line 394 
394  (defconstant rtld-lazy 1)  (defconstant rtld-lazy 1)
395  (defconstant rtld-now 2)  (defconstant rtld-now 2)
396  (defconstant rtld-global #-irix #o400 #+irix 4)  (defconstant rtld-global #-irix #o400 #+irix 4)
397  ;; Dynamically loaded stuff isn't there upon restoring from a save--this is  
398  ;;primarily for irix, which resolves tzname at runtime, resulting in  (defvar *global-table* nil)
399  ;;*global-table* being set in the saved core image, resulting in havoc upon  ;;; Dynamically loaded stuff isn't there upon restoring from a
400  ;;restart.  ;;; save--this is primarily for irix, which resolves tzname at
401    ;;; runtime, resulting in *global-table* being set in the saved core
402    ;;; image, resulting in havoc upon restart.
403  (pushnew #'(lambda () (setq *global-table* nil))  (pushnew #'(lambda () (setq *global-table* nil))
404           ext:*after-save-initializations*)           ext:*after-save-initializations*)
405  (defvar *global-table* NIL)  
406  (defvar *dso-linker*  (defvar *dso-linker*
407    #+solaris "/usr/ccs/bin/ld"    #+solaris "/usr/ccs/bin/ld"
408    #+(or linux irix) "/usr/bin/ld")    #+(or linux irix) "/usr/bin/ld")
# Line 413  Line 415 
415  (alien:def-alien-routine dlclose void (lib system-area-pointer))  (alien:def-alien-routine dlclose void (lib system-area-pointer))
416  (alien:def-alien-routine dlerror c-call:c-string)  (alien:def-alien-routine dlerror c-call:c-string)
417    
418  ;; Ensure we've opened our own binary so can resolve global variables in the  ;;; Ensure we've opened our own binary so can resolve global variables
419  ;;lisp image that come from libraries. This used to happen only in  ;;; in the lisp image that come from libraries. This used to happen
420  ;;alternate-get-global-address, and only if no libraries were dlopened already,  ;;; only in alternate-get-global-address, and only if no libraries
421  ;;but that didn't work if something was dlopened before any problem global vars  ;;; were dlopened already, but that didn't work if something was
422  ;;were used. So now we do this in any function that can add to the global-table,  ;;; dlopened before any problem global vars were used. So now we do
423  ;;as well as in a-g-g-a.  ;;; this in any function that can add to the global-table, as well as
424    ;;; in alternate-get-global-address.
425  (defun ensure-lisp-table-opened ()  (defun ensure-lisp-table-opened ()
426    (unless *global-table*    (unless *global-table*
427      ;; Prevent recursive call if dlopen isn't defined      ;; Prevent recursive call if dlopen isn't defined

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.5