Changeset 13608


Ignore:
Timestamp:
Apr 11, 2010, 11:04:59 AM (10 years ago)
Author:
gb
Message:

Define PLATFORM{OS|CPU|WORD_SIZE} in PLATFORM_H, not by exhaustive enumeration
in lisp.h

Location:
trunk/source/lisp-kernel
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/lisp.h

    r13601 r13608  
    7979#define PLATFORM_OS_WINDOWS 5
    8080
    81 #ifdef LINUX
    82 #define PLATFORM_OS PLATFORM_OS_LINUX
    83 #endif
    8481
    85 #ifdef DARWIN
    86 #define PLATFORM_OS PLATFORM_OS_DARWIN
    87 #endif
    88 
    89 #ifdef FREEBSD
    90 #define PLATFORM_OS PLATFORM_OS_FREEBSD
    91 #endif
    92 
    93 #ifdef SOLARIS
    94 #define PLATFORM_OS PLATFORM_OS_SOLARIS
    95 #endif
    96 
    97 #ifdef WINDOWS
    98 #define PLATFORM_OS PLATFORM_OS_WINDOWS
    99 #endif
    100 
    101 #ifdef PPC
    102 #define PLATFORM_CPU PLATFORM_CPU_PPC
    103 #endif
    104 
    105 #ifdef X86
    106 #define PLATFORM_CPU PLATFORM_CPU_X86
    107 #endif
    108 
    109 #if (WORD_SIZE == 32)
    110 #define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    111 #endif
    112 
    113 #if (WORD_SIZE == 64)
    114 #define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    115 #endif
    11682
    11783#define PLATFORM (PLATFORM_OS|PLATFORM_CPU|PLATFORM_WORD_SIZE)
  • trunk/source/lisp-kernel/platform-darwinppc.h

    r13597 r13608  
    1616*/
    1717
    18 #define WORD_SIZE 32
     18#define WORD_SIZE 3
     19#define PLATFORM_OS PLATFORM_OS_DARWIN
     20#define PLATFORM_CPU PLATFORM_CPU_PPC
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
     22
     23#include <sys/signal.h>
     24#include <sys/ucontext.h>
    1925
    2026/* ucontext/mcontext stuff; saner if OS >= 10.5 */
     
    2228typedef mcontext_t MCONTEXT_T;
    2329#define UC_MCONTEXT(UC) UC->uc_mcontext
     30
     31#include "standard-inttypes.h"
  • trunk/source/lisp-kernel/platform-darwinppc64.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_DARWIN
     20#define PLATFORM_CPU PLATFORM_CPU_PPC
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
     22
     23/* ucontext/mcontext stuff; saner if OS >= 10.5 */
     24#include <sys/signal.h>
     25#include <sys/ucontext.h>
     26typedef _STRUCT_UCONTEXT64 ExceptionInformation;
     27typedef _STRUCT_MCONTEXT64 *MCONTEXT_T;
     28#define UC_MCONTEXT(UC) UC->uc_mcontext64
    1929
    2030
    21 /* ucontext/mcontext stuff; saner if OS >= 10.5 */
    22 typedef struct ucontext64 ExceptionInformation;
    23 typedef struct mcontext64 MCONTEXT_T;
    24 #define UC_MCONTEXT(UC) UC->uc_mcontext
    25 
    26 /* Define "standard" C integer types.  There are lots of standards; we
    27    basically want to define signed/unsigned 8/16/32/64-bit integer
    28    types (s8_t, u32_t) with names that we can use consistently in
    29    this code.  (We may or may not actually use them consistently.)
    30  */
    31 
    3231#include "standard-inttypes.h"
  • trunk/source/lisp-kernel/platform-darwinx8632.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_DARWIN
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023/* ucontext/mcontext stuff; saner if OS >= 10.5 */
  • trunk/source/lisp-kernel/platform-darwinx8664.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_DARWIN
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
     22
    1923
    2024#include <sys/signal.h>
  • trunk/source/lisp-kernel/platform-freebsdx8632.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_FREEBSD
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef struct __ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-freebsdx8664.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_FREEBSD
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    1922
    2023typedef struct __ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-linuxppc.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_PPC
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef struct ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-linuxppc64.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_PPC
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    1922
    2023typedef struct ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-linuxx8632.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef struct ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-linuxx8664.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    1922
    2023typedef struct ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-solarisx64.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_SOLARIS
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    1922
    2023typedef struct ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-solarisx86.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_SOLARIS
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef struct ucontext ExceptionInformation;
  • trunk/source/lisp-kernel/platform-win32.h

    r13597 r13608  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_WINDOWS
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef CONTEXT ExceptionInformation;
  • trunk/source/lisp-kernel/platform-win64.h

    r13597 r13608  
     1/*
     2   Copyright (C) 2010 Clozure Associates
     3   Copyright (C) 1994-2001 Digitool, Inc
     4   This file is part of Clozure CL. 
     5
     6   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
     7   License , known as the LLGPL and distributed with Clozure CL as the
     8   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
     9   which is distributed with Clozure CL as the file "LGPL".  Where these
     10   conflict, the preamble takes precedence. 
     11
     12   Clozure CL is referenced in the preamble as the "LIBRARY."
     13
     14   The LLGPL is also available online at
     15   http://opensource.franz.com/preamble.html
     16*/
     17
     18#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_WINDOWS
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
     22
     23typedef CONTEXT ExceptionInformation;
     24
     25#include "windows-inttypes.h"
Note: See TracChangeset for help on using the changeset viewer.