source: git/src/whichos.h @ daf88e1

RELEASE/1.0RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since daf88e1 was a420b49, checked in by Olly Betts <olly@…>, 26 years ago

0.90 beta 2

git-svn-id: file:///home/survex-svn/survex/trunk@116 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/* > whichos.h
2 * Determines which OS Survex will try to compile for
3 * Copyright (C) 1993-1995 Olly Betts
4 */
5
6/* Built-in #define-s that identify compilers: (initals => checked)
7 * __arm                       (Acorn) Norcroft RISC OS ARM C vsn 4.00 (OJWB)
8 *   also __CC_NORCROFT __riscos __acorn
9 * unix,UNIX                   Unix systems (?)
10 * __MSDOS__                   Borland C++ (OJWB)
11 *       [also __BORLANDC__ (version num) __TURBOC__ (version num)]
12 * __TURBOC__                  Turbo C
13 * __GO32__,unix,MSDOS,__DJGPP__ DJGPP (W) (also GO32, __MSDOS__)
14 * _MSDOS, (MSDOS not ANSI)    Microsoft C (OJWB)
15 * MC68000, mc68000, SOZOBON, ATARI_ST, TOS|MINIX
16 *                             Sozobon C (OJWB from MM's docs)
17 */
18
19#ifndef WHICHOS_H
20# define WHICHOS_H
21
22/* if OS has been defined, then assume they know what they're up to */
23# ifndef OS
24/* Okay, let's try to be clever and auto-detect - if OS gets defined more
25 * than once, compiler should barf and warn user
26 */
27#  ifdef __riscos
28#   define OS RISCOS
29#  endif
30#  if (defined (_MSDOS) || defined(MSDOS) || defined(__MSDOS__))
31#   undef unix /* DJGPP defines this */
32#   undef MSDOS
33#   define OS MSDOS
34#  endif
35#  if (defined(unix) || defined(UNIX))
36#   undef UNIX /* to stop it causing problems later */
37#   define OS UNIX
38#  endif
39#  if (defined(ATARI_ST) || defined(TOS))
40#   undef TOS
41#   define OS TOS
42#  endif
43#  if (defined(__WIN32__))
44#   undef WIN32
45#   define OS WIN32
46#  endif
47/* etc ... */
48# endif /*!defined(OS)*/
49
50/* predefine OS to be one of these (eg in the make file) to force a compile
51 * for an OS/compiler combination not support or that clashes somehow.
52 * eg with -DOS=AMIGA to predefine OS as AMIGA
53 */
54# define RISCOS 1
55# define MSDOS  2
56# define UNIX   3
57# define AMIGA  4
58# define TOS    5
59# define WIN32  6
60/* Just numbers, not a rating system ;) */
61
62/* One last check, in case nothing worked */
63# ifndef OS
64#  error Sorry, do not know what OS to compile for - look at whichos.h
65# endif
66#endif
Note: See TracBrowser for help on using the repository browser.