avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] User-visible library version numbers


From: Bob Paddock
Subject: Re: [avr-libc-dev] User-visible library version numbers
Date: Fri, 26 Aug 2005 16:05:46 -0400
User-agent: KMail/1.8.1

On Friday 26 August 2005 12:54 pm, E. Weddington wrote:

> >What to put in there?
> >
> >. __AVR_LIBC_VERSION__ "1.4.0"  /* a string */
> >. __AVR_LIBC_MAJOR__   1        /* three integers */
> >. __AVR_LIBC_MINOR__   4
> >. __AVR_LIBC_TINY__    0
>
> I actually prefer this method, 

As do I.  GCC refers to _TINY_ as _PATCHLEVEL, see below.

> as IIRC, doesn't it correspond to what 
> GCC does?

Yes.

#ifdef __GNUC__

#define __GCC_VERSION__ (__GNUC__ * 10000 \
                               + __GNUC_MINOR__ * 100 \
                               + __GNUC_PATCHLEVEL__)

/* Test for GCC < 3.4.0 */
#if __GCC_VERSION__ < 30400
#include <avr/ina90.h>
#endif

/* Test for GCC >= 3.4.3 */
#if __GCC_VERSION__ >= 30403
#include <compat/ina90.h>
#endif

#endif /* #ifdef __GNUC__ */






reply via email to

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