Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bacda6a

Browse files
committed
Remove obsolete HAVE_BUGGY_SOLARIS_STRTOD
Fixed more than 10 years ago. Reviewed-by: Noah Misch <noah@leadboat.com> Discussion: https://www.postgresql.org/message-id/flat/aa266ede-baaa-f4e6-06cf-5b1737610e9a%402ndquadrant.com
1 parent b48cac3 commit bacda6a

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

src/backend/utils/adt/float.c

-24
Original file line numberDiff line numberDiff line change
@@ -271,18 +271,6 @@ float4in(PG_FUNCTION_ARGS)
271271
errmsg("invalid input syntax for type %s: \"%s\"",
272272
"real", orig_num)));
273273
}
274-
#ifdef HAVE_BUGGY_SOLARIS_STRTOD
275-
else
276-
{
277-
/*
278-
* Many versions of Solaris have a bug wherein strtod sets endptr to
279-
* point one byte beyond the end of the string when given "inf" or
280-
* "infinity".
281-
*/
282-
if (endptr != num && endptr[-1] == '\0')
283-
endptr--;
284-
}
285-
#endif /* HAVE_BUGGY_SOLARIS_STRTOD */
286274

287275
/* skip trailing whitespace */
288276
while (*endptr != '\0' && isspace((unsigned char) *endptr))
@@ -499,18 +487,6 @@ float8in_internal_opt_error(char *num, char **endptr_p,
499487
type_name, orig_string))),
500488
have_error);
501489
}
502-
#ifdef HAVE_BUGGY_SOLARIS_STRTOD
503-
else
504-
{
505-
/*
506-
* Many versions of Solaris have a bug wherein strtod sets endptr to
507-
* point one byte beyond the end of the string when given "inf" or
508-
* "infinity".
509-
*/
510-
if (endptr != num && endptr[-1] == '\0')
511-
endptr--;
512-
}
513-
#endif /* HAVE_BUGGY_SOLARIS_STRTOD */
514490

515491
/* skip trailing whitespace */
516492
while (*endptr != '\0' && isspace((unsigned char) *endptr))

src/include/port/solaris.h

-12
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,3 @@
2424
#if defined(__i386__)
2525
#include <sys/isa_defs.h>
2626
#endif
27-
28-
/*
29-
* Many versions of Solaris have broken strtod() --- see bug #4751182.
30-
* This has been fixed in current versions of Solaris:
31-
*
32-
* http://sunsolve.sun.com/search/document.do?assetkey=1-21-108993-62-1&searchclause=108993-62
33-
* http://sunsolve.sun.com/search/document.do?assetkey=1-21-112874-34-1&searchclause=112874-34
34-
*
35-
* However, many people might not have patched versions, so
36-
* still use our own fix for the buggy version.
37-
*/
38-
#define HAVE_BUGGY_SOLARIS_STRTOD

0 commit comments

Comments
 (0)