cweb
[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 #define __STDC__ 1
60 #endif /* not WIN32 */
61
62 /* System dependencies that are figured out by `configure'.  */
63 #include <kpathsea/c-auto.h>
64
65 #ifdef __DJGPP__
66 #include <fcntl.h>      /* for long filenames' stuff */
67 #include <dir.h>        /* for `getdisk' */
68 #include <io.h>         /* for `setmode' */
69 #endif
70
71 /* Some drivers have partially integrated kpathsea changes.  */
72 #ifndef KPATHSEA
73 #define KPATHSEA 34
74 #endif
75
76 #include <kpathsea/c-std.h>    /* <stdio.h>, <math.h>, etc.  */
77
78 #include <kpathsea/c-proto.h>  /* Macros to discard or keep prototypes.  */
79
80 /*
81   This must be included after "c-proto.h"
82   but before "lib.h". FP.
83 */
84 #ifdef WIN32
85 #include <win32lib.h>
86 #endif
87
88 #include <kpathsea/debug.h>    /* Runtime tracing.  */
89 #include <kpathsea/lib.h>      /* STREQ, etc. */
90 #include <kpathsea/types.h>    /* <sys/types.h>, boolean, string, etc. */
91 #include <kpathsea/progname.h> /* for program_invocation_*name */
92
93    
94 /* If you want to find subdirectories in a directory with non-Unix
95    semantics (specifically, if a directory with no subdirectories does
96    not have exactly two links), define this.  */
97 #if !defined (VMS) && !defined (VMCMS)
98 #if !defined (DOSISH) || defined(__DJGPP__)
99 /* Surprise!  DJGPP returns st_nlink exactly like on Unix.  */
100 #define ST_NLINK_TRICK
101 #endif /* either not DOSISH or __DJGPP__ */
102 #endif /* not DOS and not VMS and not VMCMS */
103
104 #ifdef AMIGA
105 /* No popen/pclose on Amiga, but rather than put #ifdef's in tex-make.c,
106    let's get rid of the functions here.  (CallMF will automatically
107    generate fonts.)  pclose must not be simply empty, since it still
108    occurs in a comparison.  */
109 #define popen(cmd, mode) NULL
110 #define pclose(file) 0
111 #endif /* AMIGA */
112
113 #ifdef OS2
114 #define access ln_access
115 #define chmod ln_chmod
116 #define creat ln_creat
117 #define fopen ln_fopen
118 #define freopen ln_freopen
119 #define lstat ln_lstat
120 #define open ln_open
121 #define remove ln_remove
122 #define rename ln_rename
123 #define sopen ln_sopen
124 #define stat ln_stat
125 #define unlink ln_unlink
126 #endif /* OS2 */
127
128 #endif /* not KPATHSEA_CONFIG_H */