f599295821f19f6ef3c981db7d10a73ea67fc172
[fw/sdcc] / support / cpp / auto-host_vc_in.h
1 /* auto-host_in.h: Define values for MSVC 6.0. During build this file
2    should be copied to 'auto-host.h'.
3
4 Copyright (C) 2002  Jesus Calvino-Fraga, jesusc@ieee.org
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/
19
20 #ifndef CPP_VC_H_
21 #define CPP_VC_H_
22
23 #include <sys/stat.h>
24 #include <io.h>
25 #include <malloc.h>
26 #include <stdio.h>
27
28 #define HAVE_STRINGIZE
29 #define STDC_HEADERS            1
30 #define PACKAGE "sdcc"
31 #define LOCALEDIR ""
32 #define PREFIX ""
33 #define inline  __inline
34 #define SIZEOF_INT                      4
35 #define SIZEOF_LONG                     4
36 #define HAVE_TIME_H                     1
37 #define HAVE_STRING_H           1
38 #define HAVE_SYS_STAT_H         1
39 #define HAVE_FCNTL_H            1
40 #define HAVE_STDLIB_H           1
41 #define HAVE_STDDEF_H           1
42 #define HAVE_LIMITS_H           1
43 #define __STDC__                        1
44
45 #define ssize_t int
46
47 #ifdef _MSC_VER
48 /*So, which ones are the standard types? */
49 #define ino_t _ino_t
50 #define dev_t _dev_t
51 #define stat _stat
52 #define strdup _strdup
53 #define fstat _fstat
54 #define open _open
55 #define close _close
56 #define read _read
57 #define write _write
58
59 #define O_APPEND _O_APPEND
60 #define O_CREAT  _O_CREAT
61 #define O_EXCL   _O_EXCL
62 #define O_RDONLY _O_RDONLY
63 #define O_RDWR   _O_RDWR
64 #define O_TRUNC  _O_TRUNC
65 #define O_WRONLY _O_WRONLY
66 #define O_BINARY _O_BINARY
67 #define O_TEXT   _O_TEXT
68
69 /*This one borrowed from \borland\bcc55\include\sys\stat.h*/
70 #define S_IFBLK  0x3000  /* block special */
71
72 /*If you want to see all the scary warnings remove these ones:*/
73 #pragma warning( disable : 4244 )
74 #pragma warning( disable : 4090 )
75 #pragma warning( disable : 4022 )
76 #endif  _MSC_VER
77
78 #endif /*CPP_VC_H_*/