~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/linux/signal.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    This file is part of the Free Pascal run time library.
 
3
    Copyright (c) 1999-2000 by Jonas Maebe,
 
4
    member of the Free Pascal development team.
 
5
 
 
6
    See the file COPYING.FPC, included in this distribution,
 
7
    for details about the copyright.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
12
 
 
13
 **********************************************************************}
 
14
 
 
15
{$packrecords C}
 
16
 
 
17
{********************
 
18
      Signal
 
19
********************}
 
20
 
 
21
Const
 
22
  { For sending a signal }
 
23
{$ifdef SPARC}
 
24
  SA_SIGINFO   = $200;
 
25
  SA_NOMASK    = $20;
 
26
 
 
27
  SIG_BLOCK   = 1;
 
28
  SIG_UNBLOCK = 2;
 
29
  SIG_SETMASK = 4;
 
30
{$else SPARC}
 
31
  SA_NOCLDSTOP = 1;
 
32
  SA_NOCLDWAIT = 2;
 
33
  SA_SIGINFO   = 4;
 
34
  SA_RESTORER  = $04000000;
 
35
  SA_ONSTACK   = $08000000;
 
36
  SA_RESTART   = $10000000;
 
37
  SA_INTERRUPT = $20000000;
 
38
  SA_NODEFER   = $40000000;
 
39
  SA_RESETHAND = $80000000;
 
40
 
 
41
  SA_NOMASK    = SA_NODEFER;
 
42
  SA_ONESHOT   = SA_RESETHAND;
 
43
 
 
44
  SIG_BLOCK   = 0;
 
45
  SIG_UNBLOCK = 1;
 
46
  SIG_SETMASK = 2;
 
47
{$endif SPARC}
 
48
 
 
49
  SIG_DFL = 0 ;
 
50
  SIG_IGN = 1 ;
 
51
  SIG_ERR = -1 ;
 
52
 
 
53
{$ifdef cpusparc}
 
54
  SIGHUP     = 1;
 
55
  SIGINT     = 2;
 
56
  SIGQUIT    = 3;
 
57
  SIGILL     = 4;
 
58
  SIGTRAP    = 5;
 
59
  SIGABRT    = 6;
 
60
  SIGIOT     = 6;
 
61
  SIGEMT     = 7;
 
62
  SIGFPE     = 8;
 
63
  SIGKILL    = 9;
 
64
  SIGBUS     = 10;
 
65
  SIGSEGV    = 11;
 
66
  SIGSYS     = 12;
 
67
  SIGPIPE    = 13;
 
68
  SIGALRM    = 14;
 
69
  SIGTERM    = 15;
 
70
  SIGURG     = 16;
 
71
  SIGSTOP    = 17;
 
72
  SIGTSTP    = 18;
 
73
  SIGCONT    = 19;
 
74
  SIGCHLD    = 20;
 
75
  SIGTTIN    = 21;
 
76
  SIGTTOU    = 22;
 
77
  SIGIO      = 23;
 
78
  SIGPOLL    = SIGIO;
 
79
  SIGXCPU    = 24;
 
80
  SIGXFSZ    = 25;
 
81
  SIGVTALRM  = 26;
 
82
  SIGPROF    = 27;
 
83
  SIGWINCH   = 28;
 
84
  SIGLOST    = 29;
 
85
  SIGPWR     = SIGLOST;
 
86
  SIGUSR1    = 30;
 
87
  SIGUSR2    = 31;
 
88
{$else cpusparc}
 
89
  SIGHUP     = 1;
 
90
  SIGINT     = 2;
 
91
  SIGQUIT    = 3;
 
92
  SIGILL     = 4;
 
93
  SIGTRAP    = 5;
 
94
  SIGABRT    = 6;
 
95
  SIGIOT     = 6;
 
96
  SIGBUS     = 7;
 
97
  SIGFPE     = 8;
 
98
  SIGKILL    = 9;
 
99
  SIGUSR1    = 10;
 
100
  SIGSEGV    = 11;
 
101
  SIGUSR2    = 12;
 
102
  SIGPIPE    = 13;
 
103
  SIGALRM    = 14;
 
104
  SIGTerm    = 15;
 
105
  SIGSTKFLT  = 16;
 
106
  SIGCHLD    = 17;
 
107
  SIGCONT    = 18;
 
108
  SIGSTOP    = 19;
 
109
  SIGTSTP    = 20;
 
110
  SIGTTIN    = 21;
 
111
  SIGTTOU    = 22;
 
112
  SIGURG     = 23;
 
113
  SIGXCPU    = 24;
 
114
  SIGXFSZ    = 25;
 
115
  SIGVTALRM  = 26;
 
116
  SIGPROF    = 27;
 
117
  SIGWINCH   = 28;
 
118
  SIGIO      = 29;
 
119
  SIGPOLL    = SIGIO;
 
120
  SIGPWR     = 30;
 
121
  SIGUNUSED  = 31;
 
122
{$endif cpusparc}
 
123
 
 
124
{ si_code field values for tsiginfo.si_code when si_signo = SIGFPE }
 
125
const
 
126
  FPE_INTDIV = 1; { integer divide by zero }
 
127
  FPE_INTOVF = 2; { integer overflow }
 
128
  FPE_FLTDIV = 3; { floating point divide by zero }
 
129
  FPE_FLTOVF = 4; { floating point overflow }
 
130
  FPE_FLTUND = 5; { floating point underflow }
 
131
  FPE_FLTRES = 6; { floating point inexact result }
 
132
  FPE_FLTINV = 7; { floating point invalid operation }
 
133
  FPE_FLTSUB = 8; { floating point subscript out of range }
 
134
 
 
135
const
 
136
  SI_PAD_SIZE   = ((128 div sizeof(longint)) - 3);
 
137
 
 
138
type
 
139
  sigset_t = array[0..wordsinsigset-1] of cuLong;
 
140
  tsigset  = sigset_t;
 
141
  sigset   = sigset_t;
 
142
  psigset  = ^tsigset;
 
143
 
 
144
  psiginfo = ^tsiginfo;
 
145
  tsiginfo = record
 
146
       si_signo : longint;
 
147
       si_errno : longint;
 
148
       si_code : longint;
 
149
       _sifields : record
 
150
           case longint of
 
151
              0 : ( _pad : array[0..(SI_PAD_SIZE)-1] of longint );
 
152
              1 : ( _kill : record
 
153
                   _pid : pid_t;
 
154
                   _uid : uid_t;
 
155
                end );
 
156
              2 : ( _timer : record
 
157
                   _timer1 : dword;
 
158
                   _timer2 : dword;
 
159
                end );
 
160
              3 : ( _rt : record
 
161
                   _pid : pid_t;
 
162
                   _uid : uid_t;
 
163
                   _sigval : pointer;
 
164
                end );
 
165
              4 : ( _sigchld : record
 
166
                   _pid : pid_t;
 
167
                   _uid : uid_t;
 
168
                   _status : longint;
 
169
                   _utime : clock_t;
 
170
                   _stime : clock_t;
 
171
                end );
 
172
              5 : ( _sigfault : record
 
173
                   _addr : pointer;
 
174
                end );
 
175
              6 : ( _sigpoll : record
 
176
                   _band : longint;
 
177
                   _fd : longint;
 
178
                end );
 
179
           end;
 
180
    end;
 
181
 
 
182
{ CPU dependent TSigContext }
 
183
{$i sighndh.inc}
 
184
 
 
185
type
 
186
  signalhandler_t = procedure(signal: longint); cdecl;
 
187
  sigactionhandler_t = procedure(signal: longint; info: psiginfo; context: psigcontext); cdecl;
 
188
  sigrestorerhandler_t = procedure; cdecl;
 
189
      
 
190
  signalhandler = signalhandler_t;
 
191
  sigactionhandler = sigactionhandler_t;
 
192
  sigrestorerhandler = sigrestorerhandler_t;
 
193
  tsignalhandler = signalhandler_t;
 
194
  tsigactionhandler = sigactionhandler_t;
 
195
  tsigrestorerhandler = sigrestorerhandler_t;
 
196
  
 
197
  psigactionrec = ^sigactionrec;
 
198
  sigactionrec = record
 
199
    sa_handler: sigactionhandler_t;
 
200
    sa_flags: culong;
 
201
    sa_restorer: sigrestorerhandler_t;
 
202
    sa_mask: sigset_t;
 
203
  end;
 
204