Changeset 7828


Ignore:
Timestamp:
Dec 6, 2007, 4:19:12 AM (13 years ago)
Author:
gb
Message:

A little bit of Windows conditionalization.

Location:
branches/working-0711/ccl/lisp-kernel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lisp-kernel/Threads.h

    r7624 r7828  
    3737#include <mach/semaphore.h>
    3838#endif
     39
    3940#include <limits.h>
     41
    4042#ifdef FREEBSD
    4143#include <pthread_np.h>
    4244#endif
     45
     46#ifndef WINDOWS
    4347#include <sched.h>
     48#endif
    4449
    4550#include "lisp.h"
     
    5257#endif
    5358
     59#ifndef WINDOWS
    5460#include <syslog.h>
     61#endif
    5562
    5663Boolean extern threads_initialized;
  • branches/working-0711/ccl/lisp-kernel/lisp-exceptions.h

    r7655 r7828  
    2929} ErrAction;
    3030
     31
     32#ifdef WINDOWS
     33otypedef EXCEPTION_RECORD siginfo_t;  /* Not even close to being the right thing to do */
     34#endif
    3135
    3236
  • branches/working-0711/ccl/lisp-kernel/lisptypes.h

    r7656 r7828  
    3030
    3131
     32#include <stdint.h>
     33
     34#ifdef WIN64
     35#include <windows.h>
     36typedef long long s64_t;
     37typedef unsigned long long u64_t;
     38typedef signed long s32_t;
     39typedef unsigned long u32_t;
     40typedef signed short s16_t;
     41typedef unsigned short u16_t;
     42typedef signed char s8_t;
     43typedef unsigned char u8_t;
     44#else
    3245#ifdef SOLARIS
    3346/* Solaris doesn't laugh and play like the other children */
     
    4962typedef int8_t s8_t;
    5063typedef u_int8_t u8_t;
     64#endif
    5165#endif
    5266
     
    163177#endif
    164178
     179#ifdef WIN64
     180typedef EXCEPTION_POINTERS ExceptionInformation;
     181#endif
     182
    165183typedef u32_t lisp_char_code;
    166184
  • branches/working-0711/ccl/lisp-kernel/m4macros.m4

    r5003 r7828  
    2828define([BSDstabs],[1])
    2929define([ELFstabs],[2])
     30define([COFFstabs],[3])
    3031undefine([EABI])
    3132undefine([POWEROPENABI])
     
    6970               define([EndTextLabel],[.Letext])])
    7071
     72ifdef([WIN64],[define([SYSstabs],[COFFstabs])
     73               define([CNamesNeedUnderscores],[])
     74               define([LocalLabelPrefix],[L])])
     75
    7176
    7277/*  Names exported to (or imported from) C may need leading underscores.  */
     
    98103])
    99104
     105define([_emit_COFF_source_line_stab],[
     106        .loc 1 $1 0
     107])
    100108
    101109
    102110define([emit_source_line_stab],[
    103         ifelse(eval(SYSstabs),eval(BSDstabs),
    104         [_emit_BSD_source_line_stab($1)],
    105         [_emit_ELF_source_line_stab($1)])])
     111        ifelse(eval(SYSstabs),
     112               eval(BSDstabs),
     113              [_emit_BSD_source_line_stab($1)],
     114              eval(SYSstabs),
     115              eval(ELFstabs),
     116              [_emit_ELF_source_line_stab($1)],
     117              [_emit_COFF_source_line_stab($1)])])
     118
     119
    106120
    107121
     
    138152
    139153
    140 define([_beginfile],[
     154define([_beginfile],[ifdef([WIN64],[
     155        .file 1 "__file__"
     156        .text
     157],[
    141158        .stabs "__pwd__",N_SO,0,0,StartTextLabel()
    142159        .stabs "__file__",N_SO,0,0,StartTextLabel()
     
    148165StartTextLabel():
    149166# __line__ "__file__"
    150 ])
     167])])
    151168
    152169define([_endfile],[
     170ifdef([WIN64],[
     171],[
    153172        .stabs "",N_SO,0,0,EndTextLabel()
    154173EndTextLabel():
    155174# __line__
     175])
    156176])
    157177
     
    162182])
    163183$1:
     184ifdef([WIN64],[
     185        .def    $1;     .scl    2;      .type   32;     .endef
     186],[
    164187        .stabd 68,0,__line__
    165188        .stabs "$1:F1",36,0,__line__,$1
     189])
    166190        .set func_start,$1
     191       
    167192])
    168193
     
    180205])
    181206
     207
    182208define([_endfn],[
    183209LocalLabelPrefix[]__func_name[999]:
     210ifdef([WIN64],[
     211],[
    184212        .stabs "",36,0,0,LocalLabelPrefix[]__func_name[999]-__func_name
    185213        .line __line__
    186214        ifelse(eval(SYSstabs),eval(ELFstabs),[
    187215        .size __func_name,LocalLabelPrefix[]__func_name[999]-__func_name
     216])
    188217])
    189218        undefine([__func_name])
     
    292321equate_if_defined([FREEBSD])
    293322equate_if_defined([SOLARIS])
     323equate_if_defined([WIN64])
    294324equate_if_defined([PPC64])
    295325equate_if_defined([X8664])
  • branches/working-0711/ccl/lisp-kernel/memprotect.h

    r5611 r7828  
    2525#endif
    2626#include <signal.h>
     27#ifndef WINDOWS
    2728#include <ucontext.h>
     29#endif
    2830
    2931int
  • branches/working-0711/ccl/lisp-kernel/x86-constants64.h

    r6524 r7828  
    5757#endif
    5858
     59#ifdef WIN64
     60/* DWORD64 indices in CONTEXT */
     61#define REG_RAX     15
     62#define REG_RCX     16
     63#define REG_RDX     17
     64#define REG_RBX     18
     65#define REG_RSP     19
     66#define REG_RBP     20
     67#define REG_RSI     21
     68#define REG_RDI     22
     69#define REG_R8      23
     70#define REG_R9      24
     71#define REG_R10     25
     72#define REG_R11     26
     73#define REG_R12     27
     74#define REG_R13     28
     75#define REG_R14     29
     76#define REG_R15     30
     77#define REG_RIP     31
     78#define REG_EFL      8  /* In the high 32 bits of the 64-bit word at index 8 */
     79#endif
    5980/* Define indices of the GPRs in the mcontext component of a ucontext */
    6081#define Itemp0      REG_RBX
Note: See TracChangeset for help on using the changeset viewer.