Date: Tue, 10 Feb 1998 13:30:58 +0200 (IST) From: Eli Zaretskii To: Nate Eldredge cc: djgpp AT delorie DOT com Subject: Re: Suggestion: Portability section for libc docs In-Reply-To: <199802100441.UAA02948@adit.ap.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 9 Feb 1998, Nate Eldredge wrote: > Each function could say whether it is ANSI, POSIX, available on Unix > or other DOS compilers, unique to DJGPP, etc. I think this is a very good idea. Two comments: 1) Since most DOS-based compiler don't have POSIX-compliant headers such as unistd.h, I suggest that the Portability section would also include the headers where the functions/variables are declared in the other DOS compilers. This will allow people to write code like below when they need e.g. to use `dup2', without looking for Borland docs: #ifdef unix #include #else #include #endif 2) Sometimes functions which exist on other platforms have slightly different functionality. In such cases, the differences should be mentioned. > Before everyone gets upset, I am willing to work on this myself. However, I > don't have the ANSI or POSIX standards and don't have much experience with > other DOS compilers, other than a very old version of Turbo C. Perhaps > someone can tell me where I can get (by e-mail or FTP only, please) > summaries or lists of functions defined by the standards (or even the > standards themselves, though I gather they cost lots of money :( ). You don't need the standards, it is enough to look into the DJGPP headers. Anything that is before ``#ifndef __STRICT_ANSI__'' is ANSI; anything that is before ``#ifndef _POSIX_SOURCE'' is POSIX and non-ANSI; everything that's after ``#ifndef _POSIX_SOURCE'' is neither ANSI nor POSIX. I can offer help in Borland-related issues up to BC 3.1; I don't have and never worked with BC 4.x or 5.x. I can also access SunOS 4.x (BSD-like), SunOS 5.x (SysV-like), Alpha/Unix, and Linux systems to see whether a function is available there.