Date: Thu, 4 Nov 1999 17:18:33 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Joe Heafner cc: djgpp AT delorie DOT com Subject: Re: can't find DJGPP header files in MingW32 In-Reply-To: <382185F2.534DD540@interpath.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 4 Nov 1999, Joe Heafner wrote: > Where would I find the replacements, or at least documentation on them? The best documentation of the header is the header itself. It is always available as a source, so you can look there. As for replacements, you need first to find out what symbols from the header does the program use. To that end, create an empty header with that name and compile with Mingw (or whatever). If the compiler misses some constants or prototypes, it will complain about them. You will thus know what is the header used for. Once you know that, it shouldn't be hard to find a more portable constant or header that solves the problem; if you cannot figure that out, just tell what the compiler printed and ask for advice. As an example, sys/param.h defines a constant MAXPATHLEN. The portable replacement for it is FILENAME_MAX, and it lives in stdio.h which is available with every compiler. > This particular software can currently and MUST be able to compile under > DOS, Solaris, Linux, and OS/2 (Windows is included here as it's just > another DOS program) using EMX, DJGPP 2.8, and Visual C++. If you want portability to such a wide variety of platforms, you should *never* use any non-standard headers such as sys/param.h. Stick to ANSI-standard headers, and if that is not enough, add Posix ones. If you cannot find any portable header that does the job, use #ifdef to include platform-specific headers.