1 /* $Id$
2  *  IBM C/Set++ for OS/2 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 /* IBM C/Set++ for OS/2 */
28 
29 #ifndef HUSKY_IBMC_OS2_H
30 #define HUSKY_IBMC_OS2_H
31 
32 #ifndef __IBMC__
33   #error This file may be used only with IBM C/Set++ and IBM VisualAge C/C++ for OS/2 !
34 #endif
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 mysleep(x) DosSleep(1000L*(x))
52 #  define sleep(x)   DosSleep(1000L*(x))
53 #  define HAS_sleep     1
54 
55 #  define _XPENTRY pascal far
56 
57 #  define HAS_MALLOC_H        /* use "#include <malloc.h>" for malloc() etc. */
58 #  define HAS_IO_H     1  /* may use "#include <io.h> */
59 #  define HAS_SHARE_H  1  /* may use "#include <share.h> */
60 #  define HAS_DIRECT_H 1  /* may use "#include <direct.h> */
61 #  define HAS_PROCESS_H   /* may use "#include <process.h> */
62 
63 
64 typedef unsigned bit;
65 
66 typedef unsigned char byte;
67 typedef signed char sbyte;
68 
69 typedef unsigned short word;
70 typedef signed short sword;
71 
72 typedef unsigned long dword;
73 typedef signed long sdword;
74 
75 typedef signed short sshort;
76 typedef unsigned short ushort;
77 
78 typedef signed long slong;
79 typedef unsigned long ulong;
80 
81 
82 typedef   signed char        hCHAR;              /*  1 byte */
83 typedef   signed char       hSCHAR;              /*  1 byte */
84 typedef unsigned char       hUCHAR;              /*  1 byte */
85 
86 typedef   signed char        hINT8;              /*  1 byte */
87 typedef   signed char       hSINT8;              /*  1 byte */
88 typedef unsigned char       hUINT8;              /*  1 byte */
89 
90 typedef   signed short      hINT16;              /*  2 bytes */
91 typedef   signed short     hSINT16;              /*  2 bytes */
92 typedef unsigned short     hUINT16;              /*  2 bytes */
93 
94 typedef   signed long       hINT32;              /*  4 bytes */
95 typedef   signed long      hSINT32;              /*  4 bytes */
96 typedef unsigned long      hUINT32;              /*  4 bytes */
97 
98 #endif
99