File: ansichek.h

package info (click to toggle)
gnuplot 3.5beta6.340-5
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 4,792 kB
  • ctags: 4,205
  • sloc: ansic: 41,878; asm: 539; makefile: 498; objc: 379; csh: 297; sh: 277; pascal: 194; perl: 138; lisp: 88
file content (59 lines) | stat: -rw-r--r-- 1,492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * $Id: ansichek.h,v 1.11 1996/12/09 15:57:43 drd Exp $
 *
 */

/* figure out if we can handle ANSI prototypes
 * We invent and use ANSI_C rather than using __STDC__ directly
 * because some compilers (eg MS VC++ 4.1) switch off __STDC__
 * when extensions are enabled, but if extensions are disabled,
 * the standard headers cause compile errors. We can -DANSI_C
 * but -D__STDC__ might confuse headers
 */

#ifndef ANSI_CHECK_H
#define ANSI_CHECK_H

#ifndef AUTOCONF
/* configure already tested the ANSI feature */

#if !defined(ANSI_C) && defined(__STDC__) && __STDC__
#define ANSI_C
#endif

/* are all these compiler tests necessary ? - can the makefiles not
 * just set ANSI_C ?
 */

#if defined(ANSI_C) || defined(__TURBOC__) || defined (__PUREC__) || defined (__ZTC__) || defined (_MSC_VER) || (defined(OSK) && defined(_ANSI_EXT))
#define PROTOTYPES
#endif

#endif /* AUTOCONF */

/* used to be __P be it was just too difficult to guess whether
 * standard headers define it. It's not as if the defn is
 * particularly difficult to do ourselves...
 */

#ifdef PROTOTYPES
#define __PROTO(proto) proto
#else
#define __PROTO(proto) ()
#endif


/* generic pointer type. For old compilers this has to be changed to char *,
   but I don't know if there are any CC's that support void and not void * */

#define generic void

/* undef const for old compilers
 * I think autoconf tests const : why don't we use its test ?
 */

#ifndef ANSI_C
#define const
#endif

#endif /* ANSI_CHECK_H */