bugAVR C Runtime Library - Bugs: bug #34047, missing math.h include in delay.h

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #34047: missing math.h include in delay.h

Submitter:  Tim Dicus <surfertim>
Submitted:  Thu 18 Aug 2011 11:23:52 AM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Fixed Assigned to:  joerg_wunsch
Percent Complete:  100% Open/Closed:  Closed
Release:  1.7.1 Fixed Release:  1.8.0

Thu 18 Aug 2011 11:23:52 AM UTC, original submission:  

This is my first post here, so if this is not the correct place to submit this, I could use a little guidance. If this bug has already been reported, please let me know.

In avr-libc 1.7.1, there appears to be an omission of the math.h file include.

The /avr/include/util/delay.h.in file (which becomes delay.h in my installed version) has calls to fabs() and ceil() with no declaration for these functions, causing my compiler to throw those 2 errors.

I found the fix was to add the math.h include to
../avr/include/util/delay.h.in

At line 44, I added this
#include <math.h>

The fix can be applied after the install by adding the same line to the /avr/include/util/delay.h file.

I attached both the delay.h.in file and the resulting delay.h file, both with the bug fixes at line 44.

Thanks!

Tim Dicus <surfertim>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #23831:  delay.h.in added by surfertim (9KiB - text/plain)
file #23832:  delay.h added by surfertim (8KiB - text/x-c)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Updated the item)
  • -email is unavailable- added by joerg_wunsch (Updated the item)
  • -email is unavailable- added by surfertim (Submitted the item)
  •  

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-09-26 arcanum Fixed Release1.7.2 1.8.0
    2011-09-14 joerg_wunsch Item Grouplibc code Header files
        StatusNone Fixed
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.7.2
    2011-08-18 surfertim Attached File- Added delay.h.in, #23831
        Attached File- Added delay.h, #23832

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code