Changeset 14207


Ignore:
Timestamp:
Aug 24, 2010, 1:31:39 AM (9 years ago)
Author:
rme
Message:

Don't do arithmetic on pointers to void.

GCC accepts this (it pretends that sizeof(void) == 1), but other
compilers choke on it.

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

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/image.c

    r14119 r14207  
    197197  natural
    198198    mem_size = sect->memory_size;
    199   void *addr;
     199  char *addr;
    200200  area *a;
    201201
     
    282282
    283283  case AREA_STATIC_CONS:
    284     addr = (void *) lisp_global(HEAP_START);
     284    addr = (char *) lisp_global(HEAP_START);
    285285    a = new_area(addr-align_to_power_of_2(mem_size,log2_page_size), addr, AREA_STATIC_CONS);
    286286    if (mem_size) {     
  • trunk/source/lisp-kernel/x86-constants32.h

    r14142 r14207  
    334334  void *native_thread_info;                  /* platform-dependent */
    335335  void *native_thread_id;       /* mach_thread_t, pid_t, etc. */
    336   void *last_allocptr;
    337   void *save_allocptr;
    338   void *save_allocbase;
     336  char *last_allocptr;
     337  char *save_allocptr;
     338  char *save_allocbase;
    339339  void *reset_completion;
    340340  void *activate;
  • trunk/source/lisp-kernel/x86-constants64.h

    r14143 r14207  
    357357  void* native_thread_info;     /* platform-dependent */
    358358  void* native_thread_id;       /* mach_thread_t, pid_t, etc. */
    359   void* last_allocptr;
    360   void* save_allocptr;
    361   void* save_allocbase;
     359  char *last_allocptr;
     360  char *save_allocptr;
     361  char *save_allocbase;
    362362  void* reset_completion;
    363363  void* activate;
  • trunk/source/lisp-kernel/x86-exceptions.c

    r14197 r14207  
    37593759new_watched_area(natural size)
    37603760{
    3761   void *p;
     3761  char *p;
    37623762
    37633763  p = MapMemory(NULL, size, MEMPROTECT_RWX);
Note: See TracChangeset for help on using the changeset viewer.