Changeset 10699


Ignore:
Timestamp:
Sep 11, 2008, 9:32:44 AM (11 years ago)
Author:
gb
Message:

Try to setup platform canonical types; use conditionalized
*canonical-os-foreign-types*, not *canonical-unix-foreign-types*.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/foreign-types.lisp

    r10693 r10699  
    119119                    :callback-return-value-function
    120120                    'os::generate-callback-return-value
    121                     ))
     121                    :platform-foreign-types
     122                    #.(case (backend-name *target-backend*)
     123                        (:win64 '((:struct :_stat64)))
     124                        (t
     125                         (case (target-os-name *target-backend*)
     126                           (:darwin '((:struct :host_basic_info)))
     127                           (t ()))))))
    122128                   
    123129(defvar *target-ftd* *host-ftd*)
     
    16941700               (return t)))))))
    16951701
    1696 (defparameter *canonical-unix-foreign-types*
     1702;;; We don't use foreign type ordinals when cross-compiling,
     1703;;; so the read-time conditionalization is OK here.
     1704
     1705#-windows-target
     1706(defparameter *canonical-os-foreign-types*
    16971707  '((:struct :timespec)
    16981708    (:struct :timeval)
    16991709    (:struct :stat)
    17001710    (:struct :passwd)
    1701     #>Dl_info))
     1711    #>Dl_info
     1712    (:array (:struct :pollfd) 1)) )
     1713
     1714#+windows-target
     1715(defparameter *canonical-os-foreign-types*
     1716  `((#>FILETIME)
     1717    (#>SYSTEM_INFO)
     1718    (#>HANDLE)
     1719    (#>PROCESS_INFORMATION)
     1720    (#>STARTUPINFO)
     1721    (:array #>HANDLE 2)
     1722    (#>DWORD)
     1723    (#>SYSTEM_LOGICAL_PROCESSOR_INFORMATION)
     1724    (:array #>wchar_t #.$MAX_PATH)
     1725    (#>fd_set)))
     1726   
    17021727   
    17031728(defun canonicalize-foreign-type-ordinals (ftd)
     
    17351760      (canonicalize-foreign-type-ordinal #+solaris-target '(:struct :lifconf) #-solaris-target nil)
    17361761      (setq canonical-ordinal (1- max-common-foreign-type-ordinal))
    1737       ;; We don't use foreign type ordinals when cross-compiling,
    1738       ;; so the read-time conditionalization is OK here.
    1739       #+(or linux-target darwin-target solaris-target freebsd-target)
    1740       (dolist (spec *canonical-unix-foreign-types*)
     1762
     1763      (dolist (spec *canonical-os-foreign-types*)
    17411764        (canonicalize-foreign-type-ordinal spec))
    17421765      (dolist (spec (ftd-platform-ordinal-types ftd))
Note: See TracChangeset for help on using the changeset viewer.