Changeset 27

Show
Ignore:
Timestamp:
10/13/06 18:03:34 (8 years ago)
Author:
dhodell
Message:

Insert bits to allow successful compilation (and apparent success in
running) on FreeBSD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/init_lib.c

    r24 r27  
    4848#include <string.h> 
    4949 
     50#ifdef __FreeBSD__ 
     51#include <machine/param.h> 
     52#endif 
     53 
    5054void 
    5155vmem_heap_init(void) 
     
    8589        GetSystemInfo(&info); 
    8690        pagesize = info.dwPageSize; 
     91#elseif !defined(__FreeBSD__) 
     92        pagesize = _sysconf(_SC_PAGESIZE); 
    8793#else 
    88         pagesize = _sysconf(_SC_PAGESIZE)
     94        pagesize = PAGE_SIZE
    8995#endif 
    9096} 
  • trunk/malloc.c

    r24 r27  
    3434#include <string.h> 
    3535 
     36#ifdef HAVE_SYS_SYSMACROS_H 
    3637#include <sys/sysmacros.h> 
     38#endif 
    3739 
    3840#include "umem_base.h" 
  • trunk/sol_compat.h

    r25 r27  
    166166#ifdef _WIN32 
    167167#define issetugid()               0 
    168 #else 
     168#elseif !defined(__FreeBSD__) 
    169169#define issetugid()       (geteuid() == 0) 
    170170#endif 
  • trunk/umem.c

    r26 r27  
    519519 
    520520extern thread_t _thr_self(void); 
    521 #if defined(__MACH__) 
     521#if defined(__MACH__) || defined(__FreeBSD__) 
    522522# define CPUHINT()      ((int)(_thr_self())) 
    523523#endif