Date: Thu, 22 Jan 1998 18:47:09 +0200 (IST) From: Eli Zaretskii To: "S. M. Halloran" cc: djgpp AT delorie DOT com Subject: Re: access() in DJGPP and TC/BC In-Reply-To: <199801220827.KAA08443@ankara.duzen.com.tr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 22 Jan 1998, S. M. Halloran wrote: > This is a C language fundamental that you bring up. Constants should > never really be used in the code and should really be defined by > macros for the purpose of portability. If you always use the macro > symbols for constants for functions in the standard library (or > functions with well-understood portability), you should never have a > problem getting the code to work on different implementations. It is > a very rare case that numeric constants, rather than their symbolic > macros, would ever be used directly in the code. Unfortunately, this advice is useless in the case of `access', since some systems (TC is one of them, but there are others, even on Unix) don't define the R_OK, W_OK etc. symbols for the mode argument of `access'. On those systems, you *must* use numeric values if you call `access'. That's why I advise to avoid using this function.