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

 
 

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

Submitted by:  Tim Dicus <surfertim>
Submitted on:  Thu 18 Aug 2011 11:23:52 AM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: FixedPercent Complete: 100%
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed
Release: 1.7.1Fixed Release: 1.8.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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.)

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by arcanum (Updated the item)
  • -unavailable- added by joerg_wunsch (Updated the item)
  • -unavailable- added by surfertim (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Sep 2011 03:05:10 PM UTCarcanumFixed Release1.7.2=>1.8.0
    Wed 14 Sep 2011 08:25:34 AM UTCjoerg_wunschItem Grouplibc code=>Header files
      StatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.7.2
    Thu 18 Aug 2011 11:23:52 AM UTCsurfertimAttached File-=>Added delay.h.in, #23831
      Attached File-=>Added delay.h, #23832

    Back to the top


    Powered by Savane 3.1-cleanup1