1 /* $Id$
2  *  SAS C for AmigaDOS compiler-specific declarations
3  *
4  * HUSKYLIB: common defines, types and functions for HUSKY
5  *
6  * This is part of The HUSKY Fidonet Software project:
7  * see http://husky.sourceforge.net for details
8  *
9  *
10  * HUSKYLIB is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * HUSKYLIB is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; see file COPYING. If not, write to the
22  * Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  * See also http://www.gnu.org, license may be found here.
25  */
26 
27 /* SAS C for AmigaDOS defines ************************************/
28 #ifndef HUSKY_SASC_H
29 #define HUSKY_SASC_H
30 
31 #ifndef __SASC__
32   #error This file may be used only with SAS C for AmigaDOS !
33 #endif
34 
35 
36 #define _stdc
37 #define _intr
38 #define _intcast
39 #define _veccast
40 #define _fast
41 #define _loadds
42 
43 #define cdecl
44 #define pascal
45 #define near
46 #undef  far
47 #define far
48 
49 #define farread read
50 #define farwrite write
51 #define mymkdir(a) mkdir((a))
52 
53 #define mysleep(x) unused(x)
54 
55 #include <fcntlh.>
56 #ifndef O_BINARY
57 # define O_BINARY 0 /* O_BINARY flag has no effect under UNIX */
58 #endif
59 
60 #define _XPENTRY
61 
62 #error "Don't know how to implement record locking."
63 /* Using an executable that does no support record locking is
64    discouraged in a multitasking environment. If you want to
65    do it anyway, you may uncomment this line. Record locking is used
66    to obtain a lock on the very first byte of a SQD file which
67    indicates that no other program should use the message area now.
68 */
69 /*#define unlock(a,b,c) unused(a)*/
70 /*#define lock(a,b,c) 0*/
71 
72 #define SH_DENYNONE 0
73 
74 typedef unsigned bit;
75 
76 /*typedef unsigned char byte;*/
77 typedef signed char sbyte;
78 
79 typedef unsigned short word;
80 typedef signed short sword;
81 
82 typedef unsigned long dword;
83 typedef signed long sdword;
84 
85 typedef signed short sshort;
86 /*typedef unsigned short ushort;*/
87 
88 typedef signed long slong;
89 typedef unsigned long ulong;
90 
91 
92 typedef   signed char        hCHAR;              /*  1 byte */
93 typedef   signed char       hSCHAR;              /*  1 byte */
94 typedef unsigned char       hUCHAR;              /*  1 byte */
95 
96 typedef   signed char        hINT8;              /*  1 byte */
97 typedef   signed char       hSINT8;              /*  1 byte */
98 typedef unsigned char       hUINT8;              /*  1 byte */
99 
100 typedef   signed short      hINT16;              /*  2 bytes */
101 typedef   signed short     hSINT16;              /*  2 bytes */
102 typedef unsigned short     hUINT16;              /*  2 bytes */
103 
104 typedef   signed int        hINT32;              /*  4 bytes */
105 typedef   signed int       hSINT32;              /*  4 bytes */
106 typedef unsigned int       hUINT32;              /*  4 bytes */
107 
108 /* Not all compilers support this, test please (Stas Degteff) */
109 typedef   signed long long  hINT64;              /*  8 bytes */
110 typedef   signed long long hSINT64;              /*  8 bytes */
111 typedef unsigned long long hUINT64;              /*  8 bytes */
112 #define HAS_INT64
113 
114 #endif
115