[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Properly handling conditional functions in header
From: |
Ralf Wildenhues |
Subject: |
Re: Properly handling conditional functions in header |
Date: |
Tue, 25 May 2010 07:36:21 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
Hello Evan,
* Evan Klinger wrote on Mon, May 24, 2010 at 08:55:08PM CEST:
> We have a shared library that we install which includes the header
> which contains the functions available in the library. However,
> depending upon the ./configure options, not all of the functions will
> be available and won't be compiled in. Thus we would like to remove
> these from the header file. Currently they are wrapped in #ifdefs
> which come from config.h but once the header is installed, the
> config.h is no longer necessary or used. So I'm wondering what the
> best approach is to remove the function prototypes from the header for
> the functions that were not compiled in.
One possible approach is to use a second config header. You need to
write its template yourself (autoheader only creates that for the first
config header) and you can put only needed symbols in there, as '#undef
foo'. With names that are specific to your package, it would be fine to
install this header.
Cheers,
Ralf