Share September 2005: Project of the Month

MinGW - Minimalist GNU for Windows

Tracker: Bugs

5 Missing prototypes for inline functions - ID: 2831035
Last Update: Comment added ( ir0nh34d )

This change2009-07-18 Gregory McGarry
<gregorymcgarry@users.sourceforge.net>

* include/inttypes.h include/math.h include/stdio.h include/stdlib.h
include/string.h include/unistd.h include/wchar.h: Add __NO_INLINE__
guard
to all inline functions.

breaks build of libstdc++ and probably other libraries which do configure
tests for prototypes of C99 functions.

In the case of libstdc++, configure checks for prototype of C99 math
functions with no optimization (iadds e, __NO_INLINE__is defined.)
It fails to find eg powf and so adds its own stub version. This is comiled
at -O2, so __NO_INLINE__ !defined and the result is a duplicate definition
error.

The fix is to add prototypes for all inline functions.


Danny Smith ( dannysmith ) - 2009-08-02 08:00

5

Closed

Accepted

Chris Sutcliffe

None

None

Public


Comments ( 3 )

Date: 2009-08-08 13:29
Sender: ir0nh34dAccepting Donations

Patch applied in CVS, thank you Danny!


Date: 2009-08-08 05:52
Sender: dannysmith

Patch uploaded
2009-08-08 Danny Smith <dannysmith@users.sourceforge.net>

* include/math.h (__fpclassifyl, __isnan, __isnanf, isnanl,
__signbit, __signbitf, __signbitl, sinhf, tanhf, expf, frexpf,
ldexpf, hypotf, powf, __fp_unordered_compare): Add prototypes.
* include/stdio.h (vsnwprintf): Add prototype.
* include/wchar.h (vsnwprintf): Add prototype.
* include/stdlib.h (_Exit): Protect inline definition with
!__STRICT_ANSI__.
* include/unistd.h (ftruncate): Move prototype out of
__NO_INLINE__ guard.


Date: 2009-08-08 00:19
Sender: ir0nh34dAccepting Donations

Add a prototype in math.h for all __inline__ and inline functions?


Attached File ( 1 )

Filename Description Download
prototype_inline.diff Patch Download

Changes ( 6 )

Field Old Value Date By
close_date - 2009-08-08 13:29 ir0nh34d
allow_comments 1 2009-08-08 13:29 ir0nh34d
assigned_to nobody 2009-08-08 13:29 ir0nh34d
resolution_id None 2009-08-08 13:29 ir0nh34d
status_id Open 2009-08-08 13:29 ir0nh34d
File Added 338382: prototype_inline.diff 2009-08-08 05:51 dannysmith