[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] Conditional Compilation
On Thu, May 11, 2000 at 02:01:27PM +1000, Shaun Clowes wrote:
> Hi All,
> I need to do some conditional compilation (preprocessor ifdefs etc) and I
> need an easy way to do this based on the version of glibc on Linux or the
> version of Solaris. Ideas how to do this? Preferably without a configure
This is for tsock, presumably.
With gcc try: `cpp -dM' to get a list of predefined macros, for Linux
__linux__ is probably widely supported and for Sun __sun__ is as well.
GNU LibC has version definitions in /usr/include/features.h;
__GLIBC__ and __GLIBC_MINOR__ are what you should use.
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to email@example.com.
If you are having trouble, ask firstname.lastname@example.org for help.
This list is archived at <http://www.progsoc.uts.edu.au/lists/progsoc/>