Remove obsolete HAVE_BUGGY_SOLARIS_STRTOD
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 15 Aug 2020 09:23:18 +0000 (11:23 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 15 Aug 2020 09:27:41 +0000 (11:27 +0200)
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

src/backend/utils/adt/float.c
src/include/port/solaris.h

index ffd1ce8c76104add13a8adf3bdb248219225b34d..429c9280c0cf7286fa459f8e09a4bb2b1934643a 100644 (file)
@@ -271,18 +271,6 @@ float4in(PG_FUNCTION_ARGS)
                     errmsg("invalid input syntax for type %s: \"%s\"",
                            "real", orig_num)));
    }
-#ifdef HAVE_BUGGY_SOLARIS_STRTOD
-   else
-   {
-       /*
-        * Many versions of Solaris have a bug wherein strtod sets endptr to
-        * point one byte beyond the end of the string when given "inf" or
-        * "infinity".
-        */
-       if (endptr != num && endptr[-1] == '\0')
-           endptr--;
-   }
-#endif                         /* HAVE_BUGGY_SOLARIS_STRTOD */
 
    /* skip trailing whitespace */
    while (*endptr != '\0' && isspace((unsigned char) *endptr))
@@ -499,18 +487,6 @@ float8in_internal_opt_error(char *num, char **endptr_p,
                                         type_name, orig_string))),
                         have_error);
    }
-#ifdef HAVE_BUGGY_SOLARIS_STRTOD
-   else
-   {
-       /*
-        * Many versions of Solaris have a bug wherein strtod sets endptr to
-        * point one byte beyond the end of the string when given "inf" or
-        * "infinity".
-        */
-       if (endptr != num && endptr[-1] == '\0')
-           endptr--;
-   }
-#endif                         /* HAVE_BUGGY_SOLARIS_STRTOD */
 
    /* skip trailing whitespace */
    while (*endptr != '\0' && isspace((unsigned char) *endptr))
index eeb1a320bd5b75b3589d8c3241897f1034ce7cf7..e63a3bd824d6dc6fa2d8cc35029ba76b61a03370 100644 (file)
 #if defined(__i386__)
 #include <sys/isa_defs.h>
 #endif
-
-/*
- * Many versions of Solaris have broken strtod() --- see bug #4751182.
- * This has been fixed in current versions of Solaris:
- *
- * http://sunsolve.sun.com/search/document.do?assetkey=1-21-108993-62-1&searchclause=108993-62
- * http://sunsolve.sun.com/search/document.do?assetkey=1-21-112874-34-1&searchclause=112874-34
- *
- * However, many people might not have patched versions, so
- * still use our own fix for the buggy version.
- */
-#define HAVE_BUGGY_SOLARIS_STRTOD