1 /* $Id: BORLANDC.h 271 2020-02-02 12:09:15Z dukelsky $ 2 * Turbo C and Borland C compiler-specific declarations for any platform 3 * 4 * You should have received a copy of the GNU Lesser General Public 5 * License along with this library; see file COPYING. If not, write to the 6 * Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 7 * 8 * See also https://www.gnu.org, license may be found here. 9 */ 10 11 /* Borland Turbo C/C++ & Borland C/C++ **************/ 12 13 #ifndef SMAPI_BORLANDC_H 14 #define SMAPI_BORLANDC_H 15 16 #ifndef __TURBOC__ 17 #error This file may be used only with Turbo C and Borland C ! 18 #endif 19 20 # define HAS_MALLOC_H 1 /* use "#include <malloc.h>" for malloc() etc. */ 21 # define HAS_DIR_H 1 /* use "#include <dir.h>" for findfirst() etc. */ 22 # define HAS_DOS_H 1 /* use "#include <dos.h>" for delay(), intr() etc. */ 23 # define HAS_IO_H 1 /* access(), open(), ... */ 24 # define HAS_SHARE_H 1 /* may use "#include <share.h> */ 25 # define HAS_PROCESS_H /* may use "#include <process.h> */ 26 27 #if __TURBOC__ == 0x0295 28 #define HAS_strftime 29 #define HAS_mktime 30 #endif 31 32 #if defined(__TURBOC__DOS__) /* Turbo C/C++ & Borland C/C++ for MS-DOS */ 33 #include "BCD.h" 34 35 #elif defined(__TURBOC__WIN32__) /* Borland C/C++ for Win32 */ 36 #include "BCW.h" 37 38 #elif defined(__TURBOC__OS2__) /* Borland C/C++ for OS/2 */ 39 #include "BCO.h" 40 #endif 41 42 typedef unsigned bit; 43 44 typedef unsigned char byte; 45 typedef signed char sbyte; 46 47 typedef unsigned short word; 48 typedef signed short sword; 49 50 typedef unsigned long dword; 51 typedef signed long sdword; 52 53 typedef signed short sshort; 54 typedef unsigned short ushort; 55 56 typedef signed long slong; 57 typedef unsigned long ulong; 58 59 60 typedef signed char hCHAR; /* 1 byte */ 61 typedef signed char hSCHAR; /* 1 byte */ 62 typedef unsigned char hUCHAR; /* 1 byte */ 63 64 typedef signed char hINT8; /* 1 byte */ 65 typedef signed char hSINT8; /* 1 byte */ 66 typedef unsigned char hUINT8; /* 1 byte */ 67 68 typedef signed short hINT16; /* 2 bytes */ 69 typedef signed short hSINT16; /* 2 bytes */ 70 typedef unsigned short hUINT16; /* 2 bytes */ 71 72 typedef signed long hINT32; /* 4 bytes */ 73 typedef signed long hSINT32; /* 4 bytes */ 74 typedef unsigned long hUINT32; /* 4 bytes */ 75 76 #if !defined(__DOS__) 77 /* Not all compilers support this, test please (Stas Degteff) */ 78 typedef signed long long hINT64; /* 8 bytes */ 79 typedef signed long long hSINT64; /* 8 bytes */ 80 typedef unsigned long long hUINT64; /* 8 bytes */ 81 #define HAS_INT64 82 #endif 83 84 #endif 85