pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
remove some ancient port hacks
5+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2020-08-15 bacda6a327  Remove obsolete HAVE_BUGGY_SOLARIS_STRTOD
  2020-08-15 53095b5fe6  Remove obsolete cygwin.h hack
* remove some ancient port hacks
@ 2020-08-12 07:12  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Peter Eisentraut @ 2020-08-12 07:12 UTC (permalink / raw)
  To: pgsql-hackers

There are two ancient hacks in the cygwin and solaris ports that appear 
to have been solved more than 10 years ago, so I think we can remove 
them.  See attached patches.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments: download all (2 files, .tar.gz)

0001-Remove-obsolete-HAVE_BUGGY_SOLARIS_STRTOD.patch (text/plain, 2.4K) download From 6322cb1d9579ab8e2fd66139aa6a0f342925b7f0 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <peter@eisentraut.org> Date: Wed, 12 Aug 2020 09:09:02 +0200 Subject: [PATCH 1/2] Remove obsolete HAVE_BUGGY_SOLARIS_STRTOD Fixed more than 10 years ago. --- src/backend/utils/adt/float.c | 24 ------------------------ src/include/port/solaris.h | 12 ------------ 2 files changed, 36 deletions(-) diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index ffd1ce8c76..429c9280c0 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -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)) diff --git a/src/include/port/solaris.h b/src/include/port/solaris.h index eeb1a320bd..e63a3bd824 100644 --- a/src/include/port/solaris.h +++ b/src/include/port/solaris.h @@ -24,15 +24,3 @@ #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 -- 2.28.0
0002-Remove-obsolete-cygwin.h-hack.patch (text/plain, 811B) download From 71a0e828454f2c473c65824cfdbf6a14640ffcf6 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <peter@eisentraut.org> Date: Wed, 12 Aug 2020 09:09:02 +0200 Subject: [PATCH 2/2] Remove obsolete cygwin.h hack The version being checked for is 20 years old. --- src/include/port/cygwin.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/include/port/cygwin.h b/src/include/port/cygwin.h index f1fc1a93d7..64d69936e5 100644 --- a/src/include/port/cygwin.h +++ b/src/include/port/cygwin.h @@ -1,14 +1,5 @@ /* src/include/port/cygwin.h */ -#include <cygwin/version.h> - -/* - * Check for b20.1 and disable AF_UNIX family socket support. - */ -#if CYGWIN_VERSION_DLL_MAJOR < 1001 -#undef HAVE_UNIX_SOCKETS -#endif - #ifdef BUILDING_DLL #define PGDLLIMPORT __declspec (dllexport) #else -- 2.28.0
^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: remove some ancient port hacks
@ 2020-08-12 08:18  Marco Atzeri <marco.atzeri@gmail.com>
  parent: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Marco Atzeri @ 2020-08-12 08:18 UTC (permalink / raw)
  To: pgsql-hackers@lists.postgresql.org

On 12.08.2020 09:12, Peter Eisentraut wrote:
> There are two ancient hacks in the cygwin and solaris ports that appear 
> to have been solved more than 10 years ago, so I think we can remove 
> them.  See attached patches.
> 

Hi Peter,
This is really archeology

   Check for b20.1

as it was released in 1998.
No problem at all to remove it

Regards Marco
Cygwin Package Maintainer





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

* Re: remove some ancient port hacks
@ 2020-08-13 03:22  Noah Misch <noah@leadboat.com>
  parent: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Noah Misch @ 2020-08-13 03:22 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: pgsql-hackers

On Wed, Aug 12, 2020 at 09:12:07AM +0200, Peter Eisentraut wrote:
> There are two ancient hacks in the cygwin and solaris ports that appear to
> have been solved more than 10 years ago, so I think we can remove them.  See
> attached patches.

+1 for removing these.  >10y age is not sufficient justification by itself; if
systems that shipped with the defect were not yet EOL, that would tend to
justify waiting longer.  For these particular hacks, though, affected systems
are both old and EOL.





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

* Re: remove some ancient port hacks
@ 2020-08-15 09:39  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Marco Atzeri <marco.atzeri@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Peter Eisentraut @ 2020-08-15 09:39 UTC (permalink / raw)
  To: Marco Atzeri <marco.atzeri@gmail.com>; pgsql-hackers@lists.postgresql.org

On 2020-08-12 10:18, Marco Atzeri wrote:
> On 12.08.2020 09:12, Peter Eisentraut wrote:
>> There are two ancient hacks in the cygwin and solaris ports that appear
>> to have been solved more than 10 years ago, so I think we can remove
>> them.  See attached patches.
>>
> 
> Hi Peter,
> This is really archeology
> 
>     Check for b20.1
> 
> as it was released in 1998.
> No problem at all to remove it

Committed.  Thanks for the feedback.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





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

* Re: remove some ancient port hacks
@ 2020-08-15 09:41  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Peter Eisentraut @ 2020-08-15 09:41 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-hackers

On 2020-08-13 05:22, Noah Misch wrote:
> On Wed, Aug 12, 2020 at 09:12:07AM +0200, Peter Eisentraut wrote:
>> There are two ancient hacks in the cygwin and solaris ports that appear to
>> have been solved more than 10 years ago, so I think we can remove them.  See
>> attached patches.
> 
> +1 for removing these.  >10y age is not sufficient justification by itself; if
> systems that shipped with the defect were not yet EOL, that would tend to
> justify waiting longer.  For these particular hacks, though, affected systems
> are both old and EOL.

done

In this case, the bug was fixed in the stable release track of this OS, 
so the only way to still be affected would be if you had never installed 
any OS patches in 10 years, which is clearly unreasonable.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





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


end of thread, other threads:[~2020-08-15 09:41 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 07:12 remove some ancient port hacks Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-08-12 08:18 ` Marco Atzeri <marco.atzeri@gmail.com>
2020-08-15 09:39   ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-08-13 03:22 ` Noah Misch <noah@leadboat.com>
2020-08-15 09:41   ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox