1 /* $Id$
2  *  Turbo C and Borland C compiler-specific declarations for any platform
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 /* Borland Turbo C/C++ & Borland C/C++ **************/
28 
29 #ifndef HUSKY_BORLANDC_H
30 #define HUSKY_BORLANDC_H
31 
32 #ifndef __TURBOC__
33   #error This file may be used only with Turbo C and Borland C !
34 #endif
35 
36 #  define HAS_MALLOC_H 1      /* use "#include <malloc.h>" for malloc() etc. */
37 #  define HAS_DIR_H    1      /* use "#include <dir.h>" for findfirst() etc. */
38 #  define HAS_DOS_H    1      /* use "#include <dos.h>" for delay(), intr() etc. */
39 #  define HAS_IO_H     1      /* access(), open(), ... */
40 #  define HAS_SHARE_H  1  /* may use "#include <share.h> */
41 #  define HAS_PROCESS_H   /* may use "#include <process.h> */
42 
43 #  if __TURBOC__ == 0x0295
44 #    define HAS_strftime
45 #    define HAS_mktime
46 #  endif
47 
48 #  if defined(__TURBOC__DOS__)     /* Turbo C/C++ & Borland C/C++ for MS-DOS */
49 #    include "BCD.h"
50 
51 #  elif defined(__TURBOC__WIN32__) /* Borland C/C++ for Win32 */
52 #    include "BCW.h"
53 
54 #  elif defined(__TURBOC__OS2__)   /* Borland C/C++ for OS/2 */
55 #    include "BCO.h"
56 #  endif
57 
58 typedef unsigned bit;
59 
60 typedef unsigned char byte;
61 typedef signed char sbyte;
62 
63 typedef unsigned short word;
64 typedef signed short sword;
65 
66 typedef unsigned long dword;
67 typedef signed long sdword;
68 
69 typedef signed short sshort;
70 typedef unsigned short ushort;
71 
72 typedef signed long slong;
73 typedef unsigned long ulong;
74 
75 
76 typedef   signed char        hCHAR;              /*  1 byte */
77 typedef   signed char       hSCHAR;              /*  1 byte */
78 typedef unsigned char       hUCHAR;              /*  1 byte */
79 
80 typedef   signed char        hINT8;              /*  1 byte */
81 typedef   signed char       hSINT8;              /*  1 byte */
82 typedef unsigned char       hUINT8;              /*  1 byte */
83 
84 typedef   signed short      hINT16;              /*  2 bytes */
85 typedef   signed short     hSINT16;              /*  2 bytes */
86 typedef unsigned short     hUINT16;              /*  2 bytes */
87 
88 typedef   signed long       hINT32;              /*  4 bytes */
89 typedef   signed long      hSINT32;              /*  4 bytes */
90 typedef unsigned long      hUINT32;              /*  4 bytes */
91 
92 #if !defined(__DOS__)
93   /* Not all compilers support this, test please (Stas Degteff) */
94   typedef   signed long long  hINT64;              /*  8 bytes */
95   typedef   signed long long hSINT64;              /*  8 bytes */
96   typedef unsigned long long hUINT64;              /*  8 bytes */
97   #define HAS_INT64
98 #endif
99 
100 #endif
101