dvitomp fix from Akira
[mplib] / src / texk / kpathsea / config.h
1 /* config.h: master configuration file, included first by all compilable
2    source files (not headers).
3
4    Copyright 1993, 1995, 1996, 1997, 2008 Karl Berry.
5    Copyright 2000, 2003, 2004, 2005 Olaf Weber.
6
7    This library is free software; you can redistribute it and/or
8    modify it under the terms of the GNU Lesser General Public
9    License as published by the Free Software Foundation; either
10    version 2.1 of the License, or (at your option) any later version.
11
12    This library is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    Lesser General Public License for more details.
16
17    You should have received a copy of the GNU Lesser General Public License
18    along with this library; if not, see <http://www.gnu.org/licenses/>.  */
19
20 #ifndef KPATHSEA_CONFIG_H
21 #define KPATHSEA_CONFIG_H
22
23 /* System defines are for non-Unix systems only.  (Testing for all Unix
24    variations should be done in configure.)  Presently the defines used
25    are: AMIGA DOS OS2 WIN32.  I do not use any of these systems myself;
26    if you do, I'd be grateful for any changes. --olaf@infovore.xs4all.nl */
27
28 #if defined(DJGPP)    || defined(__DJGPP__)     || \
29     defined(CYGWIN)   || defined(__CYGWIN__)    || \
30     defined(CYGWIN32) || defined(__CYGWIN32__)  || \
31     defined(MINGW32)  || defined(__MINGW32__)
32 #define __i386_pc_gnu__
33 #endif
34
35 /* If we have either DOS or OS2, we are DOSISH.  Cygwin pretends to be
36  * unix, mostly, so don't include it here.
37  */
38 #if defined(OS2)     || \
39     defined(MSDOS)   || defined(__MSDOS__) || defined(DOS)    || \
40     defined(WIN32)   || defined(__WIN32__) || defined(_WIN32) || \
41     defined(DJGPP)   || defined(__DJGPP__) || \
42     defined(MINGW32) || defined(__MINGW32__)
43 #define DOSISH
44 #endif
45
46 /* case-insensitive filename comparisons? */
47 #if defined (DOSISH)
48 #define MONOCASE_FILENAMES
49 #endif
50
51 /* NULL device. */
52 #if defined (DOSISH)
53 #define DEV_NULL "NUL"
54 #else
55 #define DEV_NULL "/dev/null"
56 #endif
57
58 #ifdef WIN32
59 # ifndef __STDC__
60 #  define __STDC__ 1
61 # endif
62 #endif /* not WIN32 */
63
64 /* System dependencies that are figured out by `configure'.  */
65 #include <kpathsea/c-auto.h>
66
67 #ifdef __DJGPP__
68 #include <fcntl.h>      /* for long filenames' stuff */
69 #include <dir.h>        /* for `getdisk' */
70 #include <io.h>         /* for `setmode' */
71 #endif
72
73 /* Some drivers have partially integrated kpathsea changes.  */
74 #ifndef KPATHSEA
75 #define KPATHSEA 34
76 #endif
77
78 #include <kpathsea/c-std.h>    /* <stdio.h>, <math.h>, etc.  */
79
80 #include <kpathsea/c-proto.h>  /* Macros to discard or keep prototypes.  */
81
82 /*
83   This must be included after "c-proto.h"
84   but before "lib.h". FP.
85 */
86 #ifdef WIN32
87 # ifndef __MINGW32__
88 #   include <win32lib.h>
89 # else
90 #   include "win32lib.h"
91 # endif
92 #endif
93
94 #include <kpathsea/debug.h>    /* Runtime tracing.  */
95 #include <kpathsea/lib.h>      /* STREQ, etc. */
96 #include <kpathsea/types.h>    /* <sys/types.h>, boolean, string, etc. */
97 #include <kpathsea/progname.h> /* for program_invocation_*name */
98
99    
100 /* If you want to find subdirectories in a directory with non-Unix
101    semantics (specifically, if a directory with no subdirectories does
102    not have exactly two links), define this.  */
103 #if !defined (VMS) && !defined (VMCMS)
104 #if !defined (DOSISH) || defined(__DJGPP__)
105 /* Surprise!  DJGPP returns st_nlink exactly like on Unix.  */
106 #define ST_NLINK_TRICK
107 #endif /* either not DOSISH or __DJGPP__ */
108 #endif /* not DOS and not VMS and not VMCMS */
109
110 #ifdef AMIGA
111 /* No popen/pclose on Amiga, but rather than put #ifdef's in tex-make.c,
112    let's get rid of the functions here.  (CallMF will automatically
113    generate fonts.)  pclose must not be simply empty, since it still
114    occurs in a comparison.  */
115 #define popen(cmd, mode) NULL
116 #define pclose(file) 0
117 #endif /* AMIGA */
118
119 #ifdef OS2
120 #define access ln_access
121 #define chmod ln_chmod
122 #define creat ln_creat
123 #define fopen ln_fopen
124 #define freopen ln_freopen
125 #define lstat ln_lstat
126 #define open ln_open
127 #define remove ln_remove
128 #define rename ln_rename
129 #define sopen ln_sopen
130 #define stat ln_stat
131 #define unlink ln_unlink
132 #endif /* OS2 */
133
134 #endif /* not KPATHSEA_CONFIG_H */