autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can autoconf determine if a preprocessor macro is defined or not?


From: Bob Friesenhahn
Subject: Re: can autoconf determine if a preprocessor macro is defined or not?
Date: Thu, 27 Jul 2006 09:45:14 -0500 (CDT)

On Thu, 27 Jul 2006, Ed Hartnett wrote:

Here's what I had to add to get my code to build. I would prefer if
autoconf could add this to config.h, for example:

/* These are needed on mingw to get a dll to compile. They really
* should be provided in sys/stats.h, but what the heck. Let's not be
* too picky! */
#ifndef S_IRGRP
#define S_IRGRP   0000040
#endif
#ifndef S_IROTH
#define S_IROTH   0000004
#endif
#ifndef S_IWGRP
#define S_IWGRP   0000020
#endif
#ifndef S_IWOTH
#define S_IWOTH   0000002
#endif

As Keith says, these make no sense for Windows. Since these values are usually ORed, a simple solution is to use code as you show above but define them all to have the value zero. This allows existing Unix code to compile without being hacked up.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]