Re: [cc65] Common macros for dirent.d_type

From: Groepaz <groepaz1gmx.net>
Date: 2012-06-25 22:02:27
On Monday 25 June 2012, Ullrich von Bassewitz wrote:
> On Mon, Jun 25, 2012 at 09:40:11PM +0200, Groepaz wrote:
> > in almost all cases i have seen these macros used in real code, they
> > occur in a form like:
> > 
> > if (_DE_ISREG(foo)) {
> > 
> > 	bla
> > 
> > }
> > 
> > this will just work, always.
> 
> No, it will not. If the platform doesn't have dirent.d_type you will get
> compile errors.

if the macro is defined is 0, why the hell would it matter if dirent even 
exist in this case? you could write

 if (_DE_ISREG(whatever is here doesnt matter at all)) {

and it WILL compile fine, really =)

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

Apple is selling products for idiots and is therefore very successful.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Jun 25 22:02:10 2012

This archive was generated by hypermail 2.1.8 : 2012-06-25 22:02:13 CEST