4 -- External declarations for dmake functions.
7 -- ANSI is a macro that allows the proper handling of ANSI style
8 -- function declarations.
11 -- Dennis Vadura, dvadura@dmake.wticorp.com
14 -- http://dmake.wticorp.com/
17 -- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
19 -- This program is NOT free software; you can redistribute it and/or
20 -- modify it under the terms of the Software License Agreement Provided
21 -- in the file <distribution-root>/readme/license.txt.
24 -- Use cvs log to obtain detailed change logs.
30 /* For MSVC++ needs to include windows.h first to avoid problems with
31 * type redefinitions. Include it also for MinGW for consistency. */
32 #if defined(__MINGW32__) || defined(_MSC_VER)
38 /* Define this for the RS/6000 if it breaks something then we have to put a
39 * #ifdef around it. */
58 #if TIME_WITH_SYS_TIME
59 # include <sys/time.h>
63 # include <sys/time.h>
70 # include <sys/types.h>
75 # include <sys/stat.h>
81 #define DMPVOID void *
94 /* Include this last as it invalidates some functions that are defined
95 * externally above and turns them into no-ops. Have to do this after
96 * the extern declarations however. */
101 /* Common declarations
102 * ===================
103 * are better made here then in local public.h. So far dmake didn't follow
104 * this strategy but new functions will be added here. */
106 /* Use our own implementation if no library function is present. */
108 /* from dmstring.c */
109 char *strlwr(char *p
);
112 /* from function.c */
113 char *exec_normpath(char *args
);
116 void Unmake(CELLPTR cp
);
119 void Clean_path(char *path
);
120 char *normalize_path(char *path
);
123 /* cygdospath()/DO_WINPATH() are only needed for the .WINPATH attribute
126 char *cygdospath(char *src
, int winpath
);
127 # define DO_WINPATH(p) cygdospath(p, UseWinpath)
129 # define DO_WINPATH(p) p
133 /* Define some usefull macros. This is done here and not in config.h
134 * to keep this changes usefull even when not using the autotools based
135 * build, i.e. using config.h files that are local to the architecture. */
136 #if defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(OS2) || defined(__EMX__)
137 # define HAVE_DRIVE_LETTERS 1
140 #if defined(_WIN32) || defined(MSDOS) || defined(OS2) && !defined(__CYGWIN__)
141 # define NULLDEV "NUL"
143 # define NULLDEV "/dev/null"
146 /* For MSVC 6.0 and newer and MinGW use the CreateProcess() function. */
147 #if defined(__MINGW32__) || defined(_MSC_VER) && _MSC_VER >= 1200
148 # define USE_CREATEPROCESS 1
150 /* #undef USE_CREATEPROCESS */
153 /* CreateProcess() is spawn-like. */
154 #if ENABLE_SPAWN && ( HAVE_SPAWN_H || __CYGWIN__ || __EMX__) || defined(USE_CREATEPROCESS)
157 /* #undef USE_SPAWN */
160 /* Work around some of the functions that may or may not exist */
163 # define tzset() settz()
165 # warn "tzset is not supported, null out"
170 /* Get the working directory fall back code */
173 # define getcwd(buf,len) getwd(buf)
175 # error "You have no supported way of getting working directory"
179 /* If setvbuf is not available set output to unbuffered */
181 # define setvbuf(fp,bp,type,len) setbuf(fp,NULL)
184 /* coreleft is used in some debug macros. Only Turbo C seems to provide
185 * this function. Define it here so that the code compiles. */
187 #define coreleft() 0L