source: git/src/whichos.h @ da8ae43

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 da8ae43 was 421b7d2, checked in by Olly Betts <olly@…>, 24 years ago

Whitespace preening.

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

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[421b7d2]1/* whichos.h
[d1b1380]2 * Determines which OS Survex will try to compile for
3 * Copyright (C) 1993-1995 Olly Betts
[846746e]4 *
[89231c4]5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
[846746e]9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
[89231c4]12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
[846746e]14 *
[89231c4]15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
[d1b1380]18 */
19
20/* Built-in #define-s that identify compilers: (initals => checked)
[421b7d2]21 * __arm                        (Acorn) Norcroft RISC OS ARM C vsn 4.00 (OJWB)
[d1b1380]22 *   also __CC_NORCROFT __riscos __acorn
[421b7d2]23 * unix,UNIX                    Unix systems (?)
24 * __MSDOS__                    Borland C++ (OJWB)
[d1b1380]25 *       [also __BORLANDC__ (version num) __TURBOC__ (version num)]
[421b7d2]26 * __TURBOC__                   Turbo C
27 * __GO32__,unix,MSDOS,__DJGPP__
28 *                              DJGPP (W) (also GO32, __MSDOS__)
29 * _MSDOS, (MSDOS not ANSI)     Microsoft C (OJWB)
[d1b1380]30 * MC68000, mc68000, SOZOBON, ATARI_ST, TOS|MINIX
[421b7d2]31 *                              Sozobon C (OJWB from MM's docs)
[d1b1380]32 */
33
34#ifndef WHICHOS_H
35# define WHICHOS_H
36
37/* if OS has been defined, then assume they know what they're up to */
38# ifndef OS
39/* Okay, let's try to be clever and auto-detect - if OS gets defined more
40 * than once, compiler should barf and warn user
41 */
[a420b49]42#  ifdef __riscos
43#   define OS RISCOS
[d1b1380]44#  endif
45#  if (defined (_MSDOS) || defined(MSDOS) || defined(__MSDOS__))
46#   undef unix /* DJGPP defines this */
47#   undef MSDOS
48#   define OS MSDOS
49#  endif
50#  if (defined(unix) || defined(UNIX))
51#   undef UNIX /* to stop it causing problems later */
52#   define OS UNIX
53#  endif
54#  if (defined(ATARI_ST) || defined(TOS))
55#   undef TOS
56#   define OS TOS
57#  endif
[5257629]58#  if (defined(__WIN32__))
59#   undef WIN32
60#   define OS WIN32
61#  endif
[d1b1380]62/* etc ... */
63# endif /*!defined(OS)*/
64
65/* predefine OS to be one of these (eg in the make file) to force a compile
66 * for an OS/compiler combination not support or that clashes somehow.
67 * eg with -DOS=AMIGA to predefine OS as AMIGA
68 */
69# define RISCOS 1
70# define MSDOS  2
71# define UNIX   3
72# define AMIGA  4
73# define TOS    5
[5257629]74# define WIN32  6
[d1b1380]75/* Just numbers, not a rating system ;) */
76
77/* One last check, in case nothing worked */
78# ifndef OS
79#  error Sorry, do not know what OS to compile for - look at whichos.h
80# endif
81#endif
Note: See TracBrowser for help on using the repository browser.