Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3191

Show
Ignore:
Timestamp:
02/15/08 13:59:54 (7 months ago)
Author:
larsivi
Message:

FreeBSD definitions, thanks Ralith. Refs #896

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/stdc/posix/signal.d

    r2532 r3191  
    149149    const SIGURG    = 16; 
    150150} 
     151else version( freebsd ) 
     152{ 
     153        //SIGABRT (defined in tango.stdc.signal) 
     154    const SIGALRM   = 14; 
     155    const SIGBUS    = 10; 
     156    const SIGCHLD   = 20; 
     157    const SIGCONT   = 19; 
     158    //SIGFPE (defined in tango.stdc.signal) 
     159    const SIGHUP    = 1; 
     160    //SIGILL (defined in tango.stdc.signal) 
     161    //SIGINT (defined in tango.stdc.signal) 
     162    const SIGKILL   = 9; 
     163    const SIGPIPE   = 13; 
     164    const SIGQUIT   = 3; 
     165    //SIGSEGV (defined in tango.stdc.signal) 
     166    const SIGSTOP   = 17; 
     167    //SIGTERM (defined in tango.stdc.signal) 
     168    const SIGTSTP   = 18; 
     169    const SIGTTIN   = 21; 
     170    const SIGTTOU   = 22; 
     171    const SIGUSR1   = 30; 
     172    const SIGUSR2   = 31; 
     173    const SIGURG    = 16; 
     174} 
    151175 
    152176struct sigaction_t 
     
    405429    int sigwait(sigset_t*, int*); 
    406430} 
    407  
     431else version( freebsd ) 
     432
     433    union sigval  
     434    { 
     435        int sival_int; 
     436        void* sival_ptr; 
     437        int sigval_int; 
     438        void* sigval_ptr; 
     439    } 
     440 
     441    struct sigset_t 
     442    { 
     443        uint __bits[4]; 
     444    } 
     445     
     446    struct siginfo_t 
     447    { 
     448        int si_signo; 
     449        int si_errno; 
     450        int si_code; 
     451        pid_t si_pid; 
     452        uid_t si_uid; 
     453        int si_status; 
     454        void* si_addr; 
     455        sigval si_value; 
     456        union __reason 
     457        { 
     458            struct __fault 
     459            { 
     460                int _trapno; 
     461            } 
     462            __fault _fault; 
     463            struct __timer 
     464            { 
     465                int _timerid; 
     466                int _overrun; 
     467            } 
     468            __timer _timer; 
     469            struct __mesgq 
     470            { 
     471                int _mqd; 
     472            } 
     473            __mesgq _mesgq; 
     474            struct __poll 
     475            { 
     476                c_long _band; 
     477            } 
     478            __poll _poll; 
     479            struct ___spare___ 
     480            { 
     481                c_long __spare1__; 
     482                int[7] __spare2__; 
     483            } 
     484            ___spare___ __spare__; 
     485        } 
     486        __reason _reason; 
     487    } 
     488 
     489    int kill(pid_t, int); 
     490    int sigaction(int, sigaction_t*, sigaction_t); 
     491    int sigaddset(sigset_t*, int); 
     492    int sigdelset(sigset_t*, int); 
     493    int sigemptyset(sigset_t *); 
     494    int sigfillset(sigset_t *); 
     495    int sigismember(sigset_t *, int); 
     496    int sigpending(sigset_t *); 
     497    int sigprocmask(int, sigset_t*, sigset_t*); 
     498    int sigsuspend(sigset_t *); 
     499    int sigwait(sigset_t*, int*); 
     500
     501 
     502     
    408503// 
    409504// XOpen (XSI) 
     
    641736    } 
    642737} 
     738else version( freebsd ) 
     739{ 
     740    struct timespec 
     741    { 
     742        time_t  tv_sec; 
     743        c_long  tv_nsec; 
     744    } 
     745} 
    643746 
    644747// 
     
    715818    int pthread_sigmask(int,  sigset_t*, sigset_t*); 
    716819} 
     820else version( freebsd ) 
     821{ 
     822    int pthread_kill(pthread_t, int); 
     823    int pthread_sigmask(int,  sigset_t*, sigset_t*); 
     824} 
  • trunk/tango/sys/freebsd/freebsd.d

    r3188 r3191  
    11module tango.sys.freebsd.freebsd; 
     2 
     3public import tango.stdc.time; 
     4public import tango.stdc.posix.dlfcn; 
     5public import tango.stdc.posix.fcntl; 
     6public import tango.stdc.posix.poll; 
     7public import tango.stdc.posix.pwd; 
     8public import tango.stdc.posix.time; 
     9public import tango.stdc.posix.unistd; 
     10public import tango.stdc.posix.sys.select; 
     11public import tango.stdc.posix.sys.stat; 
     12public import tango.stdc.posix.sys.types;