freeipmi-devel
[Top][All Lists]
Advanced

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

Re: [Freeipmi-devel] stdint.h


From: Anand Babu
Subject: Re: [Freeipmi-devel] stdint.h
Date: Fri, 15 Dec 2006 07:21:46 -0400
User-agent: GNU/Emacs/Mutt

On Fri, Dec 15, 2006 at 03:56:08PM +0600, Dmitry Frolov wrote:
,----
| * Anand Babu <address@hidden> [15.12.2006 14:15]:
| 
| > On Thu, Dec 14, 2006 at 05:41:35PM -0800, Al Chu wrote:
| > ,----
| > | Ahh, I see this is from one of Dmitry's earlier BSD patches.
| > | 
| > | The issue with it is that it makes the freeipmi build work, but
| > | now requires users to define HAVE_STDINT_H to get the build to
| > | work if they are linking code to libfreeipmi (or requires them
| > | to add stdint.h themselves prior to freeipmi.h).
| > | 
| > | I'm not 100% sure of the best solution, but we'll have to look
| > | into this.
| > | 
| > | Al
| > `----
| > stdint.h is ISO C99 standard. I suppose FreeBSD now has
| > stdint.h. Typically if a header is not available, then we do
| > something like ipmi-compat.h and make our own definitions in
| > it. But I am wondering if they are able to compile freeipmi code
| > without stdint.h or any other freebsd specific header inclusion,
| > then stdint data types should be defined in some other standard
| > header file.  Checking for HAVE_SDTINT_H is not appropriate in
| > this case.
| > 
| > If older versions of FreeBSD did not have stdint.h but their
| > definitions were available through other standard headers, we
| > should understand more about the problem. May be #if
| > defined(__FreeBSD__) with version check will do.
| 
| I'm sorry guys, that's completely my fault, since I brought
| HAVE_STDINT_H into the tree. The better way would be that ugly
| construct:
| 
| #ifdef __FreeBSD__
| # include <sys/param.h>
| # if __FreeBSD_version >= 500000
| #  include <stdint.h>
| # else
| #  include <inttypes.h>       /* stdint.h predecessor */
| # endif
| #else
| # include <stdint.h>
| #endif
`----
I guessed it, I don't think there is any better way :)
I will go ahead and replace everywhere.

Thanks,
-- 
Anand Babu 
GPG Key ID: 0x62E15A31
Blog [http://ab.freeshell.org]              
The GNU Operating System [http://www.gnu.org]  





reply via email to

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