public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, quadmath] PR 46772 - include stdlib.h instead of declaring stdtod
@ 2010-12-08 15:25 Tobias Burnus
  2010-12-08 23:06 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Burnus @ 2010-12-08 15:25 UTC (permalink / raw)
  To: gcc patches

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

(We really lack libquadmath maintainers. Thus, at the moment, one has 
the choice between declaring it as obvious and asking a global 
maintainer for review...)

In the gdtoa/*.h files of libquadmath stdtod and stdtof are declared. 
This patch removes the declaration in favour of using stdlib.h.

The main reason for the change is MinGW which declares "strtod" as 
static (?!?) - which in turn gcc does not like ...

Build on x86-64-linux.
OK for the trunk?

Tobias

[-- Attachment #2: quad-strtod.diff --]
[-- Type: text/x-patch, Size: 1605 bytes --]

2010-12-08  Tobiuas Burnus  <burnus/2net-b.de>

	PR fortran/46772
	* gdtoa/gdtoa.h: Include stdlib.h instead of declare strtod.
	* gdtoa/gdtoaimp.h: Don't declare strtod.

Index: libquadmath/gdtoa/gdtoa.h
===================================================================
--- libquadmath/gdtoa/gdtoa.h	(revision 167583)
+++ libquadmath/gdtoa/gdtoa.h	(working copy)
@@ -34,6 +34,7 @@ THIS SOFTWARE.
 
 #include "arith.h"
 #include <stddef.h> /* for size_t */
+#include <stdlib.h> /* for strtod */
 
 #ifndef Long
 #define Long long
@@ -108,8 +109,6 @@ extern char* dtoa  ANSI((double d, int m
 extern char* gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
 			int mode, int ndigits, int *decpt, char **rve));
 extern void freedtoa ANSI((char*));
-extern float  strtof ANSI((CONST char *, char **));
-extern double strtod ANSI((CONST char *, char **));
 extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
 
 extern char*	g_ddfmt  ANSI((char*, double*, int, size_t));
Index: libquadmath/gdtoa/gdtoaimp.h
===================================================================
--- libquadmath/gdtoa/gdtoaimp.h	(revision 167583)
+++ libquadmath/gdtoa/gdtoaimp.h	(working copy)
@@ -561,7 +561,6 @@ extern void memcpy_D2A ANSI((void*, cons
  extern Bigint *set_ones ANSI((Bigint*, int));
  extern char *strcp ANSI((char*, const char*));
  extern int strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*));
- extern double strtod ANSI((const char *s00, char **se));
  extern Bigint *sum ANSI((Bigint*, Bigint*));
  extern int trailz ANSI((Bigint*));
  extern double ulp ANSI((U*));

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch, quadmath] PR 46772 - include stdlib.h instead of declaring stdtod
  2010-12-08 15:25 [Patch, quadmath] PR 46772 - include stdlib.h instead of declaring stdtod Tobias Burnus
@ 2010-12-08 23:06 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2010-12-08 23:06 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: gcc patches

On Wed, Dec 8, 2010 at 7:09 AM, Tobias Burnus <burnus@net-b.de> wrote:
> In the gdtoa/*.h files of libquadmath stdtod and stdtof are declared. This
> patch removes the declaration in favour of using stdlib.h.

This is OK.

Thanks.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-08 22:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 15:25 [Patch, quadmath] PR 46772 - include stdlib.h instead of declaring stdtod Tobias Burnus
2010-12-08 23:06 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).