no longer needed
[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 # ifndef __MINGW32__
87 #   include <win32lib.h>
88 # else
89 #   include "win32lib.h"
90 # endif
91
92 #include <kpathsea/debug.h>    /* Runtime tracing.  */
93 #include <kpathsea/lib.h>      /* STREQ, etc. */
94 #include <kpathsea/types.h>    /* <sys/types.h>, boolean, string, etc. */
95 #include <kpathsea/progname.h> /* for program_invocation_*name */
96
97    
98 /* If you want to find subdirectories in a directory with non-Unix
99    semantics (specifically, if a directory with no subdirectories does
100    not have exactly two links), define this.  */
101 #if !defined (VMS) && !defined (VMCMS)
102 #if !defined (DOSISH) || defined(__DJGPP__)
103 /* Surprise!  DJGPP returns st_nlink exactly like on Unix.  */
104 #define ST_NLINK_TRICK
105 #endif /* either not DOSISH or __DJGPP__ */
106 #endif /* not DOS and not VMS and not VMCMS */
107
108 #ifdef AMIGA
109 /* No popen/pclose on Amiga, but rather than put #ifdef's in tex-make.c,
110    let's get rid of the functions here.  (CallMF will automatically
111    generate fonts.)  pclose must not be simply empty, since it still
112    occurs in a comparison.  */
113 #define popen(cmd, mode) NULL
114 #define pclose(file) 0
115 #endif /* AMIGA */
116
117 #ifdef OS2
118 #define access ln_access
119 #define chmod ln_chmod
120 #define creat ln_creat
121 #define fopen ln_fopen
122 #define freopen ln_freopen
123 #define lstat ln_lstat
124 #define open ln_open
125 #define remove ln_remove
126 #define rename ln_rename
127 #define sopen ln_sopen
128 #define stat ln_stat
129 #define unlink ln_unlink
130 #endif /* OS2 */
131
132 #endif /* not KPATHSEA_CONFIG_H */