2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)mconfig.h 1.50 04/07/11 Copyright 1995 J. Schilling */
15 * definitions for machine configuration
17 * Copyright (c) 1995 J. Schilling
19 * This file must be included before any other file.
20 * If this file is not included before stdio.h you will not be
21 * able to get LARGEFILE support
23 * Use only cpp instructions.
25 * NOTE: SING: (Schily Is Not Gnu)
28 * This program is free software; you can redistribute it and/or modify
29 * it under the terms of the GNU General Public License version 2
30 * as published by the Free Software Foundation.
32 * This program is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 * GNU General Public License for more details.
37 * You should have received a copy of the GNU General Public License along with
38 * this program; see the file COPYING. If not, write to the Free Software
39 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
45 /* whatever, just shut up */
46 #define __sccsid "forked version from cdrkit"
47 #define _sccsid "forked version from cdrkit"
50 * This hack that is needed as long as VMS has no POSIX shell.
53 # define USE_STATIC_CONF
56 #ifdef USE_STATIC_CONF
57 #include <xmconfig.h> /* This is the current static autoconf stuff */
59 #include <xconfig.h> /* This is the current dynamic autoconf stuff */
67 * The NetBSD people want to bother us.
68 * They removed the definition for 'unix' and are bleating for every test
69 * for #if defined(unix). So we need to check for NetBSD early.
72 # if defined(__NetBSD__)
78 # if (defined(unix) || defined(__unix) || defined(__unix__)) && !defined(__DJGPP__)
87 #if defined(tos) || defined(__tos)
95 #if defined(sun) || defined(__sun) || defined(__sun__)
99 #if defined(__CYGWIN32__) || defined(__CYGWIN__)
100 # define IS_GCC_WIN32
103 #if defined(unix) || defined(_X86)
108 /*--------------------------------------------------------------------------*/
110 * Some magic that cannot (yet) be figured out with autoconf.
113 #if defined(sun3) || defined(mc68000) || defined(mc68020)
114 # ifndef HAVE_SCANSTACK
115 # define HAVE_SCANSTACK
122 # ifndef HAVE_SCANSTACK
123 # define HAVE_SCANSTACK
126 #if defined(__i386_) || defined(i386)
130 # ifndef HAVE_SCANSTACK
131 # define HAVE_SCANSTACK
136 * Use of SCANSTACK is disabled by default
138 #ifndef USE_SCANSTACK
139 # undef HAVE_SCANSTACK
143 * The tests are much better now, so always give it a chance.
145 #ifndef HAVE_SCANSTACK
146 # define HAVE_SCANSTACK
151 * Allow to overwrite the defines in the makefiles by calling
153 * make COPTX=-DFORCE_SCANSTACK
155 #ifdef FORCE_SCANSTACK
157 #ifndef HAVE_SCANSTACK
158 # define HAVE_SCANSTACK
160 #ifndef USE_SCANSTACK
161 # define USE_SCANSTACK
166 * This is the global switch to deactivate stack scanning
169 # ifdef HAVE_SCANSTACK
170 # undef HAVE_SCANSTACK
188 #if defined(SOL2) || defined(SOL2) || \
189 defined(S5R4) || defined(__S5R4) || defined(SVR4)
202 * SunOS 4.x / SunOS 5.x
211 #if defined(_IBMR2) || defined(_AIX)
213 # define IS_UNIX /* ??? really ??? */
227 * Silicon Graphics (must be before SVR4)
229 #if defined(sgi) || defined(__sgi)
230 # define __NOT_SVR4__ /* Not a real SVR4 implementation */
236 #if defined(__DGUX__)
238 # undef HAVE_MTGET_DSREG
239 # undef HAVE_MTGET_RESID
240 # undef HAVE_MTGET_FILENO
241 # undef HAVE_MTGET_BLKNO
243 # define mt_type mt_model
244 # define mt_dsreg mt_status1
245 # define mt_erreg mt_status2
247 * DGUX hides its flock as dg_flock.
250 # define flock dg_flock
252 * Use the BSD style wait on DGUX to get the resource usages of child
255 # define _BSD_WAIT_FLAVOR
259 * Apple Rhapsody (This is the name for Mac OS X beta)
261 #if defined(__NeXT__) && defined(__TARGET_OSNAME) && __TARGET_OSNAME == rhapsody
262 # define HAVE_OSDEF /* prevent later definitions to overwrite current */
271 #if defined(__NeXT__) && !defined(HAVE_OSDEF)
273 #undef HAVE_USG_STDIO /*
274 * NeXT Step 3.x uses __flsbuf(unsigned char, FILE *)
275 * instead of __flsbuf(int, FILE *)
285 #if defined(__APPLE__) && defined(__MACH__)
293 * NextStep 3.x has a broken linker that does not allow us to override
299 # define printf Xprintf
300 # define fprintf Xfprintf
301 # define sprintf Xsprintf
304 #endif /* __OPRINTF__ */
306 /*--------------------------------------------------------------------------*/
308 * If there is no flock defined by the system, use emulation
309 * through fcntl record locking.
312 #define LOCK_SH 1 /* shared lock */
313 #define LOCK_EX 2 /* exclusive lock */
314 #define LOCK_NB 4 /* don't block when locking */
315 #define LOCK_UN 8 /* unlock */
319 #include <prototyp.h>
323 * gcc 2.x generally implements the long long type.
327 # ifndef HAVE_LONGLONG
328 # define HAVE_LONGLONG
334 * Convert to GNU name
336 #ifdef HAVE_STDC_HEADERS
337 # ifndef STDC_HEADERS
338 # define STDC_HEADERS
342 * Convert to SCHILY name
345 # ifndef HAVE_STDC_HEADERS
346 # define HAVE_STDC_HEADERS
351 # define HAVE_PATH_DELIM
352 # define PATH_DELIM '/'
353 # define PATH_DELIM_STR "/"
354 # define PATH_ENV_DELIM ':'
355 # define PATH_ENV_DELIM_STR ":"
364 # define HAVE_PATH_DELIM
365 # define PATH_DELIM '/'
366 # define PATH_DELIM_STR "/"
367 # define PATH_ENV_DELIM ':'
368 # define PATH_ENV_DELIM_STR ":"
369 # define HAVE_DOS_DRIVELETTER
372 # define NEED_O_BINARY
379 # define HAVE_PATH_DELIM
380 # define PATH_DELIM '/'
381 # define PATH_DELIM_STR "/"
382 # define PATH_ENV_DELIM ';'
383 # define PATH_ENV_DELIM_STR ";"
384 # define HAVE_DOS_DRIVELETTER
387 # define NEED_O_BINARY
393 #ifdef __EMX__ /* We don't want to call it UNIX */
394 # define HAVE_PATH_DELIM
395 # define PATH_DELIM '/'
396 # define PATH_DELIM_STR "/"
397 # define PATH_ENV_DELIM ';'
398 # define PATH_ENV_DELIM_STR ";"
399 # define HAVE_DOS_DRIVELETTER
402 # define NEED_O_BINARY
405 #ifdef __BEOS__ /* We don't want to call it UNIX */
406 # define HAVE_PATH_DELIM
407 # define PATH_DELIM '/'
408 # define PATH_DELIM_STR "/"
409 # define PATH_ENV_DELIM ':'
410 # define PATH_ENV_DELIM_STR ":"
418 #ifdef __DJGPP__ /* We don't want to call it UNIX */
419 # define HAVE_PATH_DELIM
420 # define PATH_DELIM '/'
421 # define PATH_DELIM_STR "/"
422 # define PATH_ENV_DELIM ';'
423 # define PATH_ENV_DELIM_STR ";"
424 # define HAVE_DOS_DRIVELETTER
426 # define NEED_O_BINARY
432 #if defined(IS_MSDOS) && !defined(__DJGPP__)
433 # define HAVE_PATH_DELIM
434 # define PATH_DELIM '\\'
435 # define PATH_DELIM_STR "\\"
436 # define PATH_ENV_DELIM ';'
437 # define PATH_ENV_DELIM_STR ";"
438 # define HAVE_DOS_DRIVELETTER
440 # define NEED_O_BINARY
447 # define HAVE_PATH_DELIM
448 # define PATH_DELIM '\\'
449 # define PATH_DELIM_STR "\\"
450 # define PATH_ENV_DELIM ','
451 # define PATH_ENV_DELIM_STR ","
452 # define HAVE_DOS_DRIVELETTER
461 # define HAVE_PATH_DELIM
462 # define PATH_DELIM ':'
463 # define PATH_DELIM_STR ":"
464 # define PATH_ENV_DELIM ';' /* ??? */
465 # define PATH_ENV_DELIM_STR ";" /* ??? */
471 * I hope this will make compilation on unknown OS easier.
473 #ifndef HAVE_PATH_DELIM /* Default to POSIX rules */
474 # define HAVE_PATH_DELIM
475 # define PATH_DELIM '/'
476 # define PATH_DELIM_STR "/"
477 # define PATH_ENV_DELIM ':'
478 # define PATH_ENV_DELIM_STR ":"
487 #endif /* _MCONFIG_H */