source: git/src/whichos.h @ 5901b62

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 5901b62 was 89231c4, checked in by Olly Betts <olly@…>, 25 years ago

Updated GPL info (now has correct address for FSF)

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

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